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 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 veprbl requested a review from pingiun May 3, 2020 19:32
@jonringer
Copy link
Contributor

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

@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 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
@veprbl veprbl deleted the pr/ptb_fixes branch May 3, 2020 21:46
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

2 participants