Skip to content

ENH: Python 3.12 and NumPy 2.0 compat#6744

Draft
larsoner wants to merge 7 commits into
psychopy:devfrom
larsoner:np2
Draft

ENH: Python 3.12 and NumPy 2.0 compat#6744
larsoner wants to merge 7 commits into
psychopy:devfrom
larsoner:np2

Conversation

@larsoner

@larsoner larsoner commented Jul 24, 2024

Copy link
Copy Markdown
Contributor

I looked briefly for open issues or PRs about NumPy 2.0 and Python 3.12 compat and didn't see any. So I started digging and opened aforren1/ptb-wheels#10, Psychtoolbox-3/Psychtoolbox-3#843, aforren1/Psychtoolbox-3#1 which should fix Psychtoolbox and make 3.12 + NumPy 2.0 compatible psychtoolbox wheels available 🤞 . Locally I can at least get psychtoolbox to import on my 3.12 + NumPy 2.0 system with those changes.

This PR contains some additional stuff I needed to get $ psychopy to open when using the wheel above.

  • I wasn't sure why setuptools was needed (and an upper bound pin) in the runtime dependencies so I removed it, but happy to put it back.
  • I also bumped the Pyglet version but happy to revert that, too (I assume it was there for a reason but wanted to bring up the idea in case it wasn't -- 1.5.29 came out pretty recently so maybe just 1.5.28 was problematic or something?).

So some opinionated choices in here, happy to modify as needed or close if someone is already working on this and I missed it!

# otherwise, just get the requested group
entryPoints += importlib.metadata.entry_points().get(group, [])

return entryPoints

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a lot of code dup here with the psychopy.plugins.util.getEntryPoints so I got rid of this version. I replaced it above in the one place it was used hoping it's equivalent.

@larsoner larsoner marked this pull request as draft July 24, 2024 21:51
@peircej peircej requested review from TEParsons and mdcutone July 25, 2024 09:55
@mh105

mh105 commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

@larsoner Does this wheel of PTB work on osx-arm architect? That will be fantastic!

@larsoner

Copy link
Copy Markdown
Contributor Author

No that will be a separate paid feature sounds like, see Psychtoolbox-3/Psychtoolbox-3#813 (comment)

@mh105

mh105 commented Jul 25, 2024

Copy link
Copy Markdown
Contributor

Hmm... that's annoying but very understandable.

@peircej

peircej commented Jul 26, 2024

Copy link
Copy Markdown
Member

I reached out to Mario to discuss funding the work back in May and haven't heard back but maybe the email got lost in the cracks. I'll try again

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.

3 participants