Skip to content

Remove PY3 compatibility shim#334

Merged
blink1073 merged 1 commit intoCalysto:mainfrom
blink1073:remove-py3
Mar 1, 2026
Merged

Remove PY3 compatibility shim#334
blink1073 merged 1 commit intoCalysto:mainfrom
blink1073:remove-py3

Conversation

@blink1073
Copy link
Contributor

Summary

  • Remove PY3 = sys.version_info[0] == 3 from _metakernel.py and magic.py
  • Drop the if not PY3: kwargs["shell"] = None branch in MetaKernel.__init__
  • Simplify both inspect.getfullargspec(func) if PY3 else inspect.getargspec(func) calls to just inspect.getfullargspec(func)

Since only Python 3 is supported, these shims are dead code.

Drop the `PY3 = sys.version_info[0] == 3` variable and all
conditional branches that relied on it, since Python 2 is no
longer supported.
@blink1073 blink1073 enabled auto-merge (squash) March 1, 2026 02:32
@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.64%. Comparing base (a524854) to head (64a7d49).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
+ Coverage   86.59%   86.64%   +0.05%     
==========================================
  Files          51       51              
  Lines        2797     2793       -4     
  Branches      388      387       -1     
==========================================
- Hits         2422     2420       -2     
+ Misses        257      256       -1     
+ Partials      118      117       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@blink1073 blink1073 disabled auto-merge March 1, 2026 02:38
@blink1073 blink1073 merged commit 2c65f5b into Calysto:main Mar 1, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants