Skip to content

Conversation

@hugovk
Copy link
Contributor

@hugovk hugovk commented Aug 19, 2020

From @pradyunsg in https://discuss.python.org:

Honestly, I think the “best” solution is to make packaging not have dependencies. This would involve dropping pyparsing and six.

Both of them are used only in packaging.requirements . pyparsing is used to generate the parser for PEP 508 requirements. six is used for getting urlib.urlparse.urlparse in a Py2-Py3 compatible way. six should be super easy to drop (PRs welcome!) ...


What's the best way to deal with mypy for the try/except ImportError?

$ pre-commit run --all-files
Check Toml...........................................(no files to check)Skipped
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

packaging/requirements.py:12: error: Name 'urlparse' already defined (by an import)
Found 1 error in 1 file (checked 12 source files)

mypy for Python 2........................................................Failed
- hook id: mypy
- exit code: 1

packaging/requirements.py:10: error: Module 'urllib' has no attribute 'parse'
packaging/requirements.py:12: error: Name 'urlparse' already defined (possibly by an import)
Found 2 errors in 1 file (checked 11 source files)

black....................................................................Passed
flake8...................................................................Passed
check-manifest...........................................................Passed

@hugovk hugovk marked this pull request as draft August 19, 2020 07:00
@hugovk
Copy link
Contributor Author

hugovk commented Aug 19, 2020

Test / macOS / 3.7 (pull_request) failed due to a connection timeout error with pip install

Passed on my fork:

https://github.com/hugovk/packaging/runs/1002137291?check_suite_focus=true

@hugovk hugovk marked this pull request as ready for review August 19, 2020 09:00
@pradyunsg pradyunsg closed this Aug 19, 2020
@pradyunsg pradyunsg reopened this Aug 19, 2020
@brettcannon brettcannon merged commit 39a70cc into pypa:master Aug 19, 2020
@hugovk hugovk deleted the rm-six branch August 19, 2020 19:48
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.

6 participants