-
Notifications
You must be signed in to change notification settings - Fork 137
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
Add Python 3.7 support and enable testing #228
Conversation
|
||
# Since Python 3.7, the value for a non-file field is now a list | ||
# of strings, not bytes. | ||
if sys.version_info >= (3, 7): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I should use twisted.python.compat._PY37PLUS
. The symbol is unavailable until twisted 18.7.0 - twisted/twisted@9736e68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not; it's private API.
- Dynamically generated allow_failures list - Use Twisted 18.7.0 or newer on Python 3.7
Codecov Report
@@ Coverage Diff @@
## master #228 +/- ##
==========================================
+ Coverage 98.86% 98.86% +<.01%
==========================================
Files 26 26
Lines 2282 2285 +3
Branches 164 165 +1
==========================================
+ Hits 2256 2259 +3
Misses 14 14
Partials 12 12
Continue to review full report at Codecov.
|
In |
Thanks for the reminder! |
Update: apparently the CONTENT-LENGTH issue is a CPython bug, and a fix was proposed in python/cpython#8530. Hopefully that PR can be included in the upcoming 3.7.1 release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this. The future is now!
https://build.opensuse.org/request/show/788271 by user scarabeus_iv + dimstar_suse - version update to 20.3.0 - Python 3.7 support. (`#228 <https://github.com/twisted/treq/issues/228>`__) - `treq.testing.RequestTraversalAgent` now passes its memory reactor to the `twisted.web.server.Site` it creates, preventing the ``Site`` from polluting the global reactor. (`#225 <https://github.com/twisted/treq/issues/225>`__) - `treq.testing` no longer generates deprecation warnings about ``twisted.test.proto_helpers.MemoryReactor``. (`#253 <https://github.com/twisted/treq/issues/253>`__) - The ``download_file.py`` example has been updated to do a streaming download with *unbuffered=True*. (`#233 <https://github.com/twisted/treq/issues/233>`__) - The *agent* parameter to `treq.request()` has been documented. (`#235 <https://github.com/twisted/treq/issues/235>`__) - The typ
"CONTENT-LENGTH" is an undocumented new requirement in Python 3.7. I've asked upstream to clarify that - https://bugs.python.org/issue34226. There's a similar fix for twisted at twisted/twisted@aa601a9