Skip to content

fix(regexopt): Fix os.path.commonprefix deprecation warning in python3.15#3040

Merged
birkenfeld merged 1 commit into
pygments:masterfrom
lambda-abstraction:master
Feb 20, 2026
Merged

fix(regexopt): Fix os.path.commonprefix deprecation warning in python3.15#3040
birkenfeld merged 1 commit into
pygments:masterfrom
lambda-abstraction:master

Conversation

@lambda-abstraction

Copy link
Copy Markdown
Contributor

python/cpython#144436 deprecates os.path.commonprefix in 3.15

i copied the implementation of commonprefix (https://github.com/python/cpython/blob/957f9fe162398fceeaa9ddba8b40046b8a03176d/Lib/genericpath.py#L115-L129) and removed the unused fspath, as its only used with strings, not paths

@birkenfeld

Copy link
Copy Markdown
Member

LGTM, thanks!

@birkenfeld birkenfeld merged commit 52ce77b into pygments:master Feb 20, 2026
29 of 30 checks passed
@Anteru Anteru added this to the 2.20.0 milestone Mar 26, 2026
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