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

Upgrade python>=3.9 #470

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Upgrade python>=3.9 #470

merged 1 commit into from
Jun 13, 2024

Conversation

Mogost
Copy link
Contributor

@Mogost Mogost commented Jun 12, 2024

3.8 is near to eol
@selwin could you check this please

@@ -44,7 +44,7 @@ def __init__(self, lock_filename, timeout=None, force=False):
def get_lock_pid(self):
try:
return int(open(self.lock_filename).read())
except IOError:
except OSError:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason why this is changed?

Copy link
Contributor Author

@Mogost Mogost Jun 13, 2024

Choose a reason for hiding this comment

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

In Python 3.3+, this exception is simple alias. OSError is actually thrown

@selwin
Copy link
Collaborator

selwin commented Jun 12, 2024

Thanks, this is a helpful update.

Ideally we should also remove bleach dependency as it's no longer maintained.

@Mogost
Copy link
Contributor Author

Mogost commented Jun 13, 2024

Thanks, this is a helpful update.

Ideally we should also remove bleach dependency as it's no longer maintained.

I am currently in the process of refining and enhancing the project. Following the completion of this pull request, I intend to integrate additional linters and code formatters. By dividing the work into manageable segments, I aim to facilitate more efficient and less burdensome code reviews.

@selwin
Copy link
Collaborator

selwin commented Jun 13, 2024

I am currently in the process of refining and enhancing the project. Following the completion of this pull request, I intend to integrate additional linters and code formatters. By dividing the work into manageable segments, I aim to facilitate more efficient and less burdensome code reviews.

Sounds like a plan. Will merge this in.

@selwin selwin merged commit 7abc956 into ui:master Jun 13, 2024
7 checks passed
@selwin
Copy link
Collaborator

selwin commented Jun 13, 2024

If you get around to adding code formatters (I'm assuming black or ruff --format), please use 120 characters as the max line length and --skip-string-normalization so it doesn't automatically change single quote to double quotes.

@Mogost
Copy link
Contributor Author

Mogost commented Jun 13, 2024

If you get around to adding code formatters (I'm assuming black or ruff --format), please use 120 characters as the max line length and --skip-string-normalization so it doesn't automatically change single quote to double quotes.

Ruff is my choice. 120 OK, no problem. But I don't want to skip string normalization. It's good for consistency. I can split skip normalization in separated pr but in general I will be happy to see it enabled.

@selwin
Copy link
Collaborator

selwin commented Jun 13, 2024

But I don't want to skip string normalization. It's good for consistency. I can split skip normalization in separated pr but in general I will be happy to see it enabled.

Sorry, I happen to belong in the camp that only started using black after --skip-string-normalization was introduced :). I think this issue has been debated to death in psf/black#118 and in the end it just comes down to preference.

@Mogost
Copy link
Contributor Author

Mogost commented Jun 13, 2024

But I don't want to skip string normalization. It's good for consistency. I can split skip normalization in separated pr but in general I will be happy to see it enabled.

Sorry, I happen to belong in the camp that only started using black after --skip-string-normalization was introduced :). I think this issue has been debated to death in psf/black#118 and in the end it just comes down to preference.

We can normalize strings to ' instead of ". I am speaking only about consistency. It does not matter to me if it is consistent ' or consistent "

[tool.ruff.format]
quote-style = "single"

@Mogost Mogost deleted the upgrade branch June 13, 2024 06:47
@selwin
Copy link
Collaborator

selwin commented Jun 13, 2024

We can normalize strings to ' instead of ". I am speaking only about consistency. It does not matter to me if it is consistent ' or consistent "

Ok.

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