Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Python3.11、3.12Compatibility with IPython package#5

Open
ShaohonChen wants to merge 1 commit into
refi64:masterfrom
ShaohonChen:py311support
Open

Python3.11、3.12Compatibility with IPython package#5
ShaohonChen wants to merge 1 commit into
refi64:masterfrom
ShaohonChen:py311support

Conversation

@ShaohonChen

Copy link
Copy Markdown

Python 3.12 Compatibility: Replace Deprecated inspect.getargspec

Description

This PR addresses compatibility issues with Python 3.12 where inspect.getargspec() has been removed (PEP 594), which breaks parameter inspection functionality in IPython environments.

Changes

  1. Replaced inspect.getargspec with inspect.getfullargspec as the primary alternative
  2. Added compatibility layer for IPython core inspection
  3. Implemented multi-level fallback mechanism for cross-version support

Compatibility Impact

  • ✅ Fully compatible with Python 3.8+
  • ✅ Compatible with IPython 7.0+

Testing

Verified in following environments:

  • Python 3.12 + IPython 8.0+

@ShaohonChen

Copy link
Copy Markdown
Author

#4 additional support for ipykernel ;)

@RunFMe

RunFMe commented Mar 30, 2025

Copy link
Copy Markdown

What do you think about forking?

@ShaohonChen

Copy link
Copy Markdown
Author

Sure, I should follow your branch. Let me edit it later. @RunFMe

@refi64

refi64 commented Apr 2, 2025

Copy link
Copy Markdown
Owner

this is a really old project done by teenager me with almost exclusively questionable design choices, I would highly recommend just taking out the parts you use (RuntimeModule it seems? so a handful of lines of helper code to set up a types.ModuleType, you might be even better off calling exec directly and fetching things out of its globals dict), followed by tossing the rest in a raging inferno.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants