Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: several fixes (2) #29009

Merged
merged 59 commits into from Sep 7, 2017
Merged

Python: several fixes (2) #29009

merged 59 commits into from Sep 7, 2017

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Sep 5, 2017

Motivation for this change

Continuation of #28884. These fixes will also need to be backported to 17.09.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@FRidh FRidh mentioned this pull request Sep 5, 2017
7 tasks
@FRidh FRidh added this to the 17.09 milestone Sep 5, 2017
@@ -22,11 +23,12 @@ buildPythonPackage rec {

doCheck = false;

buildInputs = [ coverage tornado mock nose psutil pysocks ];
buildInputs = [ pytest mock tornado ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkInputs = [ pytest mock ];

@@ -24,7 +26,8 @@ buildPythonPackage rec {
buildInputs = [
mock
sh
pytest_27
pytest
pytestrunner
git
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkInputs = [ pytest pytestrunner mock ];

@@ -22,11 +23,12 @@ buildPythonPackage rec {

doCheck = false;

buildInputs = [ coverage tornado mock nose psutil pysocks ];
buildInputs = [ pytest mock tornado ];
propagatedBuildInputs = [ pyopenssl cryptography idna certifi ipaddress pysocks ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Archlinux seems to have banned certifi from their core repos as it introduces a new ssl trust store.
(But this is just an unrelated issue)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's indeed a bigger issue. Would be nice to see a RFC on how we are going to handle certificates. I think some choices were made but they're not documented.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sifmelcara
Copy link
Member

Based on @Mic92 's review, I checked which package is only required for checkPhase, and just force updated my two commits at sifmelcara/nixpkgs@e641285

@teto
Copy link
Member

teto commented Sep 7, 2017

I might have forgotten to add secretstorage as a propagatedBuildInput of the python keyring package, could you add it please ?

nix-shell -I ~/nixpkgs2 -p python2Packages.keyring --run "python"                                                                                          
Python 2.7.13 (default, Dec 17 2016, 20:05:07) 
[GCC 6.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/__init__.py", line 6, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/core.py", line 185, in <module>
    init_backend()
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/core.py", line 69, in init_backend
    load_config()
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/core.py", line 139, in load_config
    return load_keyring(keyring_name)
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/core.py", line 109, in load_keyring
    class_.priority
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/util/properties.py", line 22, in __get__
    return self.fget.__get__(None, owner)()
  File "/nix/store/8waaccq38z6a4jaljdz57wpmzjan0lc9-python2.7-keyring-8.4.1/lib/python2.7/site-packages/keyring/backends/SecretService.py", line 25, in priority
    raise RuntimeError("SecretStorage required")
RuntimeError: SecretStorage required

while

nix-shell -I ~/nixpkgs2 -p python2Packages.keyring -p python2Packages.secretstorage --run "python"                                                               02:42:18 
Python 2.7.13 (default, Dec 17 2016, 20:05:07) 
[GCC 6.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
>>>

works fine.

@FRidh FRidh changed the base branch from staging to master September 7, 2017 07:29
@FRidh FRidh merged commit aabadda into NixOS:master Sep 7, 2017
FRidh added a commit that referenced this pull request Sep 7, 2017
Python: several fixes (2)
(cherry picked from commit aabadda)
@FRidh FRidh deleted the python-fixes-2 branch October 20, 2017 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants