liormizr / s3path

s3path is a pathlib extension for AWS S3 Service
Apache License 2.0
206 stars 39 forks source link

Broken in Python 3.11 #112

Closed sbrandtb closed 1 year ago

sbrandtb commented 1 year ago
/usr/local/lib/python3.11/site-packages/s3path.py:12: in <module>
    from pathlib import _PosixFlavour, _Accessor, PurePath, Path
E   ImportError: cannot import name '_Accessor' from 'pathlib' (/usr/local/lib/python3.11/pathlib.py)

The Accessor implementation was dropped and S3path needs to support the new way of things :disappointed:

liormizr commented 1 year ago

Yes yes :-/ I so that, Thanks @sbrandtb

Now the question is what to do Create a special version for python 3.11 and up or create to versions of the same class in the same version to support all versions :scream:

Actually I think that it's good to remove the accessor layer but ...

cooperlees commented 1 year ago

I feel you will have to gate code with checks of sys.version_info >= (3, 11) or something along the lines ...

It's probably also fine to start to dropping older versions. 3.6 is EOL and 3.7 is EOL in 6 months.

liormizr commented 1 year ago

Release in Version 0.4.0

four43 commented 1 year ago

@liormizr thanks so much for all the updates! Does v0.4.0 close this issue with Python 3.11?

cooperlees commented 1 year ago

bandersnatch's CI confirms this works for it's use case - Many thanks!

liormizr commented 1 year ago

@four43 yes, version 0.4.0 support Python 3.11 Thanks to @Darkheir

four43 commented 1 year ago

Nice! Thank you all! It's appreciated

sbrandtb commented 1 year ago

Thanks a lot! Works like a charm and I could finally update my biggest project to 3.11 😄

Darkheir commented 1 year ago

Thanks a lot! Works like a charm and I could finally update my biggest project to 3.11 smile

Thanks a lot for your feedback, I'm glad it helped other people :)

I tested it on several of my projects and I didn't see any issue, but it doesn't coverall the possible usage so it is cool to see other people that tested it !