Skip to content

Commit

Permalink
backport Remove 3.8 from release (#18989)
Browse files Browse the repository at this point in the history
* backport Remove 3.8 from release

* remove 3.8 from pyproject.toml as well

* black fix

* go back to the check for 7 which is wrong, but wrong in a consistent way for main
  • Loading branch information
emlowe authored Dec 5, 2024
1 parent 3973952 commit c59eeec
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 61 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/check_wheel_availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,8 @@ jobs:
matrix: arm
- name: Intel
matrix: intel
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
exclude:
- os:
matrix: macos
arch:
matrix: arm
python-version: "3.8"
- os:
matrix: windows
arch:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- name: Intel
matrix: intel
python:
- major_dot_minor: "3.8"
- major_dot_minor: "3.9"
- major_dot_minor: "3.10"
- major_dot_minor: "3.11"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test-install-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,12 @@ jobs:
apt-get install --yes software-properties-common
add-apt-repository --yes ppa:git-core/ppa
apt-get --yes update
apt-get install --yes git lsb-release sudo python3-venv
apt-get install --yes git lsb-release sudo
MINIMUM=3.9
if ! apt satisfy --yes "python3-venv (>= ${MINIMUM})"
then
apt-get install --yes python${MINIMUM}-venv
fi
- name: Add safe git directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/test-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ jobs:
arch:
- matrix: ${{ inputs.arch }}
python:
- name: "3.8"
file_name: "3.8"
action: "3.8"
apt: "3.8"
install_sh: "3.8"
matrix: "3.8"
exclude_from:
limited: True
main: True
- name: "3.9"
file_name: "3.9"
action: "3.9"
Expand Down Expand Up @@ -109,10 +100,6 @@ jobs:
limited: True
main: True
exclude:
- os:
matrix: macos
python:
matrix: "3.8"
- arch:
matrix: arm
configuration:
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/upload-pypi-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
- name: Intel
matrix: intel
python:
- major_dot_minor: "3.8"
- major_dot_minor: "3.9"
- major_dot_minor: "3.10"
- major_dot_minor: "3.11"
Expand All @@ -68,12 +67,6 @@ jobs:
python manage-mypy.py build-mypy-ini
mypy
exclude:
- os:
matrix: macos
arch:
matrix: arm
python:
major_dot_minor: "3.8"
- os:
matrix: windows
arch:
Expand Down Expand Up @@ -174,7 +167,7 @@ jobs:
- check
strategy:
matrix:
python-version: [3.8]
python-version: [3.10]
os: [ubuntu-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
Exit 1
}

$supportedPythonVersions = "3.12", "3.11", "3.10", "3.9", "3.8"
$supportedPythonVersions = "3.12", "3.11", "3.10", "3.9"
if ("$env:INSTALL_PYTHON_VERSION" -ne "")
{
$pythonVersion = $env:INSTALL_PYTHON_VERSION
Expand Down
6 changes: 4 additions & 2 deletions chia/_tests/core/ssl/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ async def test_farmer_mismatch_context(self, farmer_one_harvester_not_started, s

ssl_context = ssl_context_for_client(ca_private_crt_path, ca_private_key_path, pub_crt, pub_key)
caplog.clear()
with pytest.raises(Exception), ignore_ssl_cert_error(), caplog.at_level(
logging.DEBUG, logger="asyncio"
with (
pytest.raises(Exception),
ignore_ssl_cert_error(),
caplog.at_level(logging.DEBUG, logger="asyncio"),
):
await establish_connection(farmer_server, self_hostname, ssl_context)

Expand Down
7 changes: 4 additions & 3 deletions chia/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,9 +1838,10 @@ async def add_block(
return await self.add_block(new_block, peer, bls_cache)
state_change_summary: Optional[StateChangeSummary] = None
ppp_result: Optional[PeakPostProcessingResult] = None
async with self.blockchain.priority_mutex.acquire(priority=BlockchainMutexPriority.high), enable_profiler(
self.profile_block_validation
) as pr:
async with (
self.blockchain.priority_mutex.acquire(priority=BlockchainMutexPriority.high),
enable_profiler(self.profile_block_validation) as pr,
):
# After acquiring the lock, check again, because another asyncio thread might have added it
if self.blockchain.contains_block(header_hash):
return None
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ OPENSSL_VERSION_INT=
find_python() {
set +e
unset BEST_VERSION
for V in 312 3.12 311 3.11 310 3.10 39 3.9 38 3.8 3; do
for V in 312 3.12 311 3.11 310 3.10 39 3.9 3; do
if command -v python$V >/dev/null; then
if [ "$BEST_VERSION" = "" ]; then
BEST_VERSION=$V
Expand Down Expand Up @@ -138,7 +138,7 @@ if ! command -v "$INSTALL_PYTHON_PATH" >/dev/null; then
fi

if [ "$PYTHON_MAJOR_VER" -ne "3" ] || [ "$PYTHON_MINOR_VER" -lt "7" ] || [ "$PYTHON_MINOR_VER" -ge "13" ]; then
echo "Chia requires Python version >= 3.8 and < 3.13.0" >&2
echo "Chia requires Python version >= 3.9 and < 3.13.0" >&2
echo "Current Python version = $INSTALL_PYTHON_VERSION" >&2
# If Arch, direct to Arch Wiki
if type pacman >/dev/null 2>&1 && [ -f "/etc/arch-release" ]; then
Expand Down
25 changes: 3 additions & 22 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ priority = "supplemental"
"Changelog" = "https://github.com/Chia-Network/chia-blockchain/blob/main/CHANGELOG.md"

[tool.poetry.dependencies]
python = ">=3.8.10, <3.13"
python = ">=3.9, <3.13"
aiofiles = "24.1.0" # Async IO for files
aiohttp = "3.10.4" # HTTP server for full node rpc
aiosqlite = "0.20.0" # asyncio wrapper for sqlite, to store blocks
Expand Down Expand Up @@ -150,7 +150,7 @@ build-backend = "poetry_dynamic_versioning.backend"

[tool.black]
line-length = 120
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
target-version = ['py39', 'py310', 'py311', 'py312']
include = '''
^/(
[^/]*.py
Expand Down

0 comments on commit c59eeec

Please sign in to comment.