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.python-telegram-bot: fix --with-upstream-urllib3 #86668

Merged
merged 2 commits into from May 3, 2020

Conversation

@veprbl
Copy link
Member

veprbl commented May 3, 2020

Motivation for this change

Fixes to #86652

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
veprbl added 2 commits May 3, 2020
…erly, add workaround
@veprbl veprbl requested review from FRidh and jonringer as code owners May 3, 2020
@ofborg ofborg bot added the 6.topic: python label May 3, 2020
@veprbl veprbl requested a review from pingiun May 3, 2020
@jonringer
Copy link
Contributor

jonringer commented May 3, 2020

is there a way to add some testing around this?

@veprbl
Copy link
Member Author

veprbl commented May 3, 2020

@jonringer You can catch the warning:

python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers.
@jonringer
Copy link
Contributor

jonringer commented May 3, 2020

I don't use the package, so I don't have any strong feeling about it's runtime behaviors, but it seems like this is an improvement. :)

@veprbl
Copy link
Member Author

veprbl commented May 3, 2020

I did check that the packages list is indeed pruned now, I tried replacing 'telegram.vendor.ptb_urllib3' with 'telegram.vendor', but would still get installed and imported.

@jonringer
Copy link
Contributor

jonringer commented May 3, 2020

@jonringer Any idea about why upstream is broken https://github.com/python-telegram-bot/python-telegram-bot/blob/5898e1fe7a08c0ef5aa4e69af9090a81a2c34af8/setup.py#L22-L30 ?

seeing as that was done 3 years ago, I'm assuming they had some difficulties with urllib3 breaking them. So they decided to vendor it

@veprbl
Copy link
Member Author

veprbl commented May 3, 2020

Looks like this is some interplay between what is in the "python_telegram_bot.egg-info" of the PyPi package and include_package_data=True, option, which makes it install things that are not listed in MANIFEST.in. Not sure how to fix this.

@veprbl veprbl merged commit e43ac9e into NixOS:master May 3, 2020
14 checks passed
14 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="cc97e9d"; rev="cc97e9d7f0d89aaf75d6d9e1394d8d7dc18f9b83"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@veprbl veprbl deleted the veprbl:pr/ptb_fixes branch May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.