Remove files that only exist on <=3.6, update a few comments (#8273)

This commit is contained in:
Alex Waygood
2022-07-12 08:12:32 +01:00
committed by GitHub
parent 78d96cd17e
commit 27db37240a
5 changed files with 2 additions and 15 deletions

View File

@@ -63,7 +63,6 @@ ast: 2.7-
asynchat: 2.7-
asyncio: 3.4-
asyncio.mixins: 3.10-
asyncio.compat: 3.4-3.6
asyncio.exceptions: 3.8-
asyncio.format_helpers: 3.7-
asyncio.runners: 3.7-
@@ -164,7 +163,6 @@ locale: 2.7-
logging: 2.7-
lzma: 3.3-
macpath: 2.7-3.7
macurl2path: 2.7-3.6
mailbox: 2.7-
mailcap: 2.7-
marshal: 2.7-

View File

@@ -1,5 +0,0 @@
PY34: bool
PY35: bool
PY352: bool
def flatten_list_bytes(list_of_data: list[bytes]) -> bytes: ...

View File

@@ -1,5 +0,0 @@
__all__ = ["url2pathname", "pathname2url"]
def url2pathname(pathname: str) -> str: ...
def pathname2url(pathname: str) -> str: ...
def _pncomp2url(component: str | bytes) -> str: ...

View File

@@ -67,7 +67,7 @@ _TXT: TypeAlias = bytes | str
if sys.version_info >= (3, 8):
_CMD: TypeAlias = StrOrBytesPath | Sequence[StrOrBytesPath]
else:
# Python 3.6 doesn't support _CMD being a single PathLike.
# Python 3.7 doesn't support _CMD being a single PathLike.
# See: https://bugs.python.org/issue31961
_CMD: TypeAlias = _TXT | Sequence[StrOrBytesPath]
if sys.platform == "win32":
@@ -704,7 +704,6 @@ elif sys.version_info >= (3, 9):
) -> CompletedProcess[Any]: ...
else:
# Nearly the same args as for 3.6, except for capture_output and text
@overload
def run(
args: _CMD,

View File

@@ -19,6 +19,6 @@ directory cannot always use modern syntax for type hints. For example, PEP 604
syntax (unions with a pipe `|` operator) is new in Python 3.10. While this
syntax can be used on older Python versions in a `.pyi` file, code using this
syntax will fail at runtime on Python <=3.9. Since the test cases all use `.py`
extensions, and since the tests need to pass on all Python versions >=3.6, PEP
extensions, and since the tests need to pass on all Python versions >=3.7, PEP
604 syntax cannot be used in a test case. Use `typing.Union` and
`typing.Optional` instead.