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

v2.7.0 broke backward compatibility of the Artifactory constructor #197

Closed
Tpt opened this issue Sep 23, 2024 · 6 comments · Fixed by #198
Closed

v2.7.0 broke backward compatibility of the Artifactory constructor #197

Tpt opened this issue Sep 23, 2024 · 6 comments · Fixed by #198
Labels
bug Something isn't working

Comments

@Tpt
Copy link

Tpt commented Sep 23, 2024

Thank you for your great library!

Sadly, it seems to me commit 210e3aa shipped in v2.7.0 added a new parameter (access_token) in the middle of the Artifactory class constructor, breaking backward compatibility.

@Tpt Tpt added the bug Something isn't working label Sep 23, 2024
@anancarv
Copy link
Owner

Thank you for your great library!

Sadly, it seems to me commit 210e3aa shipped in v2.7.0 added a new parameter (access_token) in the middle of the Artifactory class constructor, breaking backward compatibility.

Hey @Tpt,
Can you please provide more details or some logs. The access_token param is Optional and should default to None is not set.

@Tpt
Copy link
Author

Tpt commented Sep 23, 2024

Sure!

In pyartifactory 2.6, one could instantiate with an Artifactory object with Artifactory(MY_URL, MY_AUTH, False) to disable the "verify" option. This call will fail in 2.7 because the 3 argument is now access_token and not verify anymore, leading to the assignation of False to access_token.

@anancarv
Copy link
Owner

Ahh I see, I suggest you to use keyword arguments instead of positional arguments. In other words, you can do:

art = Artifactory(url="ARTIFACTORY_URL", auth=('USERNAME','PASSWORD_OR_API_KEY'), verify=False)

@Tpt
Copy link
Author

Tpt commented Sep 23, 2024

Thank you! It's what I already did.

@anancarv
Copy link
Owner

anancarv commented Sep 23, 2024

Thanks for pointing it out. I'll create a MR to fix that positional argument issue.

@anancarv
Copy link
Owner

The issue is fixed in the new version v2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants