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

Add pythonPackages.immutables, pythonPackages.contextvars #40189

Merged
merged 2 commits into from May 11, 2018

Conversation

catern
Copy link
Contributor

@catern catern commented May 8, 2018

Motivation for this change
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
    • other Linux distributions
  • 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.

sha256 = "1hba0vkqanwfnb5b3rs14bs7schsmczhan5nd93c1i6fzi17glap";
};

buildInputs = [ stdenv ];
Copy link
Member

Choose a reason for hiding this comment

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

remove

buildPythonPackage rec {
pname = "contextvars";
version = "2.2";
disabled = pythonOlder "3.6";
Copy link
Member

Choose a reason for hiding this comment

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

This is a

backport of Python 3.7 contextvars module (see PEP 567) for Python 3.6

and should therefore be disabled for any version other than 3.6.

buildPythonPackage rec {
pname = "immutables";
version = "0.5";
disabled = pythonOlder "3.6";
Copy link
Member

Choose a reason for hiding this comment

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

This should be pythonOlder "3.5":

immutables requires Python 3.5+


meta = {
description = "Capture the outcome of Python function calls.";
homepage = https://github.com/MagicStack/contextvars;
Copy link
Member

Choose a reason for hiding this comment

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

Wrong description and homepage

@@ -533,6 +533,10 @@ in {

asyncio = callPackage ../development/python-modules/asyncio {};

immutables = callPackage ../development/python-modules/immutables {};

contextvars = callPackage ../development/python-modules/contextvars {};
Copy link
Member

Choose a reason for hiding this comment

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

The attributes in this file should be ordered alphabetically

propagatedBuildInputs = [ immutables ];

meta = {
description = "Capture the outcome of Python function calls.";
Copy link
Member

Choose a reason for hiding this comment

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

Wrong description

propagatedBuildInputs = [ immutables ];

meta = {
description = "This package implements a backport of Python 3.7 contextvars module for Python 3.6.";
Copy link
Member

Choose a reason for hiding this comment

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

No period: https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes
And for the purpose of brevity, I'd leave out "This package implements"/

};

meta = {
description = "An immutable mapping type for Python.";
Copy link
Member

Choose a reason for hiding this comment

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

@dotlambda
Copy link
Member

@GrahamcOfBorg build python3.pkgs.immutables python3.pkgs.contextvars

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3.pkgs.immutables, python3.pkgs.contextvars

Partial log (click to expand)

test_context_var_new_1 (test_basics.ContextTest) ... ok
test_context_var_new_2 (test_basics.ContextTest) ... ok
test_context_var_repr_1 (test_basics.ContextTest) ... ok

----------------------------------------------------------------------
Ran 21 tests in 0.367s

OK
/nix/store/ba6lvyfaxnc4jzlbgp886lm1g3gqw6zg-python3.6-immutables-0.5
/nix/store/dmgpxf4v7bhkhxa96zbk5190z8954syw-python3.6-contextvars-2.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python3.pkgs.immutables, python3.pkgs.contextvars

Partial log (click to expand)

test_context_var_new_1 (test_basics.ContextTest) ... ok
test_context_var_new_2 (test_basics.ContextTest) ... ok
test_context_var_repr_1 (test_basics.ContextTest) ... ok

----------------------------------------------------------------------
Ran 21 tests in 0.354s

OK
/nix/store/bgqb5xb3fzja8hw7sxp3xi65cgjjcz9s-python3.6-immutables-0.5
/nix/store/w6js1jzdszyqaxbvvdkdjlsls31fkx9n-python3.6-contextvars-2.2

@dotlambda dotlambda merged commit 188fdf5 into NixOS:master May 11, 2018
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

4 participants