Skip to content

fixed get_version in setup.py#952

Open
obogeanu2712 wants to merge 1 commit intoxinntao:masterfrom
obogeanu2712:fix_get_version
Open

fixed get_version in setup.py#952
obogeanu2712 wants to merge 1 commit intoxinntao:masterfrom
obogeanu2712:fix_get_version

Conversation

@obogeanu2712
Copy link

In Python 3.13, exec() inside a function no longer reliably updates the locals() dictionary, causing get_version() in setup.py to raise KeyError and return no version.
This patch fixes the issue by instantiating a dedicated namespace (ns = {}) for exec() and reading version from that dictionary. This prevents mismanagement of local variables and ensures the correct version of Real-ESRGAN is returned consistently.

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.

1 participant