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

Consider bumping Python version requirement #1508

Closed
jeanas opened this issue Jan 30, 2023 · 7 comments · Fixed by #1519
Closed

Consider bumping Python version requirement #1508

jeanas opened this issue Jan 30, 2023 · 7 comments · Fixed by #1519

Comments

@jeanas
Copy link
Member

jeanas commented Jan 30, 2023

I just noticed instances of with open(filename, 'r'):, where encoding="utf-8" is missing. This means that a system-dependent encoding can be used instead of UTF-8 (see https://peps.python.org/pep-0686/#motivation).

The INSTALL file states that Frescobaldi requires Python ≥ 3.6. However, Python 3.6 went EOL at the end of year 2021. If we bump the requirement to Python 3.7, we can use Python's UTF-8 mode, which makes UTF-8 encoding the default (and will become the default in Python 3.15, as proposed in PEP 686 linked above). Then we no longer have to care about encodings.

Judging from #1285, we cannot bump higher than 3.7 though.

@PeterBjuhr
Copy link
Collaborator

Sounds good to me if you are confident everything will hold for 3.7! 👍

@fedelibre
Copy link
Member

Judging from #1285, we cannot bump higher than 3.7 though.

Are you referring to the Mac issues mentioned by @dliessi in that conversation? I wonder if they are still valid after almost 3 years with latest PyQt5.

Anyway, I think that bumping to 3.7 should be safe. Will you send a PR?

@jeanas
Copy link
Member Author

jeanas commented Feb 12, 2023

Will do.

@jeanas
Copy link
Member Author

jeanas commented Feb 12, 2023

I asked a question about UTF-8 mode on https://discuss.python.org/t/packaging-python-script-with-utf-8-mode/23813.

@dliessi
Copy link
Collaborator

dliessi commented Feb 13, 2023

Regarding my comment in #1285, I still cannot recall what the problem was, but I packaged 3.1.3 with Python 3.9, so feel free to bump the requirement up to that version.

I'm trying with Python 3.11, let's see if packaging 3.2 works this time...

@jeanas
Copy link
Member Author

jeanas commented Feb 13, 2023

OK, thanks!

@jeanas
Copy link
Member Author

jeanas commented Feb 14, 2023

From the discuss.python.org thread, it seems that the goal of using UTF-8 mode is incompatible with the goal of making pip install frescobaldi work. The latter is important to me at least, so I guess we should give up on UTF-8 mode, sadly.

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 a pull request may close this issue.

4 participants