Skip to content

Commit

Permalink
Remove Python 3.7 compatibility from py310compat
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jul 8, 2023
1 parent 702d949 commit 4269d27
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zipp/py310compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import io


te_impl = 'lambda encoding, stacklevel=2, /: encoding'
te_impl_37 = te_impl.replace(', /', '')
_text_encoding = eval(te_impl) if sys.version_info > (3, 8) else eval(te_impl_37)
def _text_encoding(encoding, stacklevel=2, /):

This comment has been minimized.

Copy link
@jmauriciosalasmoreno

jmauriciosalasmoreno Jul 11, 2023

Hi @jaraco. I'm not even proficient on Python, but I think there is a syntax error on the third parameter.
Used an online tool to validate it, can you please confirm?

image

This comment has been minimized.

Copy link
@jaraco

jaraco Jul 11, 2023

Author Owner

The CI passes and does cover that file. What version of Python do you have? That change intentionally dropped support for Python 3.7, so I'm guessing you're on Python 3.7, which is end of life. Just use zipp<3.16 (which should happen automatically if you're using a modern installer that honors the python_requires directive).

This comment has been minimized.

Copy link
@jmauriciosalasmoreno

jmauriciosalasmoreno Jul 11, 2023

Yes, I pinned 3.15, and it is py 3.7

It called out my attention even the online tool spotted the Syntax Error. But it is fine, just wanted to make sure it was on purpose and it is not affecting all other users.

thanks for confirming

return encoding


text_encoding = (
Expand Down

0 comments on commit 4269d27

Please sign in to comment.