Skip to content

Tweak load_module_from_file to work on Python 3.15 - #200

Merged
phdru merged 1 commit into
sqlobject:masterfrom
drnlm:bugfix/fix_sqlobject_on_python3.15
Oct 4, 2026
Merged

phdru merged 1 commit into
sqlobject:masterfrom
drnlm:bugfix/fix_sqlobject_on_python3.15

Conversation

@drnlm

@drnlm drnlm commented Sep 29, 2026

Copy link
Copy Markdown

Reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1149263

create_module is allowed to return None, which needs additional logic to handle correctly, so we switch to using module_from_spec to does all that for us.

@drnlm

drnlm commented Sep 29, 2026

Copy link
Copy Markdown
Author

I have verified that the tests pass on Python 3.15.0-rc2 with sqlite and don't break any existing tests - see https://github.com/drnlm/sqlobject/actions/runs/36565264674

The tests currently fail with pymysql > 1.2.0, presumably due to the security changes made in 1.2,1. I have not looked at what required to fix that yet, so I restricted the pymysql version for my testing. I have not included that in this PR, as it's an independent problem from this one.

@phdru phdru self-assigned this Sep 29, 2026
@phdru

phdru commented Sep 29, 2026

Copy link
Copy Markdown
Member

Hello! Thank you for the work. I'm occupied with my health problems, see CheetahTemplate3/cheetah3#74 (comment) . Tomorrow I will have the second eye surgery. I hope to return in October 1st or 2nd.

@phdru

phdru commented Oct 1, 2026

Copy link
Copy Markdown
Member

Hi! I got my right eye repaired. Now I have very good eyesight! Gonna return back to our projects.

`create_module` is allowed to return None, which needs additional
logic to handle correctly, so we switch to using `module_from_spec` to
does all that for us.
@drnlm
drnlm force-pushed the bugfix/fix_sqlobject_on_python3.15 branch from 09166b6 to 54a7761 Compare October 4, 2026 07:18
@phdru
phdru merged commit 54a7761 into sqlobject:master Oct 4, 2026
21 checks passed
@phdru

phdru commented Oct 4, 2026

Copy link
Copy Markdown
Member

Merged. Many thanks!

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