Skip to content

Commit d84afd8

Browse files
committed
initial changes
1 parent 6099c7c commit d84afd8

13 files changed

+35
-66
lines changed

.github/workflows/check_wheel_availability.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
matrix: arm
4444
- name: Intel
4545
matrix: intel
46-
python-version: ["3.9", "3.10", "3.11", "3.12"]
46+
python-version: ["3.10", "3.11", "3.12"]
4747
exclude:
4848
- os:
4949
matrix: windows

.github/workflows/pre-commit.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
- name: Intel
4242
matrix: intel
4343
python:
44-
- major_dot_minor: "3.9"
4544
- major_dot_minor: "3.10"
4645
- major_dot_minor: "3.11"
4746
- major_dot_minor: "3.12"

.github/workflows/test-install-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
run: |
252252
apt-get --yes update
253253
apt-get install --yes git lsb-release sudo
254-
MINIMUM=3.9
254+
MINIMUM=3.10
255255
if ! apt-get satisfy --yes "python3-venv (>= ${MINIMUM})"
256256
then
257257
apt-get install --yes python${MINIMUM}-venv

.github/workflows/test-single.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ jobs:
7070
- matrix: ${{ inputs.arch }}
7171
emoji: ${{ inputs.arch-emoji }}
7272
python:
73-
- name: "3.9"
74-
file_name: "3.9"
75-
action: "3.9"
76-
apt: "3.9"
77-
install_sh: "3.9"
78-
matrix: "3.9"
79-
exclude_from:
80-
limited: True
81-
main: True
8273
- name: "3.10"
8374
file_name: "3.10"
8475
action: "3.10"

.github/workflows/upload-pypi-source.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ jobs:
5959
emoji: 🌀
6060
matrix: intel
6161
python:
62-
- major_dot_minor: "3.9"
6362
- major_dot_minor: "3.10"
6463
- major_dot_minor: "3.11"
6564
- major_dot_minor: "3.12"

Install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
4646
Exit 1
4747
}
4848

49-
$supportedPythonVersions = "3.12", "3.11", "3.10", "3.9"
49+
$supportedPythonVersions = "3.12", "3.11", "3.10"
5050
if ("$env:INSTALL_PYTHON_VERSION" -ne "")
5151
{
5252
$pythonVersion = $env:INSTALL_PYTHON_VERSION

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Chia is a modern cryptocurrency built from scratch, designed to be efficient, de
2020

2121
Please check out the [Chia website][link-chia], the [Intro to Chia][link-intro], and [FAQ][link-faq] for information on this project.
2222

23-
Python 3.9+ is required. Make sure your default python version is >=3.9 by typing `python3`.
23+
Python 3.10+ is required. Make sure your default python version is >=3.10 by typing `python3`.
2424

2525
If you are behind a NAT, it can be difficult for peers outside your subnet to reach you when they start up. You can enable [UPnP][link-upnp]
2626
on your router or add a NAT (for IPv4 but not IPv6) and firewall rules to allow TCP port 8444 access to your peer.

chia/_tests/cmds/test_dev_gh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async def test_successfully_dispatches(
114114
assert by_name["macos-intel"]["conclusion"] == "skipped"
115115
assert by_name["windows"]["conclusion"] == "skipped"
116116

117-
versions = ["3.9", "3.10", "3.11", "3.12"]
117+
versions = ["3.10", "3.11", "3.12"]
118118
runs_by_name: dict[str, list[str]] = {name: [] for name in ["ubuntu", "macos-arm"]}
119119
for name in by_name:
120120
platform, _, rest = name.partition(" / ")

chia/cmds/cmd_classes.py

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,14 @@ async def run(self) -> None: ...
4545

4646

4747
def option(*param_decls: str, **kwargs: Any) -> Any:
48-
if sys.version_info >= (3, 10):
49-
default_default = MISSING
50-
else: # versions < 3.10 don't know about kw_only and they complain about lacks of defaults
51-
# Can't get coverage on this because we only test on one version
52-
default_default = None # pragma: no cover
53-
5448
return field(
5549
metadata=dict(
5650
option_args=dict(
5751
param_decls=tuple(param_decls),
5852
**kwargs,
5953
),
6054
),
61-
default=kwargs.get("default", default_default),
55+
default=kwargs.get("default", MISSING),
6256
)
6357

6458

@@ -270,16 +264,10 @@ def chia_command(
270264
def _chia_command(cls: type[ChiaCommand]) -> type[ChiaCommand]:
271265
# The type ignores here are largely due to the fact that the class information is not preserved after being
272266
# passed through the dataclass wrapper. Not sure what to do about this right now.
273-
if sys.version_info >= (3, 10):
274-
wrapped_cls: type[ChiaCommand] = dataclass(
275-
frozen=True,
276-
kw_only=True,
277-
)(cls)
278-
else: # pragma: no cover
279-
# stuff below 3.10 doesn't know about kw_only
280-
wrapped_cls: type[ChiaCommand] = dataclass(
281-
frozen=True,
282-
)(cls)
267+
wrapped_cls: type[ChiaCommand] = dataclass(
268+
frozen=True,
269+
kw_only=True,
270+
)(cls)
283271

284272
metadata = Metadata(
285273
command=click.command(
@@ -316,9 +304,6 @@ def get_chia_command_metadata(cls: type[ChiaCommand]) -> Metadata:
316304

317305
@dataclass_transform(frozen_default=True)
318306
def command_helper(cls: type[Any]) -> type[Any]:
319-
if sys.version_info >= (3, 10):
320-
new_cls = dataclass(frozen=True, kw_only=True)(cls)
321-
else: # stuff below 3.10 doesn't support kw_only
322-
new_cls = dataclass(frozen=True)(cls) # pragma: no cover
307+
new_cls = dataclass(frozen=True, kw_only=True)(cls)
323308
setattr(new_cls, COMMAND_HELPER_ATTRIBUTE_NAME, True)
324309
return new_cls

chia/wallet/conditions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,9 +1472,7 @@ def parse_timelock_info(conditions: Iterable[Condition]) -> ConditionValidTimes:
14721472
elif isinstance(condition, Timelock):
14731473
timelock = condition
14741474
else:
1475-
# Something about python 3.9 makes this be not covered but on 3.10+ it is covered
1476-
# https://github.com/nedbat/coveragepy/issues/1530
1477-
continue # pragma: no cover
1475+
continue
14781476

14791477
properties_left = properties.copy()
14801478
min_not_max: bool = True

0 commit comments

Comments
 (0)