Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into poerty_problem
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Jun 23, 2023
2 parents 1ce2091 + 5ef9f08 commit 8f569c4
Show file tree
Hide file tree
Showing 83 changed files with 1,080 additions and 621 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
needs: [dist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment: pypi
permissions:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.6.4
with:
user: __token__
password: ${{ secrets.pypi_password }}
- uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
matrix:
os: [ubuntu-20.04, windows-latest, macos-11]
python_version: ['3.11']
include:
- os: ubuntu-22.04
python_version: '3.7'
timeout-minutes: 180
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: wntrblm/nox@2022.11.21
- uses: wntrblm/nox@2023.04.22
with:
python-versions: "3.6, 3.7, 3.8, 3.9, 3.10, 3.11"
python-versions: "3.7, 3.8, 3.9, 3.10, 3.11, 3.12-dev"

- name: "Run update: dependencies"
run: nox --force-color -s update_constraints
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Create Pull Request
if: github.ref == 'refs/heads/main' && github.repository == 'pypa/cibuildwheel'
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update dependencies
title: '[Bot] Update dependencies'
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/update-major-minor-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Update the vX.Y tag

on:
release:
types: [released]
workflow_dispatch:
inputs:
TAG_NAME:
description: 'Tag name that the major.minor tag will point to'
required: true

env:
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}

jobs:
update_tag:
name: Update the major.minor tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
environment:
name: releaseNewActionVersion
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- name: Update the ${{ env.TAG_NAME }} tag
id: update-major-minor-tag
uses: joerick/update-vX.Y-tag-action@v1.0
with:
source-tag: ${{ env.TAG_NAME }}
21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.243
rev: v0.0.272
hooks:
- id: ruff
args: ["--fix"]
args: ["--fix", "--show-fixes"]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
rev: v2.3.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers, --max-py-version=3.11]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
rev: v1.3.0
hooks:
- id: mypy
name: mypy 3.7 on cibuildwheel/
Expand All @@ -46,20 +46,19 @@ repos:
- tomli_w
- types-certifi
- types-click
- types-dataclasses
- types-jinja2
- types-pyyaml
- types-requests
- bracex
- dataclasses
- markdown-it-py<3
- id: mypy
name: mypy 3.10
name: mypy 3.11
exclude: ^cibuildwheel/resources/.*py$
args: ["--python-version=3.10"]
args: ["--python-version=3.11"]
additional_dependencies: *mypy-dependencies

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.2
rev: v0.9.0.5
hooks:
- id: shellcheck

Expand All @@ -79,7 +78,7 @@ repos:
files: ^docs/changelog.md$

- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.5
hooks:
- id: codespell
args: ["-L", "sur"]
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ jobs:
language: shell
before_install:
- choco upgrade python3 -y --version 3.7.9 --limit-output
# Update root certificates to fix SSL error; see http://www.chawn.com/RootCerts.htm
- powershell "md C:\temp\certs; CertUtil -generateSSTFromWU C:\temp\certs\RootStore.sst; Get-ChildItem -Path C:\\temp\certs\Rootstore.sst | Import-Certificate -CertStoreLocation Cert:\\LocalMachine\\Root\\ | out-null"
env:
- PYTHON=C:\\Python37\\python

Expand Down
12 changes: 6 additions & 6 deletions CI.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
This is a summary of the Python versions and platforms covered by the different CI platforms:

| | 3.7 | 3.8 | 3.9 | 3.10 | 3.11 |
|---------|-----------------------|--------------------------|----------|-----------|----------------|
| Linux | AppVeyor¹ / Travis CI | Azure Pipelines / GitLab | CircleCI | Cirrus CI | GitHub Actions |
| macOS | AppVeyor¹ / Travis CI | Azure Pipelines | CircleCI | Cirrus CI | GitHub Actions |
| Windows | AppVeyor¹ / Travis CI | Azure Pipelines | | Cirrus CI | GitHub Actions |
| | 3.7 | 3.8 | 3.9 | 3.10 | 3.11 |
|---------|-----------|---------------------------------------|-----------|-----------|----------------|
| Linux | Travis CI | AppVeyor¹ / Azure Pipelines / GitLab¹ | CircleCI¹ | Cirrus CI | GitHub Actions |
| macOS | Travis CI | AppVeyor¹ / Azure Pipelines | CircleCI¹ | Cirrus CI | GitHub Actions |
| Windows | Travis CI | AppVeyor¹ / Azure Pipelines / GitLab¹ | | Cirrus CI | GitHub Actions |

> ¹ AppVeyor only runs the "basic" test to reduce load.
> ¹ Runs a reduced set of tests to reduce CI load
Non-x86 architectures are covered on Travis CI using Python 3.7.
65 changes: 31 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ What does it do?
| CPython 3.9 ||||| ✅² | ✅³ |||||
| CPython 3.10 ||||| ✅² ||||||
| CPython 3.11 ||||| ✅² ||||||
| CPython 3.12⁵ ||||| ✅² ||||||
| PyPy 3.7 v7.3 || N/A || N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
| PyPy 3.8 v7.3 || ✅⁴ || N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
| PyPy 3.9 v7.3 || ✅⁴ || N/A | N/A | ✅¹ | ✅¹ | ✅¹ | N/A | N/A |
Expand All @@ -39,6 +40,7 @@ What does it do?
<sup>² Windows arm64 support is experimental.</sup><br>
<sup>³ Alpine 3.14 and very briefly 3.15's default python3 [was not able to load](https://github.com/pypa/cibuildwheel/issues/934) musllinux wheels. This has been fixed; please upgrade the python package if using Alpine from before the fix.</sup><br>
<sup>⁴ Cross-compilation not supported with PyPy - to build these wheels you need to run cibuildwheel on an Apple Silicon machine.</sup><br>
<sup>⁵ CPython 3.12 is available using the [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons) option.</sup><br>

- Builds manylinux, musllinux, macOS 10.9+, and Windows wheels for CPython and PyPy
- Works on GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, GitLab CI, and Cirrus CI
Expand Down Expand Up @@ -94,7 +96,7 @@ jobs:
- uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.0
run: python -m pip install cibuildwheel==2.13.1

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -158,26 +160,26 @@ Here are some repos that use cibuildwheel.
| Name | CI | OS | Notes |
|-----------------------------------|----|----|:------|
| [scikit-learn][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The machine learning library. A complex but clean config using many of cibuildwheel's features to build a large project with Cython and C++ extensions. |
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
| [NumPy][] | ![github icon][] ![travisci icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The fundamental package for scientific computing with Python. |
| [Tornado][] | ![travisci icon][] | ![apple icon][] ![linux icon][] | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
| [pytorch-fairseq][] | ![github icon][] | ![apple icon][] ![linux icon][] | Facebook AI Research Sequence-to-Sequence Toolkit written in Python. |
| [Matplotlib][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | The venerable Matplotlib, a Python library with C++ portions |
| [NCNN][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | ncnn is a high-performance neural network inference framework optimized for the mobile platform |
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
| [Prophet][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth. |
| [Kivy][] | ![github icon][] | ![windows icon][] ![apple icon][] ![linux icon][] | Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS |
| [MyPy][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | The compiled version of MyPy using MyPyC. |
| [pydantic][] | ![github icon][] | ![apple icon][] ![linux icon][] ![windows icon][] | Data parsing and validation using Python type hints |
| [MemRay][] | ![github icon][] | ![linux icon][] | Memray is a memory profiler for Python |

[scikit-learn]: https://github.com/scikit-learn/scikit-learn
[pytorch-fairseq]: https://github.com/pytorch/fairseq
[NumPy]: https://github.com/numpy/numpy
[Tornado]: https://github.com/tornadoweb/tornado
[pytorch-fairseq]: https://github.com/pytorch/fairseq
[Matplotlib]: https://github.com/matplotlib/matplotlib
[NCNN]: https://github.com/Tencent/ncnn
[Kivy]: https://github.com/kivy/kivy
[Prophet]: https://github.com/facebook/prophet
[Kivy]: https://github.com/kivy/kivy
[MyPy]: https://github.com/mypyc/mypy_mypyc-wheels
[pydantic]: https://github.com/samuelcolvin/pydantic
[MemRay]: https://github.com/bloomberg/memray

[appveyor icon]: docs/data/readme_icons/appveyor.svg
[github icon]: docs/data/readme_icons/github.svg
Expand Down Expand Up @@ -210,47 +212,42 @@ Changelog

<!-- this section was generated by bin/update_readme_changelog.py -- do not edit manually -->

### v2.12.0
### v2.13.1

_10 June 2023_

- 🛠 Updates the prerelease CPython 3.12 version to 3.12.0b2. (#1516)
- 🛠 Adds a moving `v<major>.<minor>` tag for use in GitHub Actions workflow files. If you use this, you'll get the latest patch release within a minor version. Additionally, Dependabot won't send you PRs for patch releases. (#1517)

_16 Jan 2023_
### v2.13.0

- ✨ Adds support for PyPy arm64 wheels. This means that you can build PyPy wheels for Apple Silicon machines. Cross-compilation is not supported for these wheels, so you'll have to build on an Apple Silicon machine. (#1372)
- 🛠 Pinned version updates, including PyPy to v7.3.11 and setuptools to 66.0.0.
_28 May 2023_

### v2.11.4
- ✨ Adds CPython 3.12 support, under the prerelease flag [CIBW_PRERELEASE_PYTHONS](https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons). This version of cibuildwheel uses 3.12.0b1.

_24 Dec 2022_
While CPython is in beta, the ABI can change, so your wheels might not be compatible with the final release. For this reason, we don't recommend distributing wheels until RC1, at which point 3.12 will be available in cibuildwheel without the flag. (#1507)

- 🐛 Fix a bug that caused missing wheels on Windows when a test was skipped using CIBW_TEST_SKIP (#1377)
- 🛠 Updates CPython 3.11 to 3.11.1 (#1371)
- 🛠 Updates PyPy to 7.3.10, except on macOS which remains on 7.3.9 due to a bug on that platform. (#1371)
- 📚 Added a reference to abi3audit to the docs (#1347)
- ✨ Adds the ability to pass arguments to the container engine when the container is created, using the [CIBW_CONTAINER_ENGINE](https://cibuildwheel.readthedocs.io/en/stable/options/#container-engine) option. (#1499)

### v2.11.3
### v2.12.3

_5 Dec 2022_
_19 April 2023_

- ✨ Improves the 'build options' log output that's printed at the start of each run (#1352)
- ✨ Added a friendly error message to a common misconfiguration of the `CIBW_TEST_COMMAND` option - not specifying path using the `{project}` placeholder (#1336)
- 🛠 The GitHub Action now uses Powershell on Windows to avoid occasional incompabilities with bash (#1346)
- 🐛 Fix an import error when running on Python 3.7. (#1479)

### v2.11.2
### v2.12.2

_26 October 2022_
_18 April 2023_

- 🛠 Updates CPython 3.11 to 3.11.0 - final release (#1327)
- 🛠 Simplify the default macOS repair command (#1322)
- 🛠 Fix the default `MACOSX_DEPLOYMENT_TARGET` on arm64 (#1312)
- 🛠 Hide irrelevant pip warnings on linux (#1311)
- 🐛 Fix a bug that caused the stdout and stderr of commands in containers to be in the wrong order Previously, stdout could appear after stderr. (#1324)
- 📚 Added [a FAQ entry](https://cibuildwheel.readthedocs.io/en/stable/faq/#macos-building-cpython-38-wheels-on-arm64) describing how to perform native builds of CPython 3.8 wheels on Apple Silicon. (#1323)
- 📚 Other docs improvements
- 🐛 Fix a bug that caused an extra empty config-setting to be passed to the backend when CIBW_BUILD_FRONTEND is set to `build`. (#1474)
- 🐛 Fix a crash that occurred when overwriting an existing wheel on Windows. (#1464)
- 🛠 Pinned version updates, including CPython 3.10.11, 3.11.3, pip 23.1 and wheel 0.40.0.

### v2.11.1
### v2.12.1

_13 October 2022_
_11 March 2023_

- 🛠 Updates to the latest manylinux images, and updates CPython 3.10 to 3.10.8.
- 🐛 Fix a bug that prevented the use of CIBW_CONFIG_SETTINGS with the 'pip' build backend. (#1430)

<!-- END bin/update_readme_changelog.py -->

Expand Down
10 changes: 5 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
APPVEYOR_JOB_NAME: "python37-x64-ubuntu"
APPVEYOR_JOB_NAME: "python38-x64-ubuntu"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
APPVEYOR_JOB_NAME: "python37-x64-vs2015"
APPVEYOR_JOB_NAME: "python38-x64-vs2015"
- APPVEYOR_BUILD_WORKER_IMAGE: macos
APPVEYOR_JOB_NAME: "python37-x64-macos"
APPVEYOR_JOB_NAME: "python38-x64-macos"

stack: python 3.7
stack: python 3.8

build: off

init:
- cmd: set PATH=C:\Python37;C:\Python37\Scripts;%PATH%
- cmd: set PATH=C:\Python38;C:\Python38\Scripts;%PATH%
- ps: |
$BRANCH = if ($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH) { $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH } else { $env:APPVEYOR_REPO_BRANCH }
if (-not ($BRANCH -eq 'main' -or $BRANCH.ToLower().StartsWith('appveyor-'))) {
Expand Down
4 changes: 2 additions & 2 deletions bin/inspect_all_known_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from __future__ import annotations

import ast
from collections.abc import Iterable, Iterator
from pathlib import Path
from typing import Iterator

import click
import yaml
Expand Down Expand Up @@ -97,7 +97,7 @@ def save(self, filename: Path | str) -> None:
with open(filename, "w") as f:
yaml.safe_dump(self.contents, f, default_flow_style=False)

def on_each(self, repos: list[str]) -> Iterator[tuple[str, str, str | None]]:
def on_each(self, repos: Iterable[str]) -> Iterator[tuple[str, str, str | None]]:
for repo in repos:
print(f"[bold]{repo}:")
for filename in sorted(self.contents, reverse=True):
Expand Down
9 changes: 5 additions & 4 deletions bin/projects.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import textwrap
import urllib.request
import xml.dom.minidom
from collections.abc import Iterable, Mapping, Sequence
from datetime import datetime
from io import StringIO
from pathlib import Path
Expand All @@ -42,7 +43,7 @@
class Project:
NAME: int = 0

def __init__(self, config: dict[str, Any], github: Github | None = None):
def __init__(self, config: Mapping[str, Any], github: Github | None = None):
try:
self.name: str = config["name"]
self.gh: str = config["gh"]
Expand Down Expand Up @@ -149,7 +150,7 @@ def path_for_icon(icon_name: str, relative_to: Path | None = None) -> Path:


def get_projects(
config: list[dict[str, Any]],
config: Iterable[Mapping[str, Any]],
*,
online: bool = True,
auth: str | None = None,
Expand All @@ -163,7 +164,7 @@ def get_projects(
return sorted((Project(item, github) for item in config), reverse=online)


def render_projects(projects: list[Project], *, dest_path: Path, include_info: bool = True):
def render_projects(projects: Sequence[Project], *, dest_path: Path, include_info: bool = True):
io = StringIO()
print = functools.partial(builtins.print, file=io)

Expand Down Expand Up @@ -191,7 +192,7 @@ def render_projects(projects: list[Project], *, dest_path: Path, include_info: b
def insert_projects_table(
file: Path,
*,
projects: list[Project],
projects: Sequence[Project],
input_filename: str,
include_info: bool = True,
):
Expand Down
Empty file modified bin/update_how_it_works_image.py
100644 → 100755
Empty file.
Loading

0 comments on commit 8f569c4

Please sign in to comment.