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

Commit

Permalink
Revert "Apply new ruff/pyupgrade rule UP032 (pypa#617)"
Browse files Browse the repository at this point in the history
This reverts commit 16206e6.
  • Loading branch information
agronholm authored and seansmith39 committed May 25, 2024
1 parent 16206e6 commit 351983d
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 126 deletions.
5 changes: 0 additions & 5 deletions .github/codecov.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/H6060-experiment-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: H6060 Experiment 1

on:
push:

jobs:
build-application:
name: Build Application
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Python 3.12
uses: actions/setup-python@v5.1.0
with:
python-version: 3.12
cache: pip
cache-dependency-path: pyproject.toml

- name: Install Pip Dependencies
uses: seansmith39/H6060-Experiment-Resources/.github/actions/python/install-pip-dependencies@main
with:
extra-pip-packages: flit build coverage

- name: Install Project
run: pip install --no-binary=wheel .

- name: Install Test Dependencies
run: pip install .[test] coverage[toml]

- name: Build And Upload Python Package
uses: seansmith39/H6060-Experiment-Resources/.github/actions/python/python-build-upload@main
with:
build-command: flit build --setup-py
build-directory: dist

- name: Run Tests With Coverage
shell: bash
run: |
coverage run -m pytest -v
coverage xml
- name: Upload Coverage XML Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
if-no-files-found: error

python-scanning:
name: Run SCA and SAST Python Scanning Workflow
uses: seansmith39/H6060-Experiment-Resources/.github/workflows/experiment-1-python.yml@main
needs: build-application
secrets: inherit
with:
project-name: H6060-Python-wheel
coverage-filename: coverage.xml
sast-sonarqube-enabled: false
sast-deepsource-enabled: false
sast-codeql-enabled: false
sca-eclipse-steady-enabled: false
sca-snyk-enabled: false
sca-owasp-dependency-check-enabled: false
sca-grype-enabled: false
58 changes: 0 additions & 58 deletions .github/workflows/publish.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/wheel/vendored/packaging/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool:


def format_full_version(info: "sys._version_info") -> str:
version = f"{info.major}.{info.minor}.{info.micro}"
version = "{0.major}.{0.minor}.{0.micro}".format(info)
kind = info.releaselevel
if kind != "final":
version += kind[0] + str(info.serial)
Expand Down
24 changes: 19 additions & 5 deletions src/wheel/vendored/packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ def cpython_tags(
if use_abi3:
for minor_version in range(python_version[1] - 1, 1, -1):
for platform_ in platforms:
interpreter = f"cp{_version_nodot((python_version[0], minor_version))}"
interpreter = "cp{version}".format(
version=_version_nodot((python_version[0], minor_version))
)
yield Tag(interpreter, "abi3", platform_)


Expand Down Expand Up @@ -440,7 +442,9 @@ def mac_platforms(
compat_version = 10, minor_version
binary_formats = _mac_binary_formats(compat_version, arch)
for binary_format in binary_formats:
yield f"macosx_10_{minor_version}_{binary_format}"
yield "macosx_{major}_{minor}_{binary_format}".format(
major=10, minor=minor_version, binary_format=binary_format
)

if version >= (11, 0):
# Starting with Mac OS 11, each yearly release bumps the major version
Expand All @@ -449,7 +453,9 @@ def mac_platforms(
compat_version = major_version, 0
binary_formats = _mac_binary_formats(compat_version, arch)
for binary_format in binary_formats:
yield f"macosx_{major_version}_0_{binary_format}"
yield "macosx_{major}_{minor}_{binary_format}".format(
major=major_version, minor=0, binary_format=binary_format
)

if version >= (11, 0):
# Mac OS 11 on x86_64 is compatible with binaries from previous releases.
Expand All @@ -464,12 +470,20 @@ def mac_platforms(
compat_version = 10, minor_version
binary_formats = _mac_binary_formats(compat_version, arch)
for binary_format in binary_formats:
yield f"macosx_{compat_version[0]}_{compat_version[1]}_{binary_format}"
yield "macosx_{major}_{minor}_{binary_format}".format(
major=compat_version[0],
minor=compat_version[1],
binary_format=binary_format,
)
else:
for minor_version in range(16, 3, -1):
compat_version = 10, minor_version
binary_format = "universal2"
yield f"macosx_{compat_version[0]}_{compat_version[1]}_{binary_format}"
yield "macosx_{major}_{minor}_{binary_format}".format(
major=compat_version[0],
minor=compat_version[1],
binary_format=binary_format,
)


def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]:
Expand Down

0 comments on commit 351983d

Please sign in to comment.