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

python3Packages.yowsup: 2.5.2 -> 2.5.7 #39926

Merged
merged 1 commit into from May 4, 2018
Merged

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented May 3, 2018

Motivation for this change

The latest update of yowsup (https://github.com/tgalal/yowsup/releases/tag/v2.5.7)
contains the following fixes:

The argparse-dependency.patch required a rebase onto the latest
version of setup.py and ensures that argparse won't be needed as
extra dependency as our python3 package ships argparse by default.

A short note to Python 2 support:

the actual issue related to Python 2.x support has been resolved
(tgalal/yowsup#2325 (comment)),
however this relies on six==1.10 which isn't support by nixpkgs as
six has been bumped to 1.11. When trying to inject a patched version
of our six package based on six==1.10 you'll run into issues with
duplicated libraries in your closure as further build dependencies
(pytest in this case) use the latest six version. As Python 2.7 will
die in 2020 (https://pythonclock.org/) and patching around in the
dependencies of pytest to get yowsup running isn't worth the effort
in my opinion I decided to keep the Python 2.x build disabled for now.

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.

@@ -5,7 +5,7 @@
buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

drop this line

@dotlambda
Copy link
Member

Even if yowsup pins six==1.10 it might work just fine with 1.11. Did you try simply dropping the version pinning?

@Ma27
Copy link
Member Author

Ma27 commented May 4, 2018

the following comment contains several resources that explain the issue: tgalal/yowsup#2416 (comment)

Unfortunately the combination of six==1.11 and Python 2.7 breaks the test suite and the binary.
Unless we use six==1.10 for this package (which might require a certain amount of effort as explained in the commit message) I think that the easiest solution might be to keep Python 2.7 disabled for now.

pname = "yowsup";
version = "2.5.2";
version = "2.5.7";

# python2 is currently incompatible with yowsup:
# https://github.com/tgalal/yowsup/issues/2325#issuecomment-343516519
Copy link
Member

Choose a reason for hiding this comment

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

Could you please update this message so it mentions the six==1.11 incompatibility?

The latest update of `yowsup` (https://github.com/tgalal/yowsup/releases/tag/v2.5.7)
contains the following fixes:

* Updated tokens
* Fixed tgalal/yowsup#1842: Bug in protocol_groups RemoveGroupsNotificationProtocolEntity
* Other minor bug fixes

The `argparse-dependency.patch` required a rebase onto the latest
version of `setup.py` and ensures that `argparse` won't be needed as
extra dependency as our `python3` package ships `argparse` by default.

A short note to Python 2 support:

the actual issue related to Python 2.x support has been resolved
(tgalal/yowsup#2325 (comment)),
however this relies on `six==1.10` which isn't support by `nixpkgs` as
`six` has been bumped to `1.11`. When trying to inject a patched version
of our `six` package based on `six==1.10` you'll run into issues with
duplicated libraries in your closure as further build dependencies
(`pytest` in this case) use the latest `six` version. As Python 2.7 will
die in 2020 (https://pythonclock.org/) and patching around in the
dependencies of `pytest` to get `yowsup` running isn't worth the effort
in my opinion I decided to keep the Python 2.x build disabled for now.
@Ma27
Copy link
Member Author

Ma27 commented May 4, 2018

@dotlambda done :-)

@Ma27
Copy link
Member Author

Ma27 commented May 4, 2018

ping @dotlambda

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.yowsup python3.pkgs.yowsup

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python3.pkgs.yowsup

The following builds were skipped because they don't evaluate on x86_64-linux: python2.pkgs.yowsup

Partial log (click to expand)

.                                                                        [ 95%]
yowsup/layers/protocol_profiles/protocolentities/test_iq_status_set.py . [ 95%]
.                                                                        [ 96%]
yowsup/layers/protocol_profiles/protocolentities/test_iq_unregister.py . [ 97%]
.                                                                        [ 98%]
yowsup/layers/protocol_receipts/protocolentities/test_receipt_incoming.py . [ 99%]
                                                                         [ 99%]
yowsup/layers/protocol_receipts/protocolentities/test_receipt_outgoing.py . [100%]

========================== 124 passed in 1.06 seconds ==========================

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python3.pkgs.yowsup

The following builds were skipped because they don't evaluate on aarch64-linux: python2.pkgs.yowsup

Partial log (click to expand)

yowsup/layers/protocol_profiles/protocolentities/test_iq_status_set.py . [ 95%]
.                                                                        [ 96%]
yowsup/layers/protocol_profiles/protocolentities/test_iq_unregister.py . [ 97%]
.                                                                        [ 98%]
yowsup/layers/protocol_receipts/protocolentities/test_receipt_incoming.py . [ 99%]
                                                                         [ 99%]
yowsup/layers/protocol_receipts/protocolentities/test_receipt_outgoing.py . [100%]

========================== 124 passed in 4.91 seconds ==========================
/nix/store/vlikb0pakx9g7r8gm7fjqal77l7w66kp-python3.6-yowsup-2.5.7

@dotlambda dotlambda merged commit f79e0fc into NixOS:master May 4, 2018
@Ma27 Ma27 deleted the update-yowsup branch May 4, 2018 21:09
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.

TypeError: 'RemoveGroupsNotificationProtocolEntity' object has no attribute '__getitem__'
3 participants