-
Notifications
You must be signed in to change notification settings - Fork 62
Deprecate the usage of -> instead of . for objects that are not pointers #811
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
Conversation
|
Yes! Some time ago we discussed we don't want it in common collection interface and it's mostly for historical reasons |
tmadlener
left a comment
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.
Curious that this is only in place for the collections. I thought we also had this for the handles, but I couldn't find it.
|
The deprecation seems to generate a lot of warnings in python scripts. Reproducer: import podio
import edm4hep
frame = podio.Frame()
particles = frame.put(edm4hep.MCParticleCollection(), "MCParticleCollection")and the warnings: |
|
Does this script still work with #812 in place? If yes, then we could make a tag and merge that one after that. |
|
I can't reproduce this with my local stack, where the only obvious major difference is the python version. I can however reproduce this on the nightlies. Building #812 and then EDM4hep on top of the nightlies keeps the script working without the warnings. AFAIU this the PRs mentioned at the top comment are all "backwards" compatible, i.e. they will keep working with a new podio tag and will work on older podio tags as well. The previous versions however might stop working with #812 merged. |
|
@wdconinc @nathanwbrei I don't think you will have any issues with it, but just as a heads up to look out for some potential deprecation warnings when switching to podio@1.4 |
…ers (AIDASoft#811) * Deprecate operator-> for objects that are not pointers * Fix the deprecation warning in podio --------- Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
-> was deprecated in AIDASoft/podio#811 (v1.4 of Podio) and removed in AIDASoft/podio#812 (v1.5 of Podio). Note that . always works for any version.
This is necessary to build with podio >= 1.5, but will work for all older versions of podio regardless. Deprecated in AIDASoft/podio#811 Removed in AIDASoft/podio#812
-> was deprecated in AIDASoft/podio#811 (v1.4 of Podio) and removed in AIDASoft/podio#812 (v1.5 of Podio). Note that . always works for any version.
-> was deprecated in AIDASoft/podio#811 (v1.4 of Podio) and removed in AIDASoft/podio#812 (v1.5 of Podio). Note that . always works for any version.
An issue in python (wlav/cppyy#312) where a
RecursionErroris thrown seems to happen because we have anoperator->for collections. Regardless of that, I think it doesn't fit with the rest of podio and should be removed. I have made a few PRs not to use this:BEGINRELEASENOTES
operator->for collections which made them usable as if they were pointers even when dealing with regular values..instead of->when working with (non-pointer) collections.ENDRELEASENOTES