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

Deprecate passing invalid keyword arguments #297

Merged
merged 20 commits into from
Oct 10, 2020
Merged

Deprecate passing invalid keyword arguments #297

merged 20 commits into from
Oct 10, 2020

Conversation

twm
Copy link
Contributor

@twm twm commented Sep 30, 2020

This is the first step described in #287.

@twm twm marked this pull request as ready for review September 30, 2020 05:05
@twm twm requested a review from a team September 30, 2020 05:05
Copy link

@ryban ryban left a comment

Choose a reason for hiding this comment

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

LGTM

if json is not _NOTHING:
return (
self._data_to_body_producer(
json_dumps(json, separators=(u',', u':')).encode('utf-8'),
Copy link

Choose a reason for hiding this comment

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

The u strings shouldn't be needed right? They would only make the output unicode in python2, but the encode makes it bytes anyways.

When will treq drop python 2 anyways?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose the u isn't necessary, but I will leave it as-is since I was only moving it.

Treq will probably drop Python 2 once the Twisted release is out. I want to kick out a release with these deprecations first, though.

@twm
Copy link
Contributor Author

twm commented Oct 10, 2020

Thanks for the review @ryban!

@twm twm merged commit d45cad2 into master Oct 10, 2020
@twm twm deleted the 287-invalid-kwargs branch October 10, 2020 01:28
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.

None yet

2 participants