Skip to content

Commit 6773814

Browse files
committed
Merge remote-tracking branch 'origin/main' into release
2 parents 4857d9b + 7eac335 commit 6773814

Some content is hidden

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

41 files changed

+118
-2491
lines changed

.github/CODEOWNERS

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
By submitting this pull request, you agree to:
3+
- follow the [PSF's Code of Conduct](https://www.python.org/psf/conduct/)
4+
-->
5+
#### Description
6+
7+
-
8+
9+
<!--
10+
If applicable, please add in issue numbers this pull request will close, if applicable
11+
Examples: Fixes #4321 or Closes #1234
12+
13+
Ensure you are using a supported keyword to properly link an issue:
14+
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
15+
-->
16+
#### Closes
17+
18+
-
19+

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb
3232
- uses: actions/setup-python@v5
3333
with:
34-
python-version: 3.12.6
34+
python-version-file: '.python-version'
3535
- name: Cache Python dependencies
3636
uses: actions/cache@v4
3737
env:

.github/workflows/static.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check collectstatic
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Check out repository
8+
uses: actions/checkout@v4
9+
- uses: actions/setup-python@v5
10+
with:
11+
python-version-file: '.python-version'
12+
- name: Cache Python dependencies
13+
uses: actions/cache@v4
14+
env:
15+
cache-name: pythondotorg-cache-pip
16+
with:
17+
path: ~/.cache/pip
18+
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
19+
restore-keys: |
20+
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
21+
${{ runner.os }}-${{ github.job }}-
22+
${{ runner.os }}-
23+
- name: Install Python dependencies
24+
run: |
25+
pip install -U pip setuptools wheel
26+
pip install -r requirements.txt -r prod-requirements.txt
27+
- name: Run Tests
28+
run: |
29+
DJANGO_SETTINGS_MODULE=pydotorg.settings.static python manage.py collectstatic --noinput

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-bookworm
1+
FROM python:3.12.6-bookworm
22
ENV PYTHONUNBUFFERED=1
33
ENV PYTHONDONTWRITEBYTECODE=1
44

Dockerfile.cabotage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.12-bookworm
1+
FROM python:3.12.6-bookworm
22
COPY --from=ewdurbin/nginx-static:1.25.x /usr/bin/nginx /usr/bin/nginx
33
ENV PYTHONUNBUFFERED=1
44
ENV PYTHONDONTWRITEBYTECODE=1

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ default:
1010

1111
.state/docker-build-web: Dockerfile dev-requirements.txt base-requirements.txt
1212
# Build web container for this project
13-
docker-compose build --force-rm web
13+
docker compose build --force-rm web
1414

1515
# Mark the state so we don't rebuild this needlessly.
1616
mkdir -p .state && touch .state/docker-build-web
@@ -24,35 +24,35 @@ default:
2424

2525
.state/db-initialized: .state/docker-build-web .state/db-migrated
2626
# Load all fixtures
27-
docker-compose run --rm web ./manage.py loaddata fixtures/*.json
27+
docker compose run --rm web ./manage.py loaddata fixtures/*.json
2828

2929
# Mark the state so we don't rebuild this needlessly.
3030
mkdir -p .state && touch .state/db-initialized
3131

3232
serve: .state/db-initialized
33-
docker-compose up --remove-orphans
33+
docker compose up --remove-orphans
3434

3535
migrations: .state/db-initialized
3636
# Run Django makemigrations
37-
docker-compose run --rm web ./manage.py makemigrations
37+
docker compose run --rm web ./manage.py makemigrations
3838

3939
migrate: .state/docker-build-web
4040
# Run Django migrate
41-
docker-compose run --rm web ./manage.py migrate
41+
docker compose run --rm web ./manage.py migrate
4242

4343
manage: .state/db-initialized
4444
# Run Django manage to accept arbitrary arguments
45-
docker-compose run --rm web ./manage.py $(filter-out $@,$(MAKECMDGOALS))
45+
docker compose run --rm web ./manage.py $(filter-out $@,$(MAKECMDGOALS))
4646

4747
shell: .state/db-initialized
48-
docker-compose run --rm web ./manage.py shell
48+
docker compose run --rm web ./manage.py shell
4949

5050
clean:
51-
docker-compose down -v
51+
docker compose down -v
5252
rm -f .state/docker-build-web .state/db-initialized .state/db-migrated
5353

5454
test: .state/db-initialized
55-
docker-compose run --rm web ./manage.py test
55+
docker compose run --rm web ./manage.py test
5656

5757
docker_shell: .state/db-initialized
58-
docker-compose run --rm web /bin/bash
58+
docker compose run --rm web /bin/bash

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55

66
### General information
77

8-
This is the repository and issue tracker for [python.org](https://www.python.org).
9-
The repository for CPython itself is at https://github.com/python/cpython, and the
10-
issue tracker is at https://github.com/python/cpython/issues/.
8+
This is the repository and issue tracker for [python.org](https://www.python.org).
119

12-
Issues related to [Python's documentation](https://docs.python.org) can be filed in
13-
https://github.com/python/cpython/issues/.
10+
> [!NOTE]
11+
> The repository for CPython itself is at https://github.com/python/cpython, and the
12+
> issue tracker is at https://github.com/python/cpython/issues/.
13+
>
14+
> Similarly, issues related to [Python's documentation](https://docs.python.org) can be filed in
15+
> https://github.com/python/cpython/issues/.
1416
1517
### Contributing
1618

@@ -19,5 +21,4 @@ https://github.com/python/cpython/issues/.
1921
* Documentation: https://pythondotorg.readthedocs.io/
2022
* Mailing list: [pydotorg-www](https://mail.python.org/mailman/listinfo/pydotorg-www)
2123
* IRC: `#pydotorg` on Freenode
22-
* Staging site: https://staging.python.org/ (`main` branch)
2324
* License: Apache License

base-requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ python-decouple==3.4
1515
# lxml used by BeautifulSoup.
1616
lxml==5.2.2
1717
cssselect==1.1.0
18-
feedparser==6.0.8
19-
beautifulsoup4==4.11.2
18+
feedparser==6.0.11
19+
beautifulsoup4==4.12.3
2020
icalendar==4.0.7
2121
chardet==4.0.0
2222
celery[redis]==5.3.6
@@ -43,7 +43,7 @@ django-waffle==2.2.1
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.4.3
46-
django-widget-tweaks==1.4.8
46+
django-widget-tweaks==1.5.0
4747
django-countries==7.2.1
4848
num2words==0.5.10
4949
django-polymorphic==3.1.0 # 3.1.0 is first version that supports Django 4.0, unsure if it fully supports 4.2

downloads/tests/test_views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
from django.urls import reverse
66
from django.test import TestCase, override_settings
77

8-
from rest_framework.authtoken.models import Token
98
from rest_framework.test import APITestCase
109

1110
from .base import BaseDownloadTests, DownloadMixin
12-
from ..models import OS, Release
11+
from ..models import Release
1312
from pages.factories import PageFactory
1413
from pydotorg.drf import BaseAPITestCase
1514
from users.factories import UserFactory

events/importer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ def import_occurrence(self, event, event_data):
2222
# but won't add any timezone information. We will convert them to
2323
# aware datetime objects manually.
2424
dt_start = extract_date_or_datetime(event_data['DTSTART'].dt)
25-
dt_end = extract_date_or_datetime(event_data['DTEND'].dt)
25+
if 'DTEND' in event_data:
26+
# DTEND is not always set on events, in particular it seems that
27+
# events which have the same start and end time, don't provide
28+
# DTEND. See #2021.
29+
dt_end = extract_date_or_datetime(event_data['DTEND'].dt)
30+
else:
31+
dt_end = dt_start
2632

2733
# Let's mark those occurrences as 'all-day'.
2834
all_day = (

events/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class OccurringRule(RuleMixin, models.Model):
237237

238238
def __str__(self):
239239
strftime = settings.SHORT_DATETIME_FORMAT
240-
return f'{self.event.title} {date(self.dt_start.strftime, strftime)} - {date(self.dt_end.strftime, strftime)}'
240+
return f'{self.event.title} {date(self.dt_start, strftime)} - {date(self.dt_end, strftime)}'
241241

242242
@property
243243
def begin(self):
@@ -283,8 +283,8 @@ class RecurringRule(RuleMixin, models.Model):
283283
all_day = models.BooleanField(default=False)
284284

285285
def __str__(self):
286-
strftime = settings.SHORT_DATETIME_FORMAT
287-
return f'{self.event.title} every {timedelta_nice_repr(self.interval)} since {date(self.dt_start.strftime, strftime)}'
286+
return (f'{self.event.title} every {timedelta_nice_repr(self.freq_interval_as_timedelta)} since '
287+
f'{date(self.dt_start, settings.SHORT_DATETIME_FORMAT)}')
288288

289289
def to_rrule(self):
290290
return rrule(

fixtures/boxes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@
318318
"created": "2014-02-13T17:37:50.862Z",
319319
"updated": "2014-02-16T23:01:04.762Z",
320320
"label": "widget-weneedyou",
321-
"content": "<h2 class=\"widget-title\"><span class=\"prompt\">&gt;&gt;&gt;</span> <a href=\"#\">Python Needs You</a></h2>\r\n<p>Open source software is made better when users can easily contribute code and documentation to fix bugs and add features. Python strongly encourages community involvement in improving the software. <a href=\"//docs.python.org/devguide\">Learn more</a> about how to make Python better for everyone.</p>\r\n<p class=\"click-these\">\r\n <a class=\"button\" href=\"//docs.python.org/devguide/#contributing\">Contribute to Python</a>\r\n <a class=\"button\" href=\"//bugs.python.org\">Bug Tracker</a>\r\n</p>",
321+
"content": "<h2 class=\"widget-title\"><span class=\"prompt\">&gt;&gt;&gt;</span> <a href=\"#\">Python Needs You</a></h2>\r\n<p>Open source software is made better when users can easily contribute code and documentation to fix bugs and add features. Python strongly encourages community involvement in improving the software. <a href=\"//docs.python.org/devguide\">Learn more</a> about how to make Python better for everyone.</p>\r\n<p class=\"click-these\">\r\n <a class=\"button\" href=\"//docs.python.org/devguide/#contributing\">Contribute to Python</a>\r\n <a class=\"button\" href=\"//github.com/python/cpython/issues\">Bug Tracker</a>\r\n</p>",
322322
"content_markup_type": "html",
323-
"_content_rendered": "<h2 class=\"widget-title\"><span class=\"prompt\">&gt;&gt;&gt;</span> <a href=\"#\">Python Needs You</a></h2>\r\n<p>Open source software is made better when users can easily contribute code and documentation to fix bugs and add features. Python strongly encourages community involvement in improving the software. <a href=\"//docs.python.org/devguide\">Learn more</a> about how to make Python better for everyone.</p>\r\n<p class=\"click-these\">\r\n <a class=\"button\" href=\"//docs.python.org/devguide/#contributing\">Contribute to Python</a>\r\n <a class=\"button\" href=\"//bugs.python.org\">Bug Tracker</a>\r\n</p>"
323+
"_content_rendered": "<h2 class=\"widget-title\"><span class=\"prompt\">&gt;&gt;&gt;</span> <a href=\"#\">Python Needs You</a></h2>\r\n<p>Open source software is made better when users can easily contribute code and documentation to fix bugs and add features. Python strongly encourages community involvement in improving the software. <a href=\"//docs.python.org/devguide\">Learn more</a> about how to make Python better for everyone.</p>\r\n<p class=\"click-these\">\r\n <a class=\"button\" href=\"//docs.python.org/devguide/#contributing\">Contribute to Python</a>\r\n <a class=\"button\" href=\"//github.com/python/cpython/issues\">Bug Tracker</a>\r\n</p>"
324324
}
325325
},
326326
{
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Generated by Django 4.2.16 on 2024-09-13 17:30
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('jobs', '0021_alter_job_creator_alter_job_last_modified_by_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AlterModelOptions(
14+
name='jobtype',
15+
options={'ordering': ('name',), 'verbose_name': 'job types', 'verbose_name_plural': 'job types'},
16+
),
17+
migrations.AlterField(
18+
model_name='job',
19+
name='job_types',
20+
field=models.ManyToManyField(blank=True, limit_choices_to={'active': True}, related_name='jobs', to='jobs.jobtype', verbose_name='Job types'),
21+
),
22+
migrations.AlterField(
23+
model_name='job',
24+
name='other_job_type',
25+
field=models.CharField(blank=True, max_length=100, verbose_name='Other job types'),
26+
),
27+
]

jobs/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ class JobType(NameSlugModel):
3030
objects = JobTypeQuerySet.as_manager()
3131

3232
class Meta:
33-
verbose_name = 'job technologies'
34-
verbose_name_plural = 'job technologies'
33+
verbose_name = 'job types'
34+
verbose_name_plural = 'job types'
3535
ordering = ('name', )
3636

3737

@@ -59,11 +59,11 @@ class Job(ContentManageable):
5959
JobType,
6060
related_name='jobs',
6161
blank=True,
62-
verbose_name='Job technologies',
62+
verbose_name='Job types',
6363
limit_choices_to={'active': True},
6464
)
6565
other_job_type = models.CharField(
66-
verbose_name='Other job technologies',
66+
verbose_name='Other job types',
6767
max_length=100,
6868
blank=True,
6969
)

peps/__init__.py

Whitespace-only changes.

peps/apps.py

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

0 commit comments

Comments
 (0)