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

Latest Abjad version (3.19) cannot be installed on the latest two Python versions (3.12 and 3.13) #1591

Open
YannickJadoul opened this issue Dec 12, 2024 · 3 comments

Comments

@YannickJadoul
Copy link
Contributor

While setup.py now has python_requires=">=3.10",, there's still another chunk which blocks installation on Python 3.12 and 3.13:

abjad/setup.py

Lines 18 to 30 in 7bca4dc

def check_python_version(abjad_version):
CURRENT_PYTHON = sys.version_info[:2]
SUPPORTED_PYTHONS = [(3, 10), (3, 11), (3, 12)]
if CURRENT_PYTHON not in SUPPORTED_PYTHONS:
current_python = ".".join([str(_) for _ in CURRENT_PYTHON])
supported_pythons = ", ".join([f"{_[0]}.{_[1]}" for _ in SUPPORTED_PYTHONS])
string = f"This is Abjad {abjad_version},"
string += f" which supports Python {supported_pythons}.\n"
string += "\n"
string += "But it looks like you're trying to install Abjad"
string += f" with Python {current_python}."
sys.stderr.write(string)
sys.exit(1)

As we have a library depending on Abjad, this means that users cannot install it. So each time Python gets a new version, we basically have to wait for Abjad to release a new version, currently.

New Python versions are normally backwards compatible (except for that massive jump from Python 2 to 3, of course). In the rare cases that a feature gets removed from the Python standard lib, it gets a deprecation warning several versions before.
This is why other libraries typically don't limit the upper version of Python supported. It's more convenient to assume new Python versions will be compatible, rather than having to push a new release for each new Python version.

Would you be willing to adapt Abjad this way? I will create a PR, in that case.

@trevorbaca
Copy link
Member

trevorbaca commented Dec 12, 2024

Hi @YannickJadoul yes I'll unblock the supported Pythons in the next release of Abjad.

To be clear, I limited Abjad releases to only the versions of Python that had been tested because one of Abjad's smaller dependencies (can't remember which one right now, maybe the Roman numeral library) broke unannounced on upgrading from, say, Python 2.8 to 2.10, or something like that.

So there's no way to guarantee all the dependencies will continue to work at each new release of a new version of Python, but on balance I agree that it's better to unblock installation on the assumption that new Pythons will work just fine.

No need for a PR, I'll roll it into the next build of Abjad.

@YannickJadoul
Copy link
Contributor Author

@trevorbaca Great to hear, thank you so much for the quick answer! (I of course completely understand time is scarce, but it's good to know for us so we can plan ahead :-) )

broke unannounced on upgrading from, say, Python 2.8 to 2.10, or something like that.

Oh, I see. That's quite annoying! But then I understand your caution, indeed :-)
Apart from making the bet that it's probably fine, the good thing about not limiting the Python version is that when the upstream dependencies get fixed, abjad also automatically gets fixed. Plus, if pip fails to install or run your dependencies, hopefully your users will report issues there, instead of opening issues here on the abjad repository ;-)

If if helps, I'd also be happy to help setup something to run the tests automatically on GitHub Actions? This way, all tests could just happen online, and when a new Python version comes out, all you need to do is press a button to see if things kept working indeed.

@trevorbaca
Copy link
Member

@YannickJadoul Thanks for the kind offer to help! But it's all taken care of; if you wanna take a look at the GitHub Actions configuration it's here ...

https://github.com/Abjad/abjad/blob/main/.github/workflows/main.yml

... and my has GHA been great to work with.

I'm looking to build 3.20 at the end of the month. Thanks for the packaging suggestions!

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

No branches or pull requests

2 participants