Skip to content

chore upgrade python#10

Merged
b1r3k merged 6 commits intomasterfrom
chore-upgrade-python
Oct 10, 2024
Merged

chore upgrade python#10
b1r3k merged 6 commits intomasterfrom
chore-upgrade-python

Conversation

@b1r3k
Copy link
Copy Markdown
Contributor

@b1r3k b1r3k commented Oct 8, 2024

fixes #9

@b1r3k b1r3k self-assigned this Oct 8, 2024
@b1r3k b1r3k requested review from mshandrovskiy and snejku October 8, 2024 19:16
Comment thread sdiff/__init__.py Outdated
Comment thread sdiff/parser.py


def parse(text, parser_cls: Type[MdParser] = MdParser):
def parse(text, parser_cls: type[MdParser] = MdParser):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

recommended to use type over Type?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is how pyupgrade --py36-plus works by default: tries to use typing.type which fails

Additionally typing.Type usage seems to be deprecated according to: https://docs.python.org/3.11/library/typing.html#typing

so at this point using type[My_Class] should be way to go

Comment thread setup.py
@@ -14,7 +14,8 @@ def read(f):
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any need to upgrade this library? mistune

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we are using v1 of this library: https://github.com/lepture/mistune/tree/v1 0.8.4 is last version of v1 then there is v2 and v3 which may break compatibility - I've have not checked but:

  • v1 docs says it's python 3.5+ compatible
  • we have tests covering usage of mistune starting from ParserTestCase and it seems coverage is pretty good.

@b1r3k b1r3k force-pushed the chore-upgrade-python branch from 47af01a to bf33ced Compare October 9, 2024 06:54
@b1r3k b1r3k force-pushed the chore-upgrade-python branch from bf33ced to 2c329d8 Compare October 9, 2024 06:59
@b1r3k b1r3k force-pushed the chore-upgrade-python branch from 65824ba to 67489eb Compare October 9, 2024 07:26
Comment thread tests/test_sdiff.py
@b1r3k b1r3k marked this pull request as ready for review October 9, 2024 11:12
@b1r3k b1r3k merged commit 02aca5f into master Oct 10, 2024
@b1r3k b1r3k deleted the chore-upgrade-python branch October 10, 2024 12:27
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.

html-structure-diff python upgrade

3 participants