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

Avoid duplicate dependency on requests #448

Merged
merged 1 commit into from
Jul 18, 2018
Merged

Avoid duplicate dependency on requests #448

merged 1 commit into from
Jul 18, 2018

Conversation

jleclanche
Copy link
Contributor

The duplicate dependency is causing issues with pip on Python 2.7.

Context:

Fixes #447


Testing this:

  • Ran pip install . in a python2.7 virtualenv in the root stripe-python folder
  • Verified python2.7 -c "import requests" does not crash
  • Installed pipdeptree and verified requests is not showing up twice:
pipdeptree==0.13.0
  - pip [required: >=6.0.0, installed: 10.0.1]
pyOpenSSL==18.0.0
  - cryptography [required: >=2.2.1, installed: 2.2.2]
    - asn1crypto [required: >=0.21.0, installed: 0.24.0]
    - cffi [required: >=1.7, installed: 1.11.5]
      - pycparser [required: Any, installed: 2.18]
    - enum34 [required: Any, installed: 1.1.6]
    - idna [required: >=2.1, installed: 2.7]
    - ipaddress [required: Any, installed: 1.0.22]
    - six [required: >=1.4.1, installed: 1.11.0]
  - six [required: >=1.5.2, installed: 1.11.0]
setuptools==40.0.0
stripe==2.0.1
  - requests [required: >=2, installed: 2.19.1]
    - certifi [required: >=2017.4.17, installed: 2018.4.16]
    - chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
    - idna [required: >=2.5,<2.8, installed: 2.7]
    - urllib3 [required: >=1.21.1,<1.24, installed: 1.23]
wheel==0.31.1

Copy link
Contributor

@ob-stripe ob-stripe left a comment

Choose a reason for hiding this comment

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

Left a minor comment. Thanks for the report and the PR @jleclanche! Great work as usual.

setup.py Outdated
@@ -44,7 +44,7 @@ def run_tests(self):
package_data={'stripe': ['data/ca-certificates.crt']},
zip_safe=False,
install_requires=[
'requests >= 2',
'requests >= 2; python_version > "3.0"',
Copy link
Contributor

Choose a reason for hiding this comment

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

Super minor nit, but could you change the condition to use >= instead of >?

We don't support Python 3.0 so this doesn't really change anything, but it bothers me that this implies that if 3.0 were supported, then requests would not be necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

The duplicate dependency is causing issues with pip on Python 2.7.

Context:
- #447
- pypa/pip#4957

Fixes #447
@ob-stripe ob-stripe merged commit 4201f3e into stripe:master Jul 18, 2018
@ob-stripe
Copy link
Contributor

Released as 2.0.2. Thanks again @jleclanche :)

@jleclanche
Copy link
Contributor Author

🤔 I just finished working around this issue.

Thanks for the release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants