Skip to content

Drop support for Python 3.7 - #11234

Merged
srittau merged 6 commits into
python:mainfrom
srittau:rm-3.7
Jan 4, 2024
Merged

srittau merged 6 commits into
python:mainfrom
srittau:rm-3.7

Conversation

@srittau

@srittau srittau commented Jan 4, 2024

Copy link
Copy Markdown
Collaborator

Part of #10113

@srittau

srittau commented Jan 4, 2024

Copy link
Copy Markdown
Collaborator Author

This PR contains only infrastructure work. Changes to the stubs themselves will follow in a subsequent PR.

Comment thread CONTRIBUTING.md
@AlexWaygood

AlexWaygood commented Jan 4, 2024 •

Copy link
Copy Markdown
Member

You can also delete the lint in check_new_syntax.py that checks we're not using any PEP-570 syntax (but it's also fine to leave that to a followup PR):

class PEP570Finder(ast.NodeVisitor):
def __init__(self) -> None:
self.lineno: int | None = None
def _visit_function(self, node: ast.FunctionDef | ast.AsyncFunctionDef) -> None:
old_lineno = self.lineno
self.lineno = node.lineno
self.generic_visit(node)
self.lineno = old_lineno
visit_FunctionDef = visit_AsyncFunctionDef = _visit_function
def visit_arguments(self, node: ast.arguments) -> None:
if node.posonlyargs:
assert isinstance(self.lineno, int)
errors.append(
f"{path}:{self.lineno}: PEP-570 syntax cannot be used in typeshed yet. "
f"Prefix parameter names with `__` to indicate positional-only parameters"
)
self.generic_visit(node)

@AlexWaygood

Copy link
Copy Markdown
Member

And this can also be deleted:

typeshed/CONTRIBUTING.md

Lines 282 to 286 in 54447f6

Accepted features that *cannot* yet be used in typeshed include:
- [PEP 570](https://www.python.org/dev/peps/pep-0570/) (positional-only
arguments): see [#4972](https://github.com/python/typeshed/issues/4972),
use argument names prefixed with `__` instead

@srittau

srittau commented Jan 4, 2024

Copy link
Copy Markdown
Collaborator Author

And this can also be deleted:

typeshed/CONTRIBUTING.md

Lines 282 to 286 in 54447f6

Accepted features that *cannot* yet be used in typeshed include:
- [PEP 570](https://www.python.org/dev/peps/pep-0570/) (positional-only
arguments): see [#4972](https://github.com/python/typeshed/issues/4972),
use argument names prefixed with `__` instead

I removed it, but didn't add it to supported features, as it's not really a typing feature.

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@srittau
srittau merged commit 4e5f7a7 into python:main Jan 4, 2024
@srittau
srittau deleted the rm-3.7 branch January 4, 2024 13:48
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.

3 participants