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

update and support 3.12 #206

Closed
Zhu-mjl1 opened this issue May 11, 2024 · 7 comments
Closed

update and support 3.12 #206

Zhu-mjl1 opened this issue May 11, 2024 · 7 comments
Assignees
Labels

Comments

@Zhu-mjl1
Copy link

version supported

I've built my project using the latest Python version, 3.12. It would be wonderful if you could update and support 3.12 as well. Thank you in advance!

@Casper-Guo
Copy link
Contributor

The library should work with 3.12 even though it is not officially supported atm. Have you encountered any bug?

@Zhu-mjl1
Copy link
Author

Yes, it occurred right after pip install latexify-py, error messages :

ERROR: Ignored the following versions that require a different python version: 0.0.4 Requires-Python >=3.6, <3.9; 0.0.5 Requires-Python >=3.6, <3.9; 0.0.6 Requires-Python >=3.6, <3.9; 0.0.7 Requires-Python >=3.6, <3.9; 0.1.0 Requires-Python <3.11,>=3.7; 0.1.1 Requires-Python <3.11,>=3.7; 0.2.0 Requires-Python <3.11,>=3.7; 0.2.0b1 Requires-Python <3.11,>=3.7; 0.2.0b2 Requires-Python <3.11,>=3.7; 0.3.0b1 Requires-Python <3.12,>=3.7; 0.3.1 Requires-Python <3.12,>=3.7; 0.4.0 Requires-Python <3.12,>=3.7; 0.4.1 Requires-Python <3.12,>=3.7; 0.4.2 Requires-Python <3.12,>=3.7; 0.4.3.post1 Requires-Python <3.12,>=3.7
ERROR: Could not find a version that satisfies the requirement latexify-py (from versions: none)
ERROR: No matching distribution found for latexify-py

Supposed to be version errors ?
By the way, I use macOS so with no idea if it works on the other systems : )

@EloraCassinyin
Copy link

Same issue...

@odashi
Copy link
Collaborator

odashi commented Oct 3, 2024

Pip option --ignore-requires-python may work, but it would be better to mitigate version requirements in pyproject.toml.

@marvinvanaalst
Copy link
Contributor

What exactly is holding back lifting the version constraint? According to the docs the only new syntax feature in 3.12 is the type parameter syntax. Doing a quick check with the version constrained lifted locally and the following snippet works flawlessly:

@latexify.function
def b[T](x: T) -> T:
    return x

Happy to help if anything needs to be implemented to get this feature out, as I'd love to be able to use this library in some of my projects that require 3.12.

Also, since algorithmic_codegen already bails on generic AST nodes with an LatexifyNotSupportedError, will new syntax ever break the library? Or could we just generally support Python >=3.7 and then release updates once missing syntax is required?

@odashi
Copy link
Collaborator

odashi commented Dec 16, 2024

Sorry for being late to fix this.
There is an ongoing pull request to support newer versions and drop old ones:
#210

It requires only some tweaks on version-specific behavior, and I think there is basically no serious issues to support newer versions.

@odashi
Copy link
Collaborator

odashi commented Dec 20, 2024

Released v0.4.4, which involves Python 3.12/3.13 support.

@odashi odashi closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants