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

BUG: move weakref-able implementation to base C extension type (fix PyPy) #1577

Merged

Conversation

jorisvandenbossche
Copy link
Member

Closes #1575

I haven't yet checked if this actually fixes it on PyPy, but it's a potential fix for the issue. My understanding is that on PyPy also extension types defined in C support weakref by default, so therefore adding this manually in the subclasses as we did here is failing (https://foss.heptapod.net/pypy/pypy/-/issues/2670#note_45293)

The implementation of adding a weakreflist slot is mimicked from numpy (how they do that for the ndarray extension type)

@coveralls
Copy link

coveralls commented Oct 17, 2022

Pull Request Test Coverage Report for Build 3266840634

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.631%

Totals Coverage Status
Change from base Build 3265218526: 0.0%
Covered Lines: 2153
Relevant Lines: 2544

💛 - Coveralls

@jorisvandenbossche jorisvandenbossche marked this pull request as ready for review October 27, 2022 13:43
@jorisvandenbossche jorisvandenbossche merged commit 24f80f2 into shapely:main Oct 29, 2022
@jorisvandenbossche jorisvandenbossche deleted the weakref-base-class branch October 29, 2022 07:03
@EwoutH
Copy link
Contributor

EwoutH commented Oct 30, 2022

Out of curiosity, did you figure out why PyPy 3.9 didn't work in the CI but 3.8 did?

@jorisvandenbossche
Copy link
Member Author

Out of curiosity, did you figure out why PyPy 3.9 didn't work in the CI but 3.8 did?

Sorry, missed that question. I am not really sure anymore why I switched from 3.9 to 3.8 for PyPy, but so the reason the CI passed in the end is because the commit after that to skip some tests that don't work on PyPy, not because of the 3.9->3.8 switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: weakref support broke PyPy support
3 participants