Separate collections from collections.abc#4501
Separate collections from collections.abc#4501nateprewitt merged 1 commit intopsf:masterfrom rhettinger:master
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4501 +/- ##
==========================================
- Coverage 90.18% 90.15% -0.03%
==========================================
Files 15 15
Lines 1548 1544 -4
==========================================
- Hits 1396 1392 -4
Misses 152 152
Continue to review full report at Codecov.
|
nateprewitt
left a comment
There was a problem hiding this comment.
Hi @rhettinger, thanks for contributing to Requests! This looks like it will resolve #4494 by fixing the namespace deprecation for Python 3.7. I'd like another maintainer to approve this PR before merging, but I believe this looks good from my end.
| from http.cookies import Morsel | ||
| from io import StringIO | ||
| from collections import OrderedDict | ||
| from collections.abc import Callable, Mapping, MutableMapping |
There was a problem hiding this comment.
@rhettinger on which versions of Python 3 will this actually succeed on? It was my impression that collections.abc was introduced in 3.6 or 3.7.
There was a problem hiding this comment.
@sigmavirus24 I'd tested it back to 3.4 without issue, so I think this should work.
There was a problem hiding this comment.
This works back to Python 3.3.
|
This branch is also out-of-date with master and will need to be updated |
|
Hey @rhettinger, would you mind rebasing this onto current master? Assuming @sigmavirus24 doesn't have further issues, I think we're set to merge this. |
In Python 3.7, there is a warning that the abstract bases in collections.abc will no longer be accessible through the regular collections module in Python 3.8. This patch future-proofs requests.
I wasn't able to run the test suite locally, so this needs a thorough test going forward.