Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Don't require typing-extensions on Python >= 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Jul 9, 2024
1 parent bf64a1d commit bd2694b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 5 additions & 1 deletion nitro_generator_checker/nitro_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@

import random
import string
import sys
from typing import Iterator

from typing_extensions import override
if sys.version_info >= (3, 12):
from typing import override
else:
from typing_extensions import override


class NitroGenerator(Iterator[str]):
Expand Down
7 changes: 6 additions & 1 deletion nitro_generator_checker/result_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

import asyncio
import stat
import sys
from abc import ABCMeta, abstractmethod
from pathlib import Path
from typing import TYPE_CHECKING

import aiofiles
from aiohttp import ClientConnectorError, ClientResponseError
from typing_extensions import override

from . import fs
from .utils import asyncify

if sys.version_info >= (3, 12):
from typing import override
else:
from typing_extensions import override

if TYPE_CHECKING:
from aiohttp import ClientSession

Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ certifi = "*"
charset-normalizer = ">=2,<4"
rich = ">=10.2,<14"
tomli = { version = "<3", python = "<3.11" }
typing-extensions = ">=4.4,<5"
typing-extensions = { version = ">=4.4,<5", python = "<3.12" }
uvloop = { version = ">=0.14,<0.20", optional = true, markers = "implementation_name == 'cpython' and (sys_platform == 'darwin' or sys_platform == 'linux')" }
winloop = { version = "<0.1.5", markers = "implementation_name == 'cpython' and (sys_platform == 'cygwin' or sys_platform == 'win32')" }

Expand All @@ -36,6 +36,7 @@ mypy = "1.10.1"
ruff = "0.5.1"
tomli = "2.0.1"
types-aiofiles = "24.1.0.20240626"
typing-extensions = "4.12.2"

[tool.poetry.group.nuitka]
optional = true
Expand Down

0 comments on commit bd2694b

Please sign in to comment.