Skip to content

Commit 05a8ccb

Browse files
authored
Merge branch 'python:main' into main
2 parents 86cb81f + 902fb39 commit 05a8ccb

Some content is hidden

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

48 files changed

+650
-328
lines changed

.github/ISSUE_TEMPLATE/BUG.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: "Bug Report"
2-
description: Report a bug with pyton.org website to help us improve
2+
description: Report a bug with python.org website to help us improve
33
title: "Bug: <title>"
44
labels: ["bug", "Triage Required"]
55

66
body:
77
- type: markdown
88
attributes:
99
value: |
10-
This is the repository and issue tracker for the https://www.pyton.org website.
10+
This is the repository and issue tracker for the https://www.python.org website.
1111
1212
If you're looking to file an issue with CPython itself, please click here: [CPython Issues](https://github.com/python/cpython/issues/new/choose).
1313

.github/ISSUE_TEMPLATE/DOCS.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
- type: markdown
88
attributes:
99
value: |
10-
This is the repository and issue tracker for the https://www.pyton.org website.
10+
This is the repository and issue tracker for the https://www.python.org website.
1111
1212
If you're looking to file an issue with CPython itself, please click here: [CPython Issues](https://github.com/python/cpython/issues/new/choose).
1313

.github/ISSUE_TEMPLATE/REQUEST.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: "Feature Request"
2-
description: Suggest an idea for www.pyton.org
2+
description: Suggest an idea for www.python.org
33
title: "Enhancement: <title>"
44
labels: ["enhancement"]
55

66
body:
77
- type: markdown
88
attributes:
99
value: |
10-
This is the repository and issue tracker for the https://www.pyton.org website.
10+
This is the repository and issue tracker for the https://www.python.org website.
1111
1212
If you're looking to file an issue with CPython itself, please click here: [CPython Issues](https://github.com/python/cpython/issues/new/choose).
1313

.github/workflows/deployminder.yml

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

Makefile

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
default:
1+
help:
22
@echo "Call a specific subcommand:"
33
@echo
4-
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null\
5-
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}'\
6-
| sort\
7-
| grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'
4+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
5+
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
86
@echo
9-
@exit 1
7+
8+
default: help
109

1110
.state/docker-build-web: Dockerfile dev-requirements.txt base-requirements.txt
1211
# Build web container for this project
@@ -29,30 +28,29 @@ default:
2928
# Mark the state so we don't rebuild this needlessly.
3029
mkdir -p .state && touch .state/db-initialized
3130

32-
serve: .state/db-initialized
31+
serve: .state/db-initialized ## Start the application
3332
docker compose up --remove-orphans
3433

35-
migrations: .state/db-initialized
36-
# Run Django makemigrations
34+
migrations: .state/db-initialized ## Generate migrations from models
3735
docker compose run --rm web ./manage.py makemigrations
3836

39-
migrate: .state/docker-build-web
40-
# Run Django migrate
37+
migrate: .state/docker-build-web ## Run Django migrate
4138
docker compose run --rm web ./manage.py migrate
4239

43-
manage: .state/db-initialized
44-
# Run Django manage to accept arbitrary arguments
40+
manage: .state/db-initialized ## Run Django manage to accept arbitrary arguments
4541
docker compose run --rm web ./manage.py $(filter-out $@,$(MAKECMDGOALS))
4642

47-
shell: .state/db-initialized
43+
shell: .state/db-initialized ## Open Django interactive shell
4844
docker compose run --rm web ./manage.py shell
4945

50-
clean:
46+
clean: ## Clean up the environment
5147
docker compose down -v
5248
rm -f .state/docker-build-web .state/db-initialized .state/db-migrated
5349

54-
test: .state/db-initialized
50+
test: .state/db-initialized ## Run tests
5551
docker compose run --rm web ./manage.py test
5652

57-
docker_shell: .state/db-initialized
53+
docker_shell: .state/db-initialized ## Open a bash shell in the web container
5854
docker compose run --rm web /bin/bash
55+
56+
.PHONY: help serve migrations migrate manage shell clean test docker_shell

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.16
7+
Django==4.2.22
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

blogs/parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ def update_blog_supernav():
4848
pass
4949
else:
5050
rendered_box = _render_blog_supernav(latest_entry)
51-
box, _ = Box.objects.update_or_create(
51+
box, created = Box.objects.update_or_create(
5252
label='supernav-python-blog',
5353
defaults={
5454
'content': rendered_box,
5555
'content_markup_type': 'html',
5656
}
5757
)
58+
if not created:
59+
box.save()

codesamples/factories.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ def initial_data():
122122
<code>
123123
<span class=\"comment\"># Write Fibonacci series up to n</span>
124124
>>> def fib(n):
125-
>>> a, b = 0, 1
126-
>>> while a &lt; n:
127-
>>> print(a, end=' ')
128-
>>> a, b = b, a+b
129-
>>> print()
125+
... a, b = 0, 1
126+
... while a &lt; n:
127+
... print(a, end=' ')
128+
... a, b = b, a+b
129+
... print()
130+
...
130131
>>> fib(1000)
131132
<span class=\"output\">0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610</span>
132133
</code>

docs/source/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Indices and tables
3232
==================
3333

3434
* :ref:`genindex`
35-
* :ref:`modindex`
36-
* :ref:`search`
3735

3836
.. _python.org: https://www.python.org
3937
.. _pydotorg-www: https://mail.python.org/mailman/listinfo/pydotorg-www

downloads/managers.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ 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

2932
def latest_python3(self):
3033
return self.python3().filter(is_latest=True)
3134

35+
def latest_pymanager(self):
36+
return self.pymanager().filter(is_latest=True)
37+
3238
def pre_release(self):
3339
return self.filter(pre_release=True)
3440

@@ -50,3 +56,10 @@ def latest_python3(self):
5056
return qs[0]
5157
else:
5258
return None
59+
60+
def latest_pymanager(self):
61+
qs = self.get_queryset().latest_pymanager()
62+
if qs:
63+
return qs[0]
64+
else:
65+
return None

0 commit comments

Comments
 (0)