Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with python3.13 #25

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

sam-leonard-ct
Copy link

Upgrades dep bottle from ~0.12.25 to ~0.13.2, all versions 0.13 and up contain the fix to bottle allowing it to work with python 3.13.

@sam-leonard-ct sam-leonard-ct force-pushed the samleonard/fix-python3.13 branch from 7c9a992 to 85b8563 Compare January 3, 2025 14:23
@lbiaggi
Copy link

lbiaggi commented Jan 13, 2025

@sam-leonard-ct updating bottle is breaking a few mypy type inferences 😢

@sam-leonard-ct
Copy link
Author

@sam-leonard-ct updating bottle is breaking a few mypy type inferences 😢

I'm not seeing any mypy changes on my side? could you point me towards what is broken?

@lbiaggi
Copy link

lbiaggi commented Jan 13, 2025

@sam-leonard-ct updating bottle is breaking a few mypy type inferences 😢

I'm not seeing any mypy changes on my side? could you point me towards what is broken?

https://github.com/CodethinkLabs/doorstop/actions/runs/12599127892/job/35115386661 <- your PR

Have you tried to run make check locally?

https://github.com/CodethinkLabs/doorstop/actions/runs/12747712823/job/35526541040 <- CI without bottles updated

@sam-leonard-ct
Copy link
Author

@sam-leonard-ct updating bottle is breaking a few mypy type inferences 😢

I'm not seeing any mypy changes on my side? could you point me towards what is broken?

https://github.com/CodethinkLabs/doorstop/actions/runs/12599127892/job/35115386661 <- your PR

Have you tried to run make check locally?

https://github.com/CodethinkLabs/doorstop/actions/runs/12747712823/job/35526541040 <- CI without bottles updated

Yes I get those errors on main as well.

doorstop on  main [$] is 📦 v3.0b16+codethink.0.3 via 🐍 v3.12.7 
❯ git last-sha
883bcd30ba46ffc9c584ac164a09ec1006485173

doorstop on  main [$] is 📦 v3.0b16+codethink.0.3 via 🐍 v3.12.7 
❮ uvx poetry run mypy doorstop --config-file=.mypy.ini
The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead.
doorstop/core/document.py:885: error: Item "None" of "Any | None" has no attribute "uid"  [union-attr]
doorstop/core/document.py:886: error: Item "None" of "Any | None" has no attribute "level"  [union-attr]
doorstop/core/publishers/html.py:128: error: Unsupported operand types for + ("str" and "None")  [operator]
doorstop/core/publishers/html.py:128: note: Right operand is of type "Any | None"
Found 3 errors in 2 files (checked 92 source files)

These errors actually come from upgrading mypy to 0.14.1 as the version of mypy in pyproject.toml is "^1.1.1" so it got updated when stuff changed. I'll see if I can address these mypy complaints easily and if not I'll pin mypy's version to what it is in main's poetry.lock file.

@sam-leonard-ct sam-leonard-ct force-pushed the samleonard/fix-python3.13 branch from db7be77 to 11ec867 Compare January 13, 2025 16:56
@sam-leonard-ct
Copy link
Author

So the mypy errors are fixed, I'm not super sure about what the correct behaviour should be for the HTML one considering its just going to cause an error if its None anyway in the last case at least?

Upgrades dep bottle from ~0.12.25 to ~0.13.2, all versions 0.13 and up
contain the fix to bottle allowing it to work with python 3.13.
@lbiaggi lbiaggi force-pushed the samleonard/fix-python3.13 branch from 11ec867 to e0cf77c Compare January 17, 2025 09:08
Copy link

@lbiaggi lbiaggi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lbiaggi lbiaggi merged commit 314dac7 into CodethinkLabs:main Jan 17, 2025
6 of 7 checks passed
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