Skip to content

Commit be9a6b9

Browse files
authored
Merge branch 'main' into pr-combinator-option2
2 parents 2f936ca + e36232d commit be9a6b9

Some content is hidden

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

58 files changed

+1704
-915
lines changed

.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/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1919
steps:
2020
- name: Check out repository
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222
- name: Install platform dependencies
2323
run: |
2424
sudo apt -y update
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb
3333
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb
34-
- uses: actions/setup-python@v5
34+
- uses: actions/setup-python@v6
3535
with:
3636
python-version-file: '.python-version'
3737
- name: Cache Python dependencies

.github/workflows/deployminder.yml

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

.github/workflows/static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Check out repository
10-
uses: actions/checkout@v4
11-
- uses: actions/setup-python@v5
10+
uses: actions/checkout@v6
11+
- uses: actions/setup-python@v6
1212
with:
1313
python-version-file: '.python-version'
1414
- name: Cache Python dependencies

base-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ 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.18
7+
Django==4.2.26
88
docutils==0.21.2
99
Markdown==3.7
10-
cmarkgfm==0.6.0
10+
cmarkgfm==2024.11.20
1111
Pillow==10.4.0
1212
psycopg2-binary==2.9.9
1313
python3-openid==3.2.0

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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@ Contents:
2525
install.md
2626
contributing
2727
administration
28-
pep_generation
2928
commands
3029

3130
Indices and tables
3231
==================
3332

3433
* :ref:`genindex`
35-
* :ref:`modindex`
36-
* :ref:`search`
3734

3835
.. _python.org: https://www.python.org
3936
.. _pydotorg-www: https://mail.python.org/mailman/listinfo/pydotorg-www

docs/source/pep_generation.rst

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

downloads/admin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ class ReleaseAdmin(ContentManageableModelAdmin):
2525
list_filter = ['version', 'is_published', 'show_on_download_page']
2626
search_fields = ['name', 'slug']
2727
ordering = ['-release_date']
28+
29+
def formfield_for_dbfield(self, db_field, request, **kwargs):
30+
field = super().formfield_for_dbfield(db_field, request, **kwargs)
31+
if db_field.name == "name":
32+
field.widget.attrs["placeholder"] = "Python 3.X.YaN"
33+
return field

downloads/managers.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@ def python2(self):
2323
def python3(self):
2424
return self.filter(version=3, is_published=True)
2525

26+
def pymanager(self):
27+
return self.filter(version=100, is_published=True)
28+
2629
def latest_python2(self):
2730
return self.python2().filter(is_latest=True)
2831

29-
def latest_python3(self):
30-
return self.python3().filter(is_latest=True)
32+
def latest_python3(self, minor_version: int | None = None):
33+
if minor_version is None:
34+
return self.python3().filter(is_latest=True)
35+
pattern = rf"^Python 3\.{minor_version}\."
36+
return self.python3().filter(name__regex=pattern).order_by("-release_date")
37+
38+
def latest_pymanager(self):
39+
return self.pymanager().filter(is_latest=True)
3140

3241
def pre_release(self):
3342
return self.filter(pre_release=True)
@@ -38,15 +47,10 @@ def released(self):
3847

3948
class ReleaseManager(Manager.from_queryset(ReleaseQuerySet)):
4049
def latest_python2(self):
41-
qs = self.get_queryset().latest_python2()
42-
if qs:
43-
return qs[0]
44-
else:
45-
return None
46-
47-
def latest_python3(self):
48-
qs = self.get_queryset().latest_python3()
49-
if qs:
50-
return qs[0]
51-
else:
52-
return None
50+
return self.get_queryset().latest_python2().first()
51+
52+
def latest_python3(self, minor_version: int | None = None):
53+
return self.get_queryset().latest_python3(minor_version).first()
54+
55+
def latest_pymanager(self):
56+
return self.get_queryset().latest_pymanager().first()

0 commit comments

Comments
 (0)