Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# See https://help.github.com/articles/about-codeowners/
# for more info about CODEOWNERS file

# It uses the same pattern rule for gitignore file
# https://git-scm.com/docs/gitignore#_pattern_format

# asyncio
**/*asyncio* @1st1 @asvetlov

# Core
**/*context* @1st1
**/*genobject* @1st1
**/*hamt* @1st1

# Hashing
**/*hashlib* @python/crypto-team
**/*pyhash* @python/crypto-team

# Import (including importlib).
# Ignoring importlib.h so as to not get flagged on
# all pull requests that change the emitted
# bytecode.
**/*import*.c @python/import-team
**/*import*.py @python/import-team


# SSL
**/*ssl* @python/crypto-team

# CSPRNG
Python/bootstrap_hash.c @python/crypto-team

# Email and related
**/*mail* @python/email-team
**/*smtp* @python/email-team
**/*mime* @python/email-team
**/*imap* @python/email-team
**/*poplib* @python/email-team

# subprocess
**/*subprocess* @gpshead

# Windows
/PC/ @python/windows-team
/PCbuild/ @python/windows-team

# Windows installer packages
/Tools/msi/ @python/windows-team
/Tools/nuget/ @python/windows-team

**/*itertools* @rhettinger
**/*collections* @rhettinger
**/*random* @rhettinger
**/*queue* @rhettinger
**/*bisect* @rhettinger
**/*heapq* @rhettinger
**/*functools* @ncoghlan @rhettinger
**/*decimal* @rhettinger @skrah

**/*dataclasses* @ericvsmith

**/*idlelib* @terryjreedy

**/*typing* @gvanrossum @ilevkivskyi
67 changes: 67 additions & 0 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Contributing to Python
======================

Build Status
------------

- master

+ `Stable buildbots <http://buildbot.python.org/3.x.stable/>`_

- 3.7

+ `Stable buildbots <http://buildbot.python.org/3.7.stable/>`_

- 3.6

+ `Stable buildbots <http://buildbot.python.org/3.6.stable/>`_

- 2.7

+ `Stable buildbots <http://buildbot.python.org/2.7.stable/>`_


Thank You
---------
First off, thanks for contributing to the maintenance of the Python programming
language and the CPython interpreter! Even if your contribution is not
ultimately accepted, the fact you put time and effort into helping out is
greatly appreciated.


Contribution Guidelines
-----------------------
Please read the `devguide <https://devguide.python.org/>`_ for
guidance on how to contribute to this project. The documentation covers
everything from how to build the code to submitting a pull request. There are
also suggestions on how you can most effectively help the project.

Please be aware that our workflow does deviate slightly from the typical GitHub
project. Details on how to properly submit a pull request are covered in
`Lifecycle of a Pull Request <https://devguide.python.org/pullrequest/>`_.
We utilize various bots and status checks to help with this, so do follow the
comments they leave and their "Details" links, respectively. The key points of
our workflow that are not covered by a bot or status check are:

- All discussions that are not directly related to the code in the pull request
should happen on bugs.python.org
- Upon your first non-trivial pull request (which includes documentation changes),
feel free to add yourself to ``Misc/ACKS``


Setting Expectations
--------------------
Due to the fact that this project is entirely volunteer-run (i.e. no one is paid
to work on Python full-time), we unfortunately can make no guarantees as to if
or when a core developer will get around to reviewing your pull request.
If no core developer has done a review or responded to changes made because of a
"changes requested" review, please feel free to email python-dev to ask if
someone could take a look at your pull request.


Code of Conduct
---------------
All interactions for this project are covered by the
`PSF Code of Conduct <https://www.python.org/psf/codeofconduct/>`_. Everyone is
expected to be open, considerate, and respectful of others no matter their
position within the project.
15 changes: 9 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## CPython Mirror
!!! If this is a backport PR (PR made against branches other than `master`),
please ensure that the PR title is in the following format:

https://github.com/python/cpython is a cpython mirror repository. Pull requests
are not accepted on this repo and will be automatically closed.
```
[X.Y] <title from the original PR> (GH-NNNN)
```

### Submit patches at https://bugs.python.org
Where: [X.Y] is the branch name, e.g. [3.7].

For additional information about contributing to CPython, see the
[developer's guide](https://docs.python.org/devguide/#contributing).
GH-NNNN refers to the PR number from `master`.

PLEASE: Remove this headline!!!
38 changes: 0 additions & 38 deletions .github/appveyor.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/codecov.yml

This file was deleted.

137 changes: 137 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Tests

# Cancel in-progress runs for the same PR.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:

jobs:
check_source:
name: 'Check for source changes'
runs-on: ubuntu-latest
outputs:
run_tests: ${{ steps.check.outputs.run_tests }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1000
- name: Check for source changes
id: check
run: |
if [ -z "$GITHUB_BASE_REF" ]; then
echo "run_tests=true" >> "$GITHUB_OUTPUT"
else
git fetch origin $GITHUB_BASE_REF --depth=1
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> "$GITHUB_OUTPUT" || true
fi

opensuse-tests:
name: '${{ matrix.name }} (openSUSE Leap)'
runs-on: ubuntu-latest
needs: check_source
if: needs.check_source.outputs.run_tests == 'true'

# Use a specific image version for reproducible builds
container:
image: opensuse/leap:15.5

strategy:
fail-fast: false
matrix:
include:
- name: 'Check ABI'
task: 'abi'
- name: 'Check Generated Files'
task: 'generated-files'
- name: 'Build and Test'
task: 'build-and-test'

env:
OPENSSL_VER: 1.1.1u

steps:
- name: Install All Dependencies
run: |
zypper --non-interactive install --auto-agree-with-licenses \
git \
tar \
gcc \
make \
python3 \
libabigail-tools \
xorg-x11-server-Xvfb \
libffi-devel \
zlib-devel \
ncurses-devel \
gdbm-devel \
sqlite3-devel \
tk-devel \
readline-devel \
xz-devel \
bzip2 \
openssl \
xvfb-run

- uses: actions/checkout@v4

- name: 'Restore OpenSSL build'
if: matrix.task == 'build-and-test'
id: cache-openssl
uses: actions/cache@v4
with:
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
key: opensuse-leap-multissl-openssl-${{ env.OPENSSL_VER }}

# === Steps for ABI Check ===
- name: Build CPython for ABI Check
if: matrix.task == 'abi'
env:
CFLAGS: -g3 -O0
run: |
./configure --enable-shared
make -j4
- name: Check for changes in the ABI
if: matrix.task == 'abi'
run: make check-abidump

# === Steps for Generated Files Check ===
- name: Build CPython for Generated Files Check
# if: matrix.task == 'generated-files'
if: false
run: |
./configure --with-pydebug
make -j4 regen-all
- name: Check for changes in generated files
# if: matrix.task == 'generated-files'
if: false
run: |
if ! git diff --quiet; then
echo "Generated files are not up to date. Please run 'make regen-all' and commit the changes."
git status
git diff
exit 1
fi
- name: Check exported libpython symbols
# if: matrix.task == 'generated-files'
if: false
run: make smelly

# === Steps for Full Build and Test ===
- name: Install OpenSSL
if: matrix.task == 'build-and-test' && steps.cache-openssl.outputs.cache-hit != 'true'
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
- name: Configure CPython
if: matrix.task == 'build-and-test'
run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
- name: Build CPython
if: matrix.task == 'build-and-test'
run: make -j4
- name: Display build info
if: matrix.task == 'build-and-test'
run: make pythoninfo
- name: Run tests
if: matrix.task == 'build-and-test'
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
36 changes: 36 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Docs

on:
#push:
# branches:
# - master
# - 3.8
# - 3.7
# paths:
# - 'Doc/**'
pull_request:
paths:
- 'Doc/**'
- 'Misc/**'

jobs:
build_doc:
name: 'Docs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 'Install Dependencies'
run: sudo ./.github/workflows/posix-deps-zypp.sh && sudo apt-get install wamerican
- name: 'Configure CPython'
run: ./configure --with-pydebug
- name: 'Build CPython'
run: make -j4
- name: 'Install build dependencies'
run: make -C Doc/ PYTHON=../python venv
- name: 'Build documentation'
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W -j4" suspicious html
- name: 'Upload'
uses: actions/upload-artifact@v1
with:
name: doc-html
path: Doc/build/html
Loading
Loading