Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Use argparse standard lib #82

Merged
merged 1 commit into from
Apr 24, 2017
Merged

Conversation

JamshedVesuna
Copy link
Contributor

@JamshedVesuna JamshedVesuna commented Nov 25, 2016

The argparse library on pypi has been deprecated and moved to the standard library:

argparse development happens in the python standard library nowadays, NOT HERE.

Source: argparse README

The primary use for the PyPi version of argparse is for older versions of Python:

The PyPi argparse package is mostly for people who want to have argparse on
older Pythons, like < 2.7 or < 3.2 because it was not in stdlib back then.

However, codecov-python does not support these versions.

@JamshedVesuna
Copy link
Contributor Author

Just a friendly bump 😄 . This would be useful for those over Python3.2.

Copy link

@AraHaan AraHaan left a comment

Choose a reason for hiding this comment

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

I would go with something like

if sys.version_info > (3, 2) or sys.version_ifo < (2, 7):
    install_requires=["requests>=2.7.9", "coverage"],
else:
    install_requires=["requests>=2.7.9", "coverage", "argparse"],

This would be a much better way for this so that way it does not break for versions before 2.7.

@AraHaan
Copy link

AraHaan commented Mar 22, 2017

aww wrong button...

Copy link

@AraHaan AraHaan left a comment

Choose a reason for hiding this comment

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

I would go with something like

if sys.version_info > (3, 2) or sys.version_info < (2, 7):
    install_requires=["requests>=2.7.9", "coverage"],
else:
    install_requires=["requests>=2.7.9", "coverage", "argparse"],

This would be a much better way for this so that way it does not break for versions before 2.7.

And if they does not work in python and produces an traceback then this will for sure work:

if sys.version_info > (3, 2) or sys.version_info < (2, 7):
    install_requires=["requests>=2.7.9", "coverage"]
else:
    install_requires=["requests>=2.7.9", "coverage", "argparse"]

 setup(name='codecov',
       version=version,
       description="Hosted coverage reports for Github, Bitbucket and Gitlab",
       long_description=None,
       classifiers=classifiers,
       keywords='coverage codecov code python java scala php',
       author='@codecov',
       author_email='hello@codecov.io',
       url='http://github.com/codecov/codecov-python',
       license='http://www.apache.org/licenses/LICENSE-2.0',
        packages=['codecov'],
        include_package_data=True,
        zip_safe=True,
        install_requires=install_requires,
        tests_require=["unittest2"],
        entry_points={'console_scripts': ['codecov=codecov:main']})

@codecov
Copy link

codecov bot commented Mar 22, 2017

Codecov Report

Merging #82 into master will decrease coverage by 3%.
The diff coverage is n/a.

@@         Coverage Diff          @@
##           master   #82   +/-   ##
====================================
- Coverage      78%   75%   -4%     
====================================
  Files           2     2           
  Lines         349   348    -1     
  Branches       81    77    -4     
====================================
- Hits          275   263   -12     
- Misses         51    60    +9     
- Partials       23    25    +2

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b29277...642bcb3. Read the comment docs.

@JamshedVesuna
Copy link
Contributor Author

Good idea. Updated.

@AraHaan
Copy link

AraHaan commented Mar 22, 2017

Those CI failures.

@stevepeak
Copy link
Contributor

Thank you 👍

@stevepeak stevepeak merged commit 04486e2 into codecov:master Apr 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants