Skip to content

Commit a8b9727

Browse files
authored
Merge branch 'main' into sentry-6931306293
2 parents 021501e + 72e1672 commit a8b9727

72 files changed

Lines changed: 2165 additions & 11771 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
static/sass/*.css linguist-vendored
2-
peps/tests/fake_pep_repo/*.html linguist-vendored
32
static/js/libs/*.js linguist-vendored
43
static/js/plugins/*.js linguist-vendored

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Notify @EWDurbin for all opened Issues and Pull Requests
2-
* @EWDurbin @JacobCoffee
2+
* @JacobCoffee

.github/workflows/ci.yml

Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,46 @@
11
name: CI
2-
on: [push, pull_request]
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
35
jobs:
6+
migrations:
7+
if: github.event_name != 'push' || github.event.repository.fork == true || github.ref == 'refs/heads/main'
8+
runs-on: ubuntu-latest
9+
services:
10+
postgres:
11+
image: postgres:15.3
12+
env:
13+
POSTGRES_USER: postgres
14+
POSTGRES_PASSWORD: postgres
15+
POSTGRES_DB: pythonorg
16+
ports:
17+
- 5432:5432
18+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
19+
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- uses: actions/setup-python@v6
24+
with:
25+
python-version-file: '.python-version'
26+
27+
- name: Cache pip
28+
uses: actions/cache@v5
29+
with:
30+
path: ~/.cache/pip
31+
key: ${{ runner.os }}-pip-${{ hashFiles('*-requirements.txt') }}
32+
restore-keys: ${{ runner.os }}-pip-
33+
34+
- name: Install dependencies
35+
run: pip install -r dev-requirements.txt
36+
37+
- name: Check for ungenerated migrations
38+
run: python manage.py makemigrations --check --dry-run
39+
env:
40+
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg
41+
442
test:
5-
# Avoid running CI more than once on pushes to main repo open PRs
6-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
43+
if: github.event_name != 'push' || github.event.repository.fork == true || github.ref == 'refs/heads/main'
744
runs-on: ubuntu-latest
845
services:
946
postgres:
@@ -13,52 +50,46 @@ jobs:
1350
POSTGRES_PASSWORD: postgres
1451
POSTGRES_DB: pythonorg
1552
ports:
16-
- 5432:5432
17-
# needed because the postgres container does not provide a healthcheck
53+
- 5432:5432
1854
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
55+
1956
steps:
20-
- name: Check out repository
21-
uses: actions/checkout@v5
57+
- uses: actions/checkout@v6
58+
2259
- name: Install platform dependencies
2360
run: |
2461
sudo apt -y update
2562
sudo apt -y install --no-install-recommends \
26-
texlive-latex-base \
27-
texlive-latex-recommended \
28-
texlive-plain-generic \
29-
lmodern
63+
texlive-latex-base \
64+
texlive-latex-recommended \
65+
texlive-plain-generic \
66+
lmodern
67+
3068
- name: Install pandoc
3169
run: |
3270
wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb
3371
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb
72+
3473
- uses: actions/setup-python@v6
3574
with:
36-
python-version-file: '.python-version'
37-
- name: Cache Python dependencies
38-
uses: actions/cache@v4
39-
env:
40-
cache-name: pythondotorg-cache-pip
75+
python-version-file: '.python-version'
76+
77+
- name: Cache pip
78+
uses: actions/cache@v5
4179
with:
4280
path: ~/.cache/pip
43-
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
44-
restore-keys: |
45-
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
46-
${{ runner.os }}-${{ github.job }}-
47-
${{ runner.os }}-
48-
- name: Install Python dependencies
81+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
82+
restore-keys: ${{ runner.os }}-pip-
83+
84+
- name: Install dependencies
4985
run: |
5086
pip install -U pip setuptools wheel
5187
pip install -r dev-requirements.txt
52-
- name: Check for ungenerated database migrations
53-
run: |
54-
python manage.py makemigrations --check --dry-run
88+
89+
- name: Run tests
90+
run: python -Wd -m coverage run manage.py test -v2
5591
env:
5692
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg
57-
- name: Run Tests
58-
run: |
59-
python -Wd -m coverage run manage.py test -v2
60-
env:
61-
DATABASE_URL: postgres://postgres:postgres@localhost:5432/pythonorg
62-
- name: Coverage
63-
run: |
64-
coverage report -m --fail-under=75
93+
94+
- name: Check coverage
95+
run: coverage report -m --fail-under=75

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions: {}
6+
7+
env:
8+
FORCE_COLOR: 1
9+
RUFF_OUTPUT_FORMAT: github
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
with:
18+
persist-credentials: false
19+
20+
- uses: actions/setup-python@v6
21+
with:
22+
python-version: "3.x"
23+
24+
- uses: j178/prek-action@v1

.github/workflows/static.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
name: Check collectstatic
2-
on: [push, pull_request]
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
35
jobs:
46
collectstatic:
5-
# Avoid running CI more than once on pushes to main repo open PRs
6-
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
7+
if: github.event_name != 'push' || github.event.repository.fork == true || github.ref == 'refs/heads/main'
78
runs-on: ubuntu-latest
89
steps:
910
- name: Check out repository
10-
uses: actions/checkout@v5
11+
uses: actions/checkout@v6
12+
1113
- uses: actions/setup-python@v6
1214
with:
1315
python-version-file: '.python-version'
1416
- name: Cache Python dependencies
15-
uses: actions/cache@v4
17+
uses: actions/cache@v5
1618
env:
1719
cache-name: pythondotorg-cache-pip
1820
with:

.pre-commit-config.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
repos:
2+
- repo: https://github.com/adamchainz/django-upgrade
3+
rev: 1.29.1
4+
hooks:
5+
- id: django-upgrade
6+
args: [--target-version=4.2]
7+
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v6.0.0
10+
hooks:
11+
- id: check-case-conflict
12+
- id: check-merge-conflict
13+
- id: check-json
14+
- id: check-yaml
15+
- id: debug-statements
16+
17+
- repo: https://github.com/python-jsonschema/check-jsonschema
18+
rev: 0.34.0
19+
hooks:
20+
- id: check-dependabot
21+
- id: check-github-workflows
22+
23+
- repo: https://github.com/rhysd/actionlint
24+
rev: v1.7.7
25+
hooks:
26+
- id: actionlint
27+
28+
- repo: meta
29+
hooks:
30+
- id: check-hooks-apply
31+
- id: check-useless-excludes
32+
33+
ci:
34+
autoupdate_schedule: quarterly

base-requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ django-sitetree==1.18.0 # >=1.17.1 is (?) first version that supports Django 4.
44
django-apptemplates==1.5
55
django-admin-interface==0.28.9
66
django-translation-aliases==0.1.0
7-
Django==4.2.25
7+
Django==4.2.28
88
docutils==0.21.2
99
Markdown==3.7
1010
cmarkgfm==2024.11.20
@@ -23,30 +23,30 @@ celery[redis]==5.4.0
2323
django-celery-beat==2.5.0
2424
# TODO: We may drop 'django-imagekit' completely.
2525
django-imagekit==5.0 # 5.0 is first version that supports Django 4.2
26-
django-haystack==3.2.1
26+
django-haystack==3.3.0
2727
elasticsearch>=7,<8
2828
# TODO: 0.14.0 only supports Django 1.8 and 1.11.
2929
django-tastypie==0.14.7 # 0.14.6 is first version that supports Django 4.2
3030

3131
pytz==2021.1
3232
python-dateutil==2.8.2
3333

34-
requests[security]>=2.26.0
34+
requests>=2.26.0
3535

3636
django-honeypot==1.0.4 # 1.0.4 is first version that supports Django 4.2
3737
django-markupfield==2.0.1
3838

39-
django-allauth==64.2.1
39+
django-allauth==65.13.0
4040

4141
django-waffle==2.2.1
4242

4343
djangorestframework==3.14.0 # 3.14.0 is first version that supports Django 4.1, 4.2 support hasnt been "released"
4444
django-filter==2.4.0
4545
django-ordered-model==3.7.4
4646
django-widget-tweaks==1.5.0
47-
django-countries==7.2.1
47+
django-countries==8.2.0
4848
num2words==0.5.13
49-
django-polymorphic==3.1.0 # 3.1.0 is first version that supports Django 4.0, unsure if it fully supports 4.2
49+
django-polymorphic==4.1.0
5050
sorl-thumbnail==12.11.0
5151
django-extensions==3.2.3
5252
django-import-export==2.7.1

docs/source/commands.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,3 @@ Command-line options
3535
.. option:: --app-label <app_label>
3636

3737
Create initial data with the *app_label* provided.
38-
39-
.. _command-generate-pep-pages:
40-
41-
generate_pep_pages
42-
------------------
43-
44-
This command generates ``pages.Page`` objects from the output
45-
of the existing PEP repository generation process. You run it like::
46-
47-
$ ./manage.py generate_pep_pages
48-
49-
To get verbose output, specify ``--verbosity`` option::
50-
51-
$ ./manage.py generate_pep_pages --verbosity=2
52-
53-
It uses the conversion code in the ``peps/converters.py`` file, in an
54-
attempt to normalize the formatting for display purposes.
55-
56-
.. _command-dump-pep-pages:
57-
58-
dump_pep_pages
59-
--------------
60-
61-
This command simply dumps our PEP related pages as JSON to :attr:`sys.stdout`.
62-
You can run like::
63-
64-
$ ./manage.py dump_pep_pages

docs/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Contents:
2525
install.md
2626
contributing
2727
administration
28-
pep_generation
2928
commands
3029

3130
Indices and tables

docs/source/pep_generation.rst

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)