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 Python 3.7 syntax to 3.8 #956

Merged
merged 5 commits into from
Jul 6, 2024
Merged

Conversation

kloczek
Copy link
Contributor

@kloczek kloczek commented Apr 9, 2024

Pull request
Filter all code over pyupgrade --py38-plus.

How Has This Been Tested?
I;m using my typical packaging procedure:

  • python3 -sBm build -w --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using installer module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Checklist

  • I have read CONTRIBUTING.md.
  • I have added a concise human-readable description of the change to CHANGELOG.md.
  • I have tested that this fix is effective or that this feature works.
  • I have added docstrings to newly created methods and classes.
  • I have updated the README.md and the readthedocs documentation. Or verified that this is not necessary.

Filter all code over `pyupgrade --py38-plus`.

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Copy link
Member

@pietermarsman pietermarsman left a comment

Choose a reason for hiding this comment

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

(Sorry that it took a while to respond)

Love it!

The CI/CD is failing so that is something to check out.

Only one other comment: what do you think of using f-strings everywhere? I know pyupgrade is intentionally timid when converting to f-strings, but I think it is more readable in our almost all of our cases.

pdfminer/converter.py Outdated Show resolved Hide resolved
@pietermarsman pietermarsman added this pull request to the merge queue Jul 6, 2024
@pietermarsman pietermarsman removed this pull request from the merge queue due to a manual request Jul 6, 2024
@pietermarsman pietermarsman changed the title really drop python<=3.7 support Update Python 3.7 syntax to 3.8 Jul 6, 2024
@pietermarsman pietermarsman added this pull request to the merge queue Jul 6, 2024
Merged via the queue into pdfminer:master with commit a6aa329 Jul 6, 2024
11 checks passed
@pietermarsman
Copy link
Member

@kloczek Thanks for your contribution!

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@kloczek
Copy link
Contributor Author

kloczek commented Jul 6, 2024

Thank you

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