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

Bump major version for non-backward compatible API changes #323

Closed
StefanD986 opened this issue Mar 28, 2022 · 7 comments · Fixed by #324
Closed

Bump major version for non-backward compatible API changes #323

StefanD986 opened this issue Mar 28, 2022 · 7 comments · Fixed by #324
Labels
bug Something isn't working
Milestone

Comments

@StefanD986
Copy link

I saw in the code that some methods are deprecated in 1.3.5 with the comment stating that they will be removed in 1.4.0. If they are indeed removed in harvesters 1.4.x would not be backward compatible with code that used harvesters 1.3.x.

I am not sure whether Harvesters follows semantic versioning guidelines, but if indeed it is, then technically a non-backwards compatible change in the API should cause a bump of the major version number (=> bump to 2.x).

Otherwise this might cause some surprise in projects that depend on Harvesters and pinned the version to 1.x to allow for feature upgrades but prevent accidental breaking updates.

@StefanD986
Copy link
Author

I actually see now that 1.3.5 already has some breaking API changes (e.g. signature of the Harvester constructor changed from keyword arguments for the logger to taking a config ParameterSet instead.

@Gornoka
Copy link

Gornoka commented Mar 28, 2022

1.3.4 (maybe even 1.3.3) also had some Breaking changes regarding Exception names.
IIRC the Timeout exception now does not exist but throws a different generic exceptions. However importing the old timeout exception is no longer possible and therefore breaks all old code that tried to manually handle it.
The following line used to work but now breaks with an ImportError.
from genicam.gentl import TimeoutException, GenericException, NotAvailableException

It would be very cool to know whether harvesters does not intend to follow semver or if this has just been a small oversight.

@kazunarikudo
Copy link
Member

@StefanD986 Hi Stefan, thank you for giving me an opportunity to learn about semantic versioning. It is true that 1.3.4 and 1.3.5 contain changes that break backward incompatibility so I am planning to yank the 1.3.5 package from PyPI and release 1.3.6 that gets the dropped ones back.

@kazunarikudo
Copy link
Member

@Gornoka Hi,

from genicam.gentl import TimeoutException, GenericException, NotAvailableException

Do you mean the line above can cause the ImportError? Could you show me the output from:

  1. pip list, and
  2. The import statement above.

Those exceptions are from genicam package and I have not changed them; at least I have no reason to remove them. Regards, Kazunari.

@kazunarikudo kazunarikudo added the bug Something isn't working label Mar 28, 2022
@kazunarikudo kazunarikudo added this to the 1.3.6 milestone Mar 28, 2022
@kazunarikudo
Copy link
Member

@StefanD986 Hi, I have just pushed the change to the following branch:

https://github.com/genicam/harvesters/tree/323-bump-major-version-for-non-backward-compatible-api-changes

In the branch, I have gotten the dropped public API back; no change in their deprecation status. If you can happy with that, I will merge it into the master and release it as 1.3.6 soon. This is just for your information, version 1.3.5 has been dropped from PyPI. Regards, Kazunari.

@StefanD986
Copy link
Author

Great! I looked through it and tried it with our application and it works again. Thanks for the quick action.

@kazunarikudo
Copy link
Member

@StefanD986 Hi Stefan, thank you for giving that a try, and for giving me an opportunity to bring up the perspective of dependency maintainability into my project. I appreciate that. Regards, Kazunari.

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.

3 participants