PEP 484: Remove statement about unicode, in the python2.7 section.#302
Conversation
See python/typing#418 (comment). Let's leave it up to type-checkers whether they want `unicode`, in Python 2 code, to mean "only unicode" or "str or unicode".
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
Signed the CLA. |
|
@matthiaskramm You haven't added your GitHub username to your bugs.python.org account yet. |
|
I have, actually. |
|
Hang on, looks like I got an error email back from that
I'll try again, if needed with a different username. |
|
Added my GitHub username to bugs.python.org. |
|
Found the account, but now you have a new bugs.python.org account which has not signed the CLA. Can you sign it again quickly with the new bugs.python.org account you just created? |
|
Done. |
|
And now the CLA bot is happy. 😉 |
|
Yay! :) Thanks for digging through the user database for me. |
|
@matthiaskramm quite welcome! Just glad we eventually got it resolved. I've asked @gvanrossum to review this to make sure the wording change is okay. |
gvanrossum
left a comment
There was a problem hiding this comment.
We're not likely to change this in mypy, but this compromise sounds good to me.
| ``long`` types as equivalent. For parameters typed as ``unicode`` or | ||
| ``Text``, arguments of type ``str`` should be acceptable. | ||
| ``long`` types as equivalent. For parameters typed as ``Text``, arguments of | ||
| both ``str`` and ``unicode`` should be acceptable. |
There was a problem hiding this comment.
This is missing the word "types" somewhere. Maybe change "both" into "types"?
There was a problem hiding this comment.
Adjusted the wording.
This documents, among others, the unicode -> Union[bytes, unicode] promotion that python/peps#302 removes from PEP 484.
See python/typing#418 (comment).
Let's leave it up to type-checkers whether they want
unicode, in Python 2 code, to mean "only unicode" or "str or unicode".