Skip to content

Commit

Permalink
Support 3.11, Switch to Python 3.11 for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjmcdougall committed Jan 9, 2025
1 parent 277ea6e commit c0d33aa
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.12, 3.13]
python-version: [3.11, 3.12, 3.13]
resolution: [highest, lowest-direct]
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.12.4
3.11.11
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ license = { file = "LICENSE" }
authors = [
{ name = "Nathan McDougall", email = "[email protected]" },
]
requires-python = ">=3.12"
requires-python = ">=3.11"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
Expand Down
4 changes: 2 additions & 2 deletions src/usethis/_integrations/bitbucket/anchor.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Literal
from typing import Literal, TypeAlias

from pydantic import BaseModel

# N.B. at the point where we support more than one script item, we should create a
# canonical sort order for them and enforce it when we add them to the pipeline.
type ScriptItemName = Literal["install-uv"]
ScriptItemName: TypeAlias = Literal["install-uv"]


class ScriptItemAnchor(BaseModel):
Expand Down
5 changes: 3 additions & 2 deletions src/usethis/_integrations/pydantic/dump.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from functools import singledispatch
from itertools import zip_longest
from typing import TypeAlias

from pydantic import BaseModel, RootModel

type ModelLiteral = bool | int | float | str
type ModelRepresentation = (
ModelLiteral: TypeAlias = bool | int | float | str
ModelRepresentation: TypeAlias = (
ModelLiteral
| dict[str, "ModelRepresentation"]
| list["ModelRepresentation"]
Expand Down
4 changes: 2 additions & 2 deletions src/usethis/_integrations/yaml/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from pathlib import Path
from types import NoneType
from typing import TypeVar
from typing import TypeAlias, TypeVar

import ruamel.yaml
from ruamel.yaml.comments import (
Expand Down Expand Up @@ -35,7 +35,7 @@
T = TypeVar("T")


type YAMLLiteral = (
YAMLLiteral: TypeAlias = (
NoneType
| bool
| float
Expand Down
4 changes: 3 additions & 1 deletion src/usethis/_pipeweld/ops.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import TypeAlias

from pydantic import BaseModel


Expand All @@ -14,4 +16,4 @@ class InsertSuccessor(BaseOperation):
pass


type Instruction = InsertSuccessor | InsertParallel
Instruction: TypeAlias = InsertSuccessor | InsertParallel
137 changes: 132 additions & 5 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit c0d33aa

Please sign in to comment.