anancarv / python-artifactory

Typed interactions with the Jfrog Artifactory REST API
MIT License
60 stars 51 forks source link

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

Closed Tpt closed 1 month ago

Tpt commented 1 month ago

Thank you for your great library!

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

anancarv commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

art = Artifactory(url="ARTIFACTORY_URL", auth=('USERNAME','PASSWORD_OR_API_KEY'), verify=False)
Tpt commented 1 month ago

Thank you! It's what I already did.

anancarv commented 1 month ago

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

anancarv commented 1 month ago

The issue is fixed in the new version v2.7.1