Skip to content

Fix Python 3.13 compatibility#619

Open
Disty0 wants to merge 3 commits intoTencentARC:masterfrom
Disty0:master
Open

Fix Python 3.13 compatibility#619
Disty0 wants to merge 3 commits intoTencentARC:masterfrom
Disty0:master

Conversation

@Disty0
Copy link

@Disty0 Disty0 commented Jun 11, 2025

Fixes Python 3.13 compatibility.

exec doesn't update locals with Python 3.13.
This PR parses the version file as a text instead of running exec.

GFPGAN cannot be installed with Python 3.13 without this PR.

Relevant issue from BasicSR repo is this: XPixelGroup/BasicSR#725
Issue thread is from BasicSR but the issue and the trace is the same in GFPGAN.

@mrr12345678
Copy link

mrr12345678 commented Jul 13, 2025

CamScanner ۲۰۲۵-۰۶-۱۸ ۱۳ ۵۵_2

Rizbe pushed a commit to Gelotto/power-node that referenced this pull request Dec 31, 2025
- Add python3-dev package check/install for insightface Cython compilation
  - Fixes "Python.h: No such file or directory" error on Ubuntu/Debian
  - Provides helpful hint if auto-install fails

- Add Python 3.13+ compatibility for GFPGAN/basicsr
  - Detects Python version and uses Disty0's BasicSR fork for 3.13+
  - The upstream basicsr uses exec()/locals() pattern that breaks in Python 3.13
  - See: TencentARC/GFPGAN#619

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants