-
Notifications
You must be signed in to change notification settings - Fork 148
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
Allow cases in ArtifactoryPath.glob() pattern #429
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit concerned about scenarios that rely on this behavior right now...
But overall it looks reasonable to fix that.
Thank you for the contribution!
I think it is a backwards incompatible change. Can we provide an option for case sensitive/insensitive? |
The problem is that The current implementation clearly has a bug - default May be we can make introduce some flag for that in ArtifactoryPath, warning if it has default value and later we can switch it to # By default, to keep the current behavior
ArtifactoryPath.GLOB_CASE_SENSITIVE = None
if ArtifactoryPath.GLOB_CASE_SENSITIVE is None:
warning("It's bug, not a feature, please either set GLOB_CASE_SENSITIVE to False explicitly or it'll change to Case Sensitive glob in 0.11 release")
sensitive = GLOB_CASE_SENSITIVE is True
# call right glob @dogbert911 @beliaev-maksim what do you think about it? |
I think I am good with proposal However, based on semantic versioning we need to make breaking changes only in major bump, eg 1.x.x |
@allburov Feel free to modify this PR as you need. |
According to semver, breaking changes can be made in minor versions when the major version is
I do agree (as someone with a project that heavily depends on this one) that it would be better to announce/warn for at least 1 release before making the change. We may also want to consider that if we're quite worried about backward compatibility, perhaps we should be at major version 1 already.
|
Let's release |
I might recommend releasing But I'd be fine with |
It is supported in this PR, python/cpython#102710 |
Alternative way We can introduce module variable, eg Add deprecation warning if user doesn't update the value In two versions from now we change the defaults |
👍 for adding it on class, so people can use both variances in the same code and compare the results # by default - let's use explicitly False
ArtifactoryPath.GLOB_CASE_SENSITIVE = False
path_with_case_insensitive = ArtifactoryPath()
path_with_case_sensitive = ArtifactoryPath()
path_with_case_sensitive.GLOB_CASE_SENSITIVE = True |
Issue #428