Skip to content

Encode paths with os.fsencode()#228

Merged
hkpeprah merged 3 commits into
square:masterfrom
concatime:encode-paths-with-fsencode
Aug 28, 2025
Merged

Encode paths with os.fsencode()#228
hkpeprah merged 3 commits into
square:masterfrom
concatime:encode-paths-with-fsencode

Conversation

@concatime

Copy link
Copy Markdown
Contributor

This way, we can pass Path objects or arbitrary bytes. It also handles invalid UTF-8 paths.

This way, we can pass Path objects or arbitrary bytes.
It also handles invalid UTF-8 paths.
@CLAassistant

CLAassistant commented Mar 23, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@hkpeprah

Copy link
Copy Markdown
Contributor

Thanks for the submission! This makes sense to me after reading the documentation for os.fsencode. Right now we support both Python 2 and Python 3, and this is a Python 3 only API, so I think we have to drop Python 2 support first, which I think makes sense (it's EOL). I'll scope out the necessary changes to drop Python 2 support. In the meantime, could you sign the CLA?

@concatime

Copy link
Copy Markdown
Contributor Author

Hi @hkpeprah. I need to figure out how to deal with the CLA for now. Sorry for the inconvenience.

@concatime

Copy link
Copy Markdown
Contributor Author

CLA signed 👍

@concatime

concatime commented Mar 26, 2025

Copy link
Copy Markdown
Contributor Author

You're right. It's time to drop support for Python 2. Support was dropped more than five years ago! I also noted that in the CI, Python 3.8 and 3.9 are tested. Wouldn't be more relevant if the oldest and newest supported versions were tested instead? So for instance, 3.9 and 3.13.

@hkpeprah

Copy link
Copy Markdown
Contributor

I'll try to get this merged soon'ish. I want to #231 first because that will be a minor release, and will include this change in a major release (non-backwards compatible) where we drop Python 2.

@hkpeprah

Copy link
Copy Markdown
Contributor

Didn't get movement on the other PR, so I will go ahead with this one and figuring out the notes for dropping Python 2.

@hkpeprah

Copy link
Copy Markdown
Contributor

I'll be merging this now and and moving towards a major release with the cut over to Python 3.

@hkpeprah
hkpeprah merged commit d40ac85 into square:master Aug 28, 2025
5 checks passed
@hkpeprah

hkpeprah commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

This has landed in 2.0.0. Sorry for the long delay here.

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.

3 participants