GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Drop Python 3.7, 3.8, 3.9 support by ivanovmg · Pull Request #497 · dry-python/classes

Conversation

@ivanovmg

@ivanovmg ivanovmg commented Dec 13, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR drops support for Python 3.7, 3.8 and 3.9 versions.

Here we updated python version in pyproject.toml and then updated poetry.lock file as described below (please correct me if it is totally wrong way of doing things).

Update to poetry.lock file:

  1. Bump python version to 3.10+ (previous commit)
  2. Re-build poetry.lock file as shown below:
$ rm poetry.lock
$ poetry install

Checklist

  • I have double checked that there are no unrelated changes in this pull request (old patches, accidental config files, etc)
  • I have created at least one test case for the changes I have made
  • I have updated the documentation for the changes I have made
  • I have added my changes to the CHANGELOG.md

Related issues

Format is:

  • Closes Drop Python 3.7 through 3.9 support #496

🙏 Please, if you or your company finds dry-python valuable, help us sustain the project by sponsoring it transparently on https://github.com/sponsors/dry-python. As a thank you, your profile/company logo will be added to our main README which receives hundreds of unique visitors per day.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sobolevn
sobolevn reviewed Dec 13, 2024
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please, take a look at other sys.version_info checks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/test_typeclass/test_typed_dict.py Outdated
@@ -8,6 +8,7 @@
if sys.version_info[:2] >= (3, 9): # noqa: C901

@sobolevn sobolevn Dec 13, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

You can remove that now, because there are no python versions that won't execute this branch.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ivanovmg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@sobolevn

sobolevn commented Dec 13, 2024

Copy link
Copy Markdown
Member

you can use pip-check lib from PyPI to find outdate packages and update them all at once in pyproject.toml

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Dec 17, 2024

Copy link
Copy Markdown
Member

I pushed a fix for this problem to master, please, rebase

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ivanovmg

ivanovmg commented Dec 17, 2024

Copy link
Copy Markdown
Contributor Author

I pushed a fix for this problem to master, please, rebase

OK, thanks! I tried to fix it myself, but now I will rebase

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ivanovmg added 8 commits December 17, 2024 13:17
@ivanovmg
Bump minimum python version to 3.10
bf5e535
@ivanovmg
Update poetry.lock file
46f8245
Repro steps:
1. Bump python version to 3.10+ (previous commit)
2. Re-build poetry.lock file as shown below:

```
$ rm poetry.lock
$ poetry install
```
@ivanovmg
Fix poetry install script
7518d8b
Closes dry-python#494

References:
- https://python-poetry.org/docs/#installing-with-the-official-installer
@ivanovmg
Add TODO related to dropping the entire test module
da48926
@ivanovmg
Update CHANGELOG
8ec00c5
@ivanovmg
Update python versions in github CI
b7c3754
1. Dropped 3.7-3.9
2. Added 3.11-3.13
@ivanovmg
Drop test_typed_dict.py
a763c04
Previously in this test module the actual tests would be
executed only for python 3.9 and earlier.
Since we drop support for these versions, then these tests
are not necessary anymore.
@ivanovmg
Bump dev requirements
ba5babc
@ivanovmg
ivanovmg force-pushed the drop/python-3.7-3.8-3.9 branch from 4c89d17 to ba5babc Compare December 17, 2024 06:17
ivanovmg added 5 commits December 17, 2024 13:27
@ivanovmg
Avoid inheritance from object
588026f
Avoid inheritance from object
to fix WPS306 linting errors.

```
WPS306 Found explicit `object` base class: ...
```
@ivanovmg
Re-implement union_items function
4818e29
Since mypy v0.980 this function has been removed from `mypy.types`.
This this commit we re-implement the same version
present in v0.970.
@ivanovmg
Fix missing type parameters for Callable
e6d74cd
@ivanovmg
Fix import of Protocol
7466a60
@ivanovmg
Add docstrings to satisfy D101
c1fbc9d
@ivanovmg

ivanovmg commented Dec 18, 2024

Copy link
Copy Markdown
Contributor Author

It turns out that there are multiple mypy check failures with the newest mypy version.
I tried to fix some of them, but it goes beyond my experience and knowledge of type checking.

@sobolevn please suggest the way forward.
I suppose that some of them can be silenced, considering a dynamic nature of the typeclass implementation, but most of them will still have to be handled somehow.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Dec 18, 2024

Copy link
Copy Markdown
Member

You can use older mypy for now, I will fix these issues later :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ivanovmg added 2 commits December 19, 2024 11:01
@ivanovmg
Downgrade mypy to v0.942
349e3fa
@ivanovmg
Revert "Fix missing type parameters for Callable"
118ff0f
This reverts commit e6d74cd.
@ivanovmg

ivanovmg commented Dec 19, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

You can use older mypy for now, I will fix these issues later :)

I reverted back to mypy v0.942, but surprisingly the errors persist (even more errors appeared).

Update

I noticed that when I drop strict=true in setup.cfg, then mypy checks are successful, but then flake8 complains.
image

With strict = true we have multiple mypy failures.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ivanovmg
Turn off mypy strict rule
8cfa7a1
sobolevn
sobolevn reviewed Dec 19, 2024
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

You can delete nitpick section and dependency from pyproject.toml

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ivanovmg ivanovmg mentioned this pull request Dec 19, 2024
Use new way of specifying dev dependencies #498
Open
4 tasks
@sobolevn
Update pyproject.toml
c3ed617
sobolevn
sobolevn approved these changes Dec 20, 2024
View reviewed changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Drop Python 3.7 through 3.9 support

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ivanovmg @sobolevn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.