-
Notifications
You must be signed in to change notification settings - Fork 367
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
FIX: Deepcopy of CRS with str/epsg #2356
Conversation
The minimum packages run failed, and now I see pyproj has a related bug that was fixed in version 3.2.0 (pyproj4/pyproj#901). Would bumping the minimum version from 3.1.0 to 3.2.0 be okay? |
Yes, I think that should be fine, we've been trying to do roughly 2 years for dependencies and that was released in 2021. |
234c44e
to
614a78a
Compare
Okay, I test locally and v3.3.1 is actually minimum needed for this, and have pushed a new update. |
I'm happy to go with Proj 3.3.1 since that's at 23 months old. |
614a78a
to
3342177
Compare
I realized that checking if self.proj4_params == {} was a little myopic. That made deepcopy work if the proj4_params input to crs.CRS was a string, but still did not work for a dict. The PR is now updated to handle both cases. pyproj is bumped as before (and one place matplotlib to 3.5 was missed in #2276) As an aside, I also think getstate only needs to pop the _local variable, since it is unpickable, but just left it alone since it works either way. There seem to be intermittent / unrelated failures recently that go away upon re-running (here with windows-latest, 3.9, false), which I do not understand. |
Re-ran a fourth time and all tests are passing this time. |
Rationale
When using initializing crs.CRS with a string, or calling crs.epsg, there are errors when loading from a pickled copy or when performing deepcopy. This PR updates reduce to get those processes working.
Implications
Closes #2042 and the new issue recently reported in #1336
Checklist
Two previously failing cases are added to the crs test fixture.