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

Add Python 3.7 support and enable testing #228

Merged
merged 3 commits into from
Aug 27, 2018
Merged

Add Python 3.7 support and enable testing #228

merged 3 commits into from
Aug 27, 2018

Conversation

yan12125
Copy link
Contributor

"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


# 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):
Copy link
Contributor Author

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

Copy link
Member

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
Copy link

codecov bot commented Jul 26, 2018

Codecov Report

Merging #228 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/treq/test/test_multipart.py 97.74% <100%> (+0.03%) ⬆️

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 0041d5d...369887f. Read the comment docs.

@rodrigc
Copy link

rodrigc commented Jul 26, 2018

In setup.py, you might want to bump up the twisted version which is listed as a dependency.

@yan12125
Copy link
Contributor Author

In setup.py, you might want to bump up the twisted version which is listed as a dependency.

Thanks for the reminder!

@yan12125
Copy link
Contributor Author

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.

Copy link
Member

@glyph glyph left a 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!

@glyph glyph merged commit 2d45c82 into twisted:master Aug 27, 2018
@yan12125 yan12125 deleted the py37 branch August 27, 2018 12:21
twm added a commit to twm/treq that referenced this pull request Mar 15, 2020
@twm twm mentioned this pull request Mar 15, 2020
bmwiedemann added a commit to bmwiedemann/openSUSE that referenced this pull request Mar 25, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants