-
Notifications
You must be signed in to change notification settings - Fork 8
Handle changes from Cython 3.0 #47
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingecosystemIssues arising from interactions with the broader Python packaging ecosystemIssues arising from interactions with the broader Python packaging ecosystem
Milestone
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingecosystemIssues arising from interactions with the broader Python packaging ecosystemIssues arising from interactions with the broader Python packaging ecosystem
Type
Fields
Give feedbackNo fields configured for issues without a type.
In updating one of my development environments, I discovered that Cython has released version 3.0 after our 2.0.1.post1 release. This exposes a few issues (none of which are fatal) with our implementation:
While we were getting a warning about using a deprecated NumPy API under Cython 0.29, Cython 3.0 now makes it possible to remove the warning. Use the migration guide to update the build appropriately.
It appears that Cython 3.0 deprecated the "
DEF" statement (Deprecate conditional compilation cython/cython#4310). This affects thesbdf.pyxmodule, but only for the static constants used to process dates, times, and decimal values. Refactor this usage to avoid triggering the (currently) warning.Along with the "
DEF" statement, the "IF" statement used to conditionalize the platform-specific code incodesign.pyxandcabfile.pyxis now deprecated also. Since the recommended options don't work well for platform-specific code, we need to refactor these modules so that the platform-specific code is in separate files and the conditionality is moved into thesetup.pyscript (making sure to remove the current logic that excludes the generated C files from the distribution and thecython_c_in_tempflag on the Extension objects).It appears that Cython 3.0 has updated exception handling propagation for
cdeffunctions declared withoutexceptclauses. While this should automatically fix part of Issues with Writing Spatial Data in WKB Format to SBDF Files Using export_data Function #44, we should check other uses and either move to using the new "noexcept" clause where exceptions should not be propagated, or remove places where we explicitly added "except *" clauses to force propagation.Fix these issues and update the minimum requirement to Cython 3.0.