Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8cae9ae

Browse files
authored
Merge branch 'main' into validate-html
2 parentse3c9857 +241b3b8 commit8cae9ae

File tree

20 files changed

+83
-34
lines changed

20 files changed

+83
-34
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.9.16
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

‎.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9.16
1+
3.12.6

‎Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-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.9-bullseye
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default:
44
@$(MAKE) -pRrq -f$(lastword$(MAKEFILE_LIST)):2>/dev/null\
55
|awk-vRS=-F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}'\
66
| sort\
7-
|egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
7+
|grep -E -v -e '^[^[:alnum:]]' -e '^$@$$'
88
@echo
99
@exit 1
1010

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ https://github.com/python/cpython/issues/.
1616

1717
* Source code:https://github.com/python/pythondotorg
1818
* Issue tracker:https://github.com/python/pythondotorg/issues
19-
* Documentation:https://pythondotorg.readthedocs.org/
19+
* Documentation:https://pythondotorg.readthedocs.io/
2020
* Mailing list:[pydotorg-www](https://mail.python.org/mailman/listinfo/pydotorg-www)
2121
* IRC:`#pydotorg` on Freenode
2222
* Staging site:https://staging.python.org/ (`main` branch)

‎base-requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ django-apptemplates==1.5
55
django-admin-interface==0.24.2
66
django-translation-aliases==0.1.0
77
Django==4.2.16
8-
docutils==0.12
9-
Markdown==3.3.4
8+
docutils==0.21.2
9+
Markdown==3.7
1010
cmarkgfm==0.6.0
11-
Pillow==9.4.0
12-
psycopg2-binary==2.8.6
11+
Pillow==10.4.0
12+
psycopg2-binary==2.9.9
1313
python3-openid==3.2.0
1414
python-decouple==3.4
1515
# lxml used by BeautifulSoup.
1616
lxml==5.2.2
1717
cssselect==1.1.0
18-
feedparser==6.0.8
18+
feedparser==6.0.11
1919
beautifulsoup4==4.11.2
2020
icalendar==4.0.7
2121
chardet==4.0.0
@@ -36,14 +36,14 @@ requests[security]>=2.26.0
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==0.57.2 # 0.55.0 is first version that supports Django 4.2
39+
django-allauth==64.2.1
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.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

‎docs/source/administration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Pages are individual entire pages of markup content. They are require ``Title``
4646
:Is Published: Controls whether or not the page is visible on the site.
4747
:Template Name: By default Pages use the template ``templates/pages/default.html`` to use a different template enter the template path here.
4848

49-
..note::Pages are automaticallypurge from Fastly.com upon save.
49+
..note::Pages are automaticallypurged from Fastly.com upon save.
5050

5151
.. _boxes:
5252

@@ -82,7 +82,7 @@ Release Files have a checkbox named 'Download button' that determines which bina
8282
Jobs
8383
----
8484

85-
The jobs application isusing to display Python jobs on the site. The data items should be fairly self explanatory. There are a couple of things to keep in mind. Logged in users of the site can submit jobs for review.
85+
The jobs application isused to display Python jobs on the site. The data items should be fairly self explanatory. There are a couple of things to keep in mind. Logged in users of the site can submit jobs for review.
8686

8787
:Status: Jobs enter the system in 'review' status after the submitter has entered them. Only jobs in the 'approved' state are displayed on the site.
8888
:Featured: Featured jobs are displayed more prominently on the landing page.

‎downloads/tests/test_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def test_is_version_at_least(self):
8282

8383
release_38=Release.objects.create(name='Python 3.8.0')
8484
self.assertFalse(release_38.is_version_at_least_3_9)
85-
self.assert_(release_38.is_version_at_least_3_5)
85+
self.assertTrue(release_38.is_version_at_least_3_5)
8686

8787
release_310=Release.objects.create(name='Python 3.10.0')
88-
self.assert_(release_310.is_version_at_least_3_9)
89-
self.assert_(release_310.is_version_at_least_3_5)
88+
self.assertTrue(release_310.is_version_at_least_3_9)
89+
self.assertTrue(release_310.is_version_at_least_3_5)

‎downloads/tests/test_views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
fromdjango.urlsimportreverse
66
fromdjango.testimportTestCase,override_settings
77

8-
fromrest_framework.authtoken.modelsimportToken
98
fromrest_framework.testimportAPITestCase
109

1110
from .baseimportBaseDownloadTests,DownloadMixin
12-
from ..modelsimportOS,Release
11+
from ..modelsimportRelease
1312
frompages.factoriesimportPageFactory
1413
frompydotorg.drfimportBaseAPITestCase
1514
fromusers.factoriesimportUserFactory

‎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'inevent_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-
returnf'{self.event.title}{date(self.dt_start.strftime,strftime)} -{date(self.dt_end.strftime,strftime)}'
240+
returnf'{self.event.title}{date(self.dt_start,strftime)} -{date(self.dt_end,strftime)}'
241241

242242
@property
243243
defbegin(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-
returnf'{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
defto_rrule(self):
290290
returnrrule(

‎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
{

‎jobs/tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_visible_manager(self):
7676
j3=factories.ApprovedJobFactory(expires=past)
7777

7878
visible=Job.objects.visible()
79-
self.assertTrue(len(visible),1)
79+
self.assertEqual(len(visible),1)
8080
self.assertIn(j1,visible)
8181
self.assertNotIn(j2,visible)
8282
self.assertNotIn(j3,visible)

‎pydotorg/settings/base.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,6 @@
230230

231231
'allauth',
232232
'allauth.account',
233-
'allauth.socialaccount',
234-
#'allauth.socialaccount.providers.facebook',
235-
#'allauth.socialaccount.providers.github',
236-
#'allauth.socialaccount.providers.openid',
237-
#'allauth.socialaccount.providers.twitter',
238233

239234
# Tastypie needs the `users` app to be already loaded.
240235
'tastypie',

‎runtime.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<linkrel="apple-touch-icon"href="{{ STATIC_URL }}apple-touch-icon-precomposed.png">
6666

6767
{# Tile icon for Win8 (144x144 + tile color) #}
68-
<metaname="msapplication-TileImage"content="{{ STATIC_URL }}metro-icon-144x144-precomposed.png"><!-- white shape -->
68+
<metaname="msapplication-TileImage"content="{{ STATIC_URL }}metro-icon-144x144.png"><!-- white shape -->
6969
<metaname="msapplication-TileColor"content="#3673a5"><!-- python blue -->
7070
<metaname="msapplication-navbutton-color"content="#3673a5">
7171

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp