Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pattern group didn't match ~= #1425

Closed
sko00o opened this issue Jan 9, 2025 · 2 comments
Closed

pattern group didn't match ~= #1425

sko00o opened this issue Jan 9, 2025 · 2 comments

Comments

@sko00o
Copy link
Contributor

sko00o commented Jan 9, 2025

I think there is a bug in latest commit of glob.manager_core.is_installed:

pattern = r'([^<>!=]+)([<>!=]=?)([0-9.a-zA-Z]*)'

if match.group(2) == '~=':

Plz run this simple test:

import re
pattern = r'([^<>!=]+)([<>!=]=?)([0-9.a-zA-Z]*)'
name = 'diffusers~=0.21.4'
match = re.search(pattern, name)
print(match.group(2))
# =

same issue: #1301

@ltdrdata
Copy link
Owner

This is fixed.

@sko00o
Copy link
Contributor Author

sko00o commented Jan 12, 2025

I'm so sorry.
But this issue has not been fixed.

The main problem is the wrong pattern.

- r'([^<>!=]+)([<>!=]=?)([0-9.a-zA-Z]*)'
+ r'([^<>!~=]+)([<>!~=]=?)([0-9.a-zA-Z]*)'

I want to create a PR to fix this.

@sko00o sko00o mentioned this issue Jan 12, 2025
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

No branches or pull requests

2 participants