Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/pillow-10.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee authored Sep 12, 2024
2 parents bdc0db3 + 624dc3a commit 359e217
Show file tree
Hide file tree
Showing 92 changed files with 1,376 additions and 181 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ updates:
- dependency-name: lxml
versions:
- 4.6.2
- package-ecosystem: github-actions
directory: "/"
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: daily
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:10.1
image: postgres:15.3
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -16,7 +16,7 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install platform dependencies
run: |
sudo apt -y update
Expand All @@ -29,11 +29,11 @@ jobs:
run: |
wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9.16
- name: Cache Python dependencies
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: pythondotorg-cache-pip
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# python.org

[![Build Status](https://travis-ci.org/python/pythondotorg.svg?branch=main)](https://travis-ci.org/python/pythondotorg)
[![CI](https://github.com/python/pythondotorg/actions/workflows/ci.yml/badge.svg)](https://github.com/python/pythondotorg/actions/workflows/ci.yml)
[![Documentation Status](https://readthedocs.org/projects/pythondotorg/badge/?version=latest)](https://pythondotorg.readthedocs.io/?badge=latest)

### General information
Expand Down
1 change: 0 additions & 1 deletion banners/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'banners.apps.BannersAppConfig'
24 changes: 12 additions & 12 deletions base-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
dj-database-url==0.5.0
django-pipeline==2.0.6
django-sitetree==1.17.0
django-pipeline==3.0.0 # 3.0.0 is first version that supports Django 4.2
django-sitetree==1.18.0 # >=1.17.1 is (?) first version that supports Django 4.2
django-apptemplates==1.5
django-admin-interface==0.24.2
django-translation-aliases==0.1.0
Django==2.2.24
Django==4.2.16
docutils==0.12
Markdown==3.3.4
cmarkgfm==0.6.0
Expand All @@ -13,7 +13,7 @@ psycopg2-binary==2.8.6
python3-openid==3.2.0
python-decouple==3.4
# lxml used by BeautifulSoup.
lxml==4.9.2
lxml==5.2.2
cssselect==1.1.0
feedparser==6.0.8
beautifulsoup4==4.11.2
Expand All @@ -22,35 +22,35 @@ chardet==4.0.0
celery[redis]==5.3.6
django-celery-beat==2.5.0
# TODO: We may drop 'django-imagekit' completely.
django-imagekit==4.0.2
django-imagekit==5.0 # 5.0 is first version that supports Django 4.2
django-haystack==3.2.1
elasticsearch>=7,<8
# TODO: 0.14.0 only supports Django 1.8 and 1.11.
django-tastypie==0.14.3
django-tastypie==0.14.6 # 0.14.6 is first version that supports Django 4.2

pytz==2021.1
python-dateutil==2.8.2

requests[security]>=2.26.0

django-honeypot==1.0.1
django-markupfield==2.0.0
django-markupfield-helpers==0.1.1
django-honeypot==1.0.4 # 1.0.4 is first version that supports Django 4.2
django-markupfield==2.0.1

django-allauth==0.41.0
django-allauth==0.57.2 # 0.55.0 is first version that supports Django 4.2

django-waffle==2.2.1

djangorestframework==3.12.2
djangorestframework==3.14.0 # 3.14.0 is first version that supports Django 4.1, 4.2 support hasnt been "released"
django-filter==2.4.0
django-ordered-model==3.4.3
django-widget-tweaks==1.4.8
django-countries==7.2.1
num2words==0.5.10
django-polymorphic==3.0.0
django-polymorphic==3.1.0 # 3.1.0 is first version that supports Django 4.0, unsure if it fully supports 4.2
sorl-thumbnail==12.7.0
django-extensions==3.1.4
django-import-export==2.7.1

pypandoc==1.12
panflute==2.3.0
Unidecode==1.3.8
1 change: 0 additions & 1 deletion blogs/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'blogs.apps.BlogsAppConfig'
4 changes: 3 additions & 1 deletion blogs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ class BlogEntryAdmin(admin.ModelAdmin):
date_hierarchy = 'pub_date'
actions = ['sync_new_entries']

@admin.action(
description="Sync new blog entries"
)
def sync_new_entries(self, request, queryset):
call_command('update_blogs')
self.message_user(request, "Blog entries updated.")

sync_new_entries.short_description = "Sync new blog entries"


@admin.register(FeedAggregate)
Expand Down
26 changes: 26 additions & 0 deletions blogs/migrations/0003_alter_relatedblog_creator_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.11 on 2024-09-05 17:10

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('blogs', '0002_remove_translations_and_contributors'),
]

operations = [
migrations.AlterField(
model_name='relatedblog',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='relatedblog',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
]
4 changes: 2 additions & 2 deletions blogs/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from django.conf import settings
from django.template.loader import render_to_string
from django.utils.timezone import make_aware, utc
from django.utils.timezone import make_aware

from boxes.models import Box
from .models import BlogEntry, Feed
Expand All @@ -16,7 +16,7 @@ def get_all_entries(feed_url):

for e in d['entries']:
published = make_aware(
datetime.datetime(*e['published_parsed'][:7]), timezone=utc
datetime.datetime(*e['published_parsed'][:7]), timezone=datetime.timezone.utc
)

entry = {
Expand Down
1 change: 0 additions & 1 deletion boxes/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'boxes.apps.BoxesAppConfig'
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.11 on 2024-09-05 17:10

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('boxes', '0003_auto_20171101_2138'),
]

operations = [
migrations.AlterField(
model_name='box',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='box',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
]
1 change: 0 additions & 1 deletion cms/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'cms.apps.CmsAppConfig'
1 change: 0 additions & 1 deletion codesamples/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'codesamples.apps.CodesamplesAppConfig'
26 changes: 26 additions & 0 deletions codesamples/migrations/0004_alter_codesample_creator_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.11 on 2024-09-05 17:10

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('codesamples', '0003_auto_20170821_2000'),
]

operations = [
migrations.AlterField(
model_name='codesample',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='codesample',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
]
6 changes: 2 additions & 4 deletions codesamples/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ def setUp(self):
is_published=False)

def test_published(self):
self.assertQuerysetEqual(CodeSample.objects.published(),
['<CodeSample: Copy One>'])
self.assertQuerySetEqual(CodeSample.objects.published(),['<CodeSample: Copy One>'], transform=repr)

def test_draft(self):
self.assertQuerysetEqual(CodeSample.objects.draft(),
['<CodeSample: Copy Two>'])
self.assertQuerySetEqual(CodeSample.objects.draft(),['<CodeSample: Copy Two>'], transform=repr)
1 change: 0 additions & 1 deletion community/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'community.apps.CommunityAppConfig'
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Generated by Django 4.2.11 on 2024-09-05 17:10

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('community', '0001_squashed_0004_auto_20170831_0541'),
]

operations = [
migrations.AlterField(
model_name='link',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='link',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='link',
name='post',
field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_%(class)s', to='community.post'),
),
migrations.AlterField(
model_name='photo',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='photo',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='photo',
name='post',
field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_%(class)s', to='community.post'),
),
migrations.AlterField(
model_name='post',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='post',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='post',
name='meta',
field=models.JSONField(blank=True, default=dict),
),
migrations.AlterField(
model_name='video',
name='creator',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_creator', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='video',
name='last_modified_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_modified', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='video',
name='post',
field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='related_%(class)s', to='community.post'),
),
]
2 changes: 1 addition & 1 deletion community/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.contrib.postgres.fields import JSONField
from django.db.models import JSONField
from django.urls import reverse
from django.db import models
from django.utils.translation import gettext_lazy as _
Expand Down
6 changes: 3 additions & 3 deletions community/tests/test_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ def test_post_manager(self):
status=Post.STATUS_PUBLIC
)

self.assertQuerysetEqual(Post.objects.all(), [public_post, private_post], lambda x: x)
self.assertQuerysetEqual(Post.objects.public(), [public_post], lambda x: x)
self.assertQuerysetEqual(Post.objects.private(), [private_post], lambda x: x)
self.assertQuerySetEqual(Post.objects.all(), [public_post, private_post], lambda x: x)
self.assertQuerySetEqual(Post.objects.public(), [public_post], lambda x: x)
self.assertQuerySetEqual(Post.objects.private(), [private_post], lambda x: x)
1 change: 0 additions & 1 deletion companies/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'companies.apps.CompaniesAppConfig'
20 changes: 16 additions & 4 deletions config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ http {
return 301 http://www.python.org/psf;
}

location /psf/codeofconduct {
return 301 /psf/conduct;
}

location /topics/xml {
return 301 http://pyxml.sourceforge.net/topics;
}
Expand Down Expand Up @@ -314,6 +310,22 @@ http {
return 301 https://python.org/blogs/;
}

location ~ ^/psf/archive/codeofconduct/?$ {
return 302 https://policies.python.org/python.org/code-of-conduct/;
}
location ~ ^/psf/codeofconduct/?$ {
return 302 https://policies.python.org/python.org/code-of-conduct/;
}
location ~ ^/psf/conduct/?$ {
return 302 https://policies.python.org/python.org/code-of-conduct/;
}
location ~ ^/psf/conduct/enforcement/?$ {
return 302 https://policies.python.org/python.org/code-of-conduct/Enforcement-Procedures/;
}
location ~ ^/psf/conduct/reporting/?$ {
return 302 https://policies.python.org/python.org/code-of-conduct/Procedures-for-Reporting-Incidents/;
}

location /static/ {
alias /code/static-root/;
add_header Cache-Control "max-age=604800, public"; # 604800 is 7 days
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Required for running tests

factory-boy==3.1.0
factory-boy==3.2.1
Faker==0.8.1
tblib==1.7.0
responses==0.13.3
Expand Down
Loading

0 comments on commit 359e217

Please sign in to comment.