From 9ccb368b08058d05cb5156100805ba1fbcd0eb08 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:43:43 +0200 Subject: [PATCH 1/2] Remove outdated PEP info from docs --- docs/source/commands.rst | 27 --------------------------- docs/source/index.rst | 1 - docs/source/pep_generation.rst | 34 ---------------------------------- 3 files changed, 62 deletions(-) delete mode 100644 docs/source/pep_generation.rst diff --git a/docs/source/commands.rst b/docs/source/commands.rst index baa94fa4f..06c1b8bff 100644 --- a/docs/source/commands.rst +++ b/docs/source/commands.rst @@ -35,30 +35,3 @@ Command-line options .. option:: --app-label Create initial data with the *app_label* provided. - -.. _command-generate-pep-pages: - -generate_pep_pages ------------------- - -This command generates ``pages.Page`` objects from the output -of the existing PEP repository generation process. You run it like:: - - $ ./manage.py generate_pep_pages - -To get verbose output, specify ``--verbosity`` option:: - - $ ./manage.py generate_pep_pages --verbosity=2 - -It uses the conversion code in the ``peps/converters.py`` file, in an -attempt to normalize the formatting for display purposes. - -.. _command-dump-pep-pages: - -dump_pep_pages --------------- - -This command simply dumps our PEP related pages as JSON to :attr:`sys.stdout`. -You can run like:: - - $ ./manage.py dump_pep_pages diff --git a/docs/source/index.rst b/docs/source/index.rst index ab7b710ed..558604237 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -25,7 +25,6 @@ Contents: install.md contributing administration - pep_generation commands Indices and tables diff --git a/docs/source/pep_generation.rst b/docs/source/pep_generation.rst deleted file mode 100644 index dd68649af..000000000 --- a/docs/source/pep_generation.rst +++ /dev/null @@ -1,34 +0,0 @@ -PEP Page Generation -=================== - -.. _pep_process: - -Process Overview ----------------- - -We are generating the PEP pages by lightly parsing the HTML output from the -`PEP Repository`_ and then cleaning up some post-parsing formatting. - -The PEP Page Generation process is as follows: - -1. Clone the PEP Repository, if you have not already done so:: - - $ git clone https://github.com/python/peps.git - -2. From the cloned PEP Repository, run:: - - $ make -j - -3. Set ``PEP_REPO_PATH`` in ``pydotorg/settings/local.py`` to the location - of the cloned PEP Repository - -4. Generate PEP pages in your ``pythondotorg`` repository - (More details at :ref:`command-generate-pep-pages`). You can run like:: - - $ ./manage.py generate_pep_pages - -This process runs periodically via cron to keep the PEP pages up to date. - -See :ref:`management-commands` for all management commands. - -.. _PEP Repository: https://github.com/python/peps From e4cef51e45fcd64ab22e7cc8490bbf0c96eb1418 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:26:26 +0200 Subject: [PATCH 2/2] Remove outdated PEP code --- .gitattributes | 1 - env_sample | 4 - pydotorg/settings/cabotage.py | 3 - pydotorg/settings/local.py | 9 -- static/sass/_layout.scss | 48 --------- static/sass/mq.css | 59 ---------- static/sass/no-mq.css | 59 ---------- static/sass/style.css | 135 +---------------------- static/sass/style.scss | 160 ---------------------------- templates/pages/pep-page.html | 83 --------------- templates/peps/list.html | 106 ------------------ templates/python/documentation.html | 2 +- 12 files changed, 5 insertions(+), 664 deletions(-) delete mode 100644 templates/pages/pep-page.html delete mode 100644 templates/peps/list.html diff --git a/.gitattributes b/.gitattributes index aab188762..6473b8dc5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ static/sass/*.css linguist-vendored -peps/tests/fake_pep_repo/*.html linguist-vendored static/js/libs/*.js linguist-vendored static/js/plugins/*.js linguist-vendored diff --git a/env_sample b/env_sample index 72c1e0b9a..499c155f8 100644 --- a/env_sample +++ b/env_sample @@ -2,9 +2,6 @@ DATABASE_URL=postgres:///pythondotorg SEARCHBOX_SSL_URL=http://127.0.0.1:9200/ -# development optional -#PEP_REPO_PATH=None - # production required SECRET_KEY= ALLOWED_HOSTS=127.0.0.1, @@ -13,7 +10,6 @@ EMAIL_HOST_USER= EMAIL_HOST_PASSWORD= EMAIL_PORT= DEFAULT_FROM_EMAIL= -PEP_ARTIFACT_URL= FASTLY_API_KEY= SENTRY_DSN= SOURCE_VERSION= diff --git a/pydotorg/settings/cabotage.py b/pydotorg/settings/cabotage.py index 654db889e..7d15fc18e 100644 --- a/pydotorg/settings/cabotage.py +++ b/pydotorg/settings/cabotage.py @@ -61,9 +61,6 @@ EMAIL_USE_TLS = True DEFAULT_FROM_EMAIL = config('DEFAULT_FROM_EMAIL') -PEP_REPO_PATH = None -PEP_ARTIFACT_URL = config('PEP_ARTIFACT_URL') - # Fastly API Key FASTLY_API_KEY = config('FASTLY_API_KEY') diff --git a/pydotorg/settings/local.py b/pydotorg/settings/local.py index 6525d9837..a8a4fdb09 100644 --- a/pydotorg/settings/local.py +++ b/pydotorg/settings/local.py @@ -34,15 +34,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' -# Set the local pep repository path to fetch PEPs from, -# or none to fallback to the tarball specified by PEP_ARTIFACT_URL. -PEP_REPO_PATH = config('PEP_REPO_PATH', default=None) # directory path or None - -# Set the path to where to fetch PEP artifacts from. -# The value can be a local path or a remote URL. -# Ignored if PEP_REPO_PATH is set. -PEP_ARTIFACT_URL = os.path.join(BASE, 'peps/tests/peps.tar.gz') - # Use Dummy SASS compiler to avoid performance issues and remove the need to # have a sass compiler installed at all during local development if you aren't # adjusting the CSS at all. Comment this out or adjust it to suit your local diff --git a/static/sass/_layout.scss b/static/sass/_layout.scss index 884a0e9bc..994ef9c75 100644 --- a/static/sass/_layout.scss +++ b/static/sass/_layout.scss @@ -27,9 +27,6 @@ .container, .row, -.pep-list-header, -.pep-index-list li, -.info-key, .listing-company, .list-recent-jobs li { @extend %pie-clearfix; } @@ -377,43 +374,12 @@ .most-recent-posts { @include span-columns( 9 ); } - .pep-widget, .psf-widget, .python-needs-you-widget { padding: 1.5em 1.75em; clear: both; } - /* PEP landing page */ - .pep-list-header, - .pep-index-list li, - .info-key { margin: 0 -.5em; } - - .pep-list-header { display: block; } - - .pep-index-list { - - .label { display: none; } - a { display: block; } - li { - border-bottom: 1px solid darken($grey-lighterest, 5%); - margin-bottom: 0; - } - } - - .pep-type, - .pep-num, - .pep-title, - .pep-owner { - float: left; - border-bottom: 0; - } - - .pep-type { width: 15%; } - .pep-num { width: 10%; } - .pep-title { width: 50%; } - .pep-owner { width: 25%; } - /* Jobs landing page */ .jobs-intro { padding-top: 2em; padding-bottom: 2em; } @@ -1099,7 +1065,6 @@ } } - .pep-widget, .psf-widget, .python-needs-you-widget { padding: 1.5em 1.75em; @@ -1141,19 +1106,6 @@ } } - .pep-widget { - - .widget-title { - position: relative; - padding-right: 6em; - } - } - - .rss-link { - position: absolute; - top: 0; right: 0; - } - /* Footer */ .sitemap { diff --git a/static/sass/mq.css b/static/sass/mq.css index 4d4dea4ac..183db8afe 100644 --- a/static/sass/mq.css +++ b/static/sass/mq.css @@ -115,17 +115,11 @@ /* Other elements */ .container, .row, -.pep-list-header, -.pep-index-list li, -.info-key, .listing-company, .list-recent-jobs li { *zoom: 1; } .container:after, .row:after, - .pep-list-header:after, - .pep-index-list li:after, - .info-key:after, .listing-company:after, .list-recent-jobs li:after { content: ""; @@ -338,17 +332,11 @@ html[xmlns] .slides { display: block; } /* Other elements */ .container, .row, -.pep-list-header, -.pep-index-list li, -.info-key, .listing-company, .list-recent-jobs li { *zoom: 1; } .container:after, .row:after, - .pep-list-header:after, - .pep-index-list li:after, - .info-key:after, .listing-company:after, .list-recent-jobs li:after { content: ""; @@ -1423,48 +1411,11 @@ html[xmlns] .slides { display: block; } float: left; margin-right: 2.12766%; } - .pep-widget, .psf-widget, .python-needs-you-widget { padding: 1.5em 1.75em; clear: both; } - /* PEP landing page */ - .pep-list-header, - .pep-index-list li, - .info-key { - margin: 0 -.5em; } - - .pep-list-header { - display: block; } - - .pep-index-list .label { - display: none; } - .pep-index-list a { - display: block; } - .pep-index-list li { - border-bottom: 1px solid #e3e7ec; - margin-bottom: 0; } - - .pep-type, - .pep-num, - .pep-title, - .pep-owner { - float: left; - border-bottom: 0; } - - .pep-type { - width: 15%; } - - .pep-num { - width: 10%; } - - .pep-title { - width: 50%; } - - .pep-owner { - width: 25%; } - /* Jobs landing page */ .jobs-intro { padding-top: 2em; @@ -2298,7 +2249,6 @@ html[xmlns] .slides { display: block; } display: inline; visibility: visible; } - .pep-widget, .psf-widget, .python-needs-you-widget { padding: 1.5em 1.75em; } @@ -2345,15 +2295,6 @@ html[xmlns] .slides { display: block; } zoom: 1; display: inline; } - .pep-widget .widget-title { - position: relative; - padding-right: 6em; } - - .rss-link { - position: absolute; - top: 0; - right: 0; } - /* Footer */ .sitemap a { text-align: left; } diff --git a/static/sass/no-mq.css b/static/sass/no-mq.css index 0565a60dd..72a5b9338 100644 --- a/static/sass/no-mq.css +++ b/static/sass/no-mq.css @@ -115,17 +115,11 @@ /* Other elements */ .container, .row, -.pep-list-header, -.pep-index-list li, -.info-key, .listing-company, .list-recent-jobs li { *zoom: 1; } .container:after, .row:after, - .pep-list-header:after, - .pep-index-list li:after, - .info-key:after, .listing-company:after, .list-recent-jobs li:after { content: ""; @@ -338,17 +332,11 @@ html[xmlns] .slides { display: block; } /* Other elements */ .container, .row, -.pep-list-header, -.pep-index-list li, -.info-key, .listing-company, .list-recent-jobs li { *zoom: 1; } .container:after, .row:after, - .pep-list-header:after, - .pep-index-list li:after, - .info-key:after, .listing-company:after, .list-recent-jobs li:after { content: ""; @@ -1137,48 +1125,11 @@ a.button { float: left; margin-right: 2.12766%; } -.pep-widget, .psf-widget, .python-needs-you-widget { padding: 1.5em 1.75em; clear: both; } -/* PEP landing page */ -.pep-list-header, -.pep-index-list li, -.info-key { - margin: 0 -.5em; } - -.pep-list-header { - display: block; } - -.pep-index-list .label { - display: none; } -.pep-index-list a { - display: block; } -.pep-index-list li { - border-bottom: 1px solid #e3e7ec; - margin-bottom: 0; } - -.pep-type, -.pep-num, -.pep-title, -.pep-owner { - float: left; - border-bottom: 0; } - -.pep-type { - width: 15%; } - -.pep-num { - width: 10%; } - -.pep-title { - width: 50%; } - -.pep-owner { - width: 25%; } - /* Jobs landing page */ .jobs-intro { padding-top: 2em; @@ -1986,7 +1937,6 @@ a.button { display: inline; visibility: visible; } -.pep-widget, .psf-widget, .python-needs-you-widget { padding: 1.5em 1.75em; } @@ -2033,15 +1983,6 @@ a.button { zoom: 1; display: inline; } -.pep-widget .widget-title { - position: relative; - padding-right: 6em; } - -.rss-link { - position: absolute; - top: 0; - right: 0; } - /* Footer */ .sitemap a { text-align: left; } diff --git a/static/sass/style.css b/static/sass/style.css index 09c849482..819f429c1 100644 --- a/static/sass/style.css +++ b/static/sass/style.css @@ -133,7 +133,7 @@ display: table; clear: both; } -.pep-widget, .most-recent-events .more-by-location, .user-profile-controls div.section-links ul li, .more-by-location { +.most-recent-events .more-by-location, .user-profile-controls div.section-links ul li, .more-by-location { background-color: #d8dbde; *zoom: 1; filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFE6E8EA', endColorstr='#FFD8DBDE'); @@ -146,12 +146,12 @@ -moz-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.01); box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.01); } -.pep-widget, .most-recent-events .more-by-location, .user-profile-controls div.section-links ul li { +.most-recent-events .more-by-location, .user-profile-controls div.section-links ul li { border: 1px solid #caccce; margin-bottom: 0.5em; padding: 1.25em; *zoom: 1; } - .pep-widget:after, .most-recent-events .more-by-location:after, .user-profile-controls div.section-links ul li:after { + .most-recent-events .more-by-location:after, .user-profile-controls div.section-links ul li:after { content: ""; display: table; clear: both; } @@ -973,7 +973,7 @@ h2.not-column { /* ! ===== HELPFUL CLASSES ===== */ /* A useful class that helps control how lines might break. Use carefully and always test. */ -.pre, .rss-link { +.pre { white-space: nowrap; } /* Our own little class for progressive text. Yes, it is a Monty Python reference */ @@ -2220,133 +2220,6 @@ table tfoot { color: #b55863; font-family: SourceSansProBold, Arial, sans-serif; } -/* ! ===== PEP Widget ===== */ -.pep-widget { - margin-bottom: 1.3125em; } - .pep-widget .widget-title { - color: #737373; - margin-bottom: 0.35em; - font-size: 1.125em; } - .fontface .pep-widget .widget-title { - font-size: 1.29375em; } - .fontface .pep-widget .widget-title span:before { - font-size: .875em; } - .pep-widget .widget-title a { - color: #3776ab; } - .pep-widget .widget-title a:hover, .pep-widget .widget-title a:active { - color: #1f3b47; } - .pep-widget .pep-number { - color: #666666; - font-family: SourceSansProBold, Arial, sans-serif; - display: inline-block; - width: 3em; } - -.pep-list { - border-top: 1px solid #caccce; - line-height: 1.2em; - margin: 0; } - .pep-list li { - display: block; - line-height: 1.35em; } - .pep-list li a { - display: block; - color: #3776ab; - background-color: #f2f4f6; - border-bottom: 1px solid #e6eaee; - padding: .6em .75em .5em; } - .pep-list li a:hover, .pep-list li a:focus, .pep-list li a:active { - color: #222222; - background-color: #fefefe; } - -.rss-link { - line-height: 1em; } - .rss-link span:before { - color: #cc9547; } - -/* ! ===== PEP landing page ===== */ -/*
- Type - Number - Title (click for more) - Owner -
-*/ -.pep-list-header { - font-family: SourceSansProBold, Arial, sans-serif; - display: none; } - -.pep-index-list { - margin-bottom: 2.625em; } - .pep-index-list .label { - font-family: SourceSansProBold, Arial, sans-serif; - display: inline-block; - width: 20%; } - .pep-index-list li { - background-color: #f2f4f6; - border-bottom: 1px solid #caccce; } - .pep-index-list a { - display: inline-block; - color: #3776ab; } - .pep-index-list a:hover, .pep-index-list a:focus, .pep-index-list a:active { - color: #222222; } - -.pep-type, .pep-num, .pep-title, .pep-owner { - padding: .5em .5em .4em; - border-bottom: 1px solid #e3e7ec; } - -.footnote .label { - width: 4em; } - -/*dl*/ -.info-key dt, .info-key dd { - display: block; - float: left; - padding: .5em .5em .4em; } -.info-key dt { - width: 25%; } -.info-key dd { - width: 75%; - border-bottom: 1px solid #e6e8ea; } - -/*
-
Name
-
Email Address
-
- */ -.pep-owner-header { - margin: 0 -.5em; - overflow: hidden; - *zoom: 1; } - .pep-owner-header .label { - font-family: SourceSansProBold, Arial, sans-serif; - float: left; - width: 50%; - padding: .25em .5em .2em; } - -.pep-owner-list li { - background-color: #f2f4f6; - border-bottom: 1px solid #caccce; - overflow: hidden; - *zoom: 1; } - .pep-owner-list li:hover { - background-color: #fefefe; } -.pep-owner-list .owner-name, .pep-owner-list .owner-email { - float: left; - width: 50%; - padding: .5em .5em .4em; } - /* ! ===== Success Stories landing page ===== */ .featured-success-story { padding: 1.3125em 0; diff --git a/static/sass/style.scss b/static/sass/style.scss index cb78d9a4d..246645bcc 100644 --- a/static/sass/style.scss +++ b/static/sass/style.scss @@ -1225,166 +1225,6 @@ $colors: $blue, $psf, $yellow, $green, $purple, $red; .draft-preview { color: $red; font-family: $default-font-bold; } -/* ! ===== PEP Widget ===== */ -.pep-widget { - @extend %grey-colorbox; - margin-bottom: rhythm( .75 ); - - .widget-title { - color: lighten($grey, 5%); - margin-bottom: 0.35em; - @include fontface-adjust( 18px ); - - a { - color: $blue; - - &:hover, &:active { color: $darkblue; } - } - } - - .pep-number { - color: $grey; - font-family: $default-font-bold; - display: inline-block; - width: 3em; - } -} - - .pep-list { - border-top: 1px solid $default-border-color; - line-height: 1.2em; - margin: 0; - - li { - display: block; - line-height: 1.35em; - - a { - display: block; - color: $blue; - background-color: $grey-lighterest; - border-bottom: 1px solid darken($grey-lighterest, 4%); - padding: .6em .75em .5em; - - &:hover, &:focus, &:active { - color: $grey-darker; - background-color: lighten($grey-lighterest, 4%); - } - } - } - } - -.rss-link { - @extend .pre; - line-height: 1em; - - span:before { color: $orange; } -} - -/* ! ===== PEP landing page ===== */ - /*
- Type - Number - Title (click for more) - Owner -
- */ -.pep-list-header, .pep-index-list li { } - -.pep-list-header { - font-family: $default-font-bold; - display: none; -} - -.pep-index-list { - margin-bottom: rhythm( 1.5 ); - - .label { - font-family: $default-font-bold; - display: inline-block; - width: 20%; - } - - li { - background-color: $grey-lighterest; - border-bottom: 1px solid $grey-lighter; - } - - a { - display: inline-block; - color: $blue; - - &:hover, &:focus, &:active { color: $grey-darker; } - } -} - -.pep-type, .pep-num, .pep-title, .pep-owner { - padding: .5em .5em .4em; - border-bottom: 1px solid darken($grey-lighterest, 5%); -} - -.footnote .label { - width: 4em; -} - -/*dl*/ .info-key { - - dt, dd { - display: block; - float: left; - padding: .5em .5em .4em; - } - - dt { width: 25%; } - dd { width: 75%; border-bottom: 1px solid $grey-lightest; } -} - -/*
-
Name
-
Email Address
-
- */ -.pep-owner-header { - margin: 0 -.5em; - @include clearfix(); - - .label { - font-family: $default-font-bold; - float: left; - width: 50%; - padding: .25em .5em .2em; - } -} -.pep-owner-list { - - li { - background-color: $grey-lighterest; - border-bottom: 1px solid $grey-lighter; - @include clearfix(); - - &:hover { background-color: lighten($grey-lighterest, 4%); } - } - - .owner-name, .owner-email { - float: left; - width: 50%; - padding: .5em .5em .4em; - } -} - - /* ! ===== Success Stories landing page ===== */ .featured-success-story { padding: rhythm( .75 ) 0; diff --git a/templates/pages/pep-page.html b/templates/pages/pep-page.html deleted file mode 100644 index 4b804df50..000000000 --- a/templates/pages/pep-page.html +++ /dev/null @@ -1,83 +0,0 @@ -{% extends "base.html" %} -{% load boxes %} -{% load sitetree %} - -{% block body_attributes %}class="python pages pep-page"{% endblock %} - -{% block content_attributes %}with-left-sidebar{% endblock %} - -{% block page_title %}{{ page.title }} | {{ SITE_INFO.site_name }}{% endblock %} -{% block og_title %}{{ page.title }}{% endblock %} - -{% block breadcrumbs %} - -{% endblock %} -. -{% block content %} - - - {% if not page.is_published %} -
-

This page is a draft and it hasn't been published yet. Only staff users can see it.

-
- {% endif %} -
- {% if request.user.is_staff %} - Edit this page - {% endif %} - -
-

{{ page.title }}

-
- - {{ page.content }} - -
-{% endblock content %} - - -{% block left_sidebar %} -{% comment %} -TODO: should this partially come from sitetree? -{% endcomment %} - - - -{% endblock left_sidebar %} diff --git a/templates/peps/list.html b/templates/peps/list.html deleted file mode 100644 index 597bf4c09..000000000 --- a/templates/peps/list.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "base.html" %} - -{% block page_title %}Our Enhancement Proposals | {{ SITE_INFO.site_name }}{% endblock %} - -{% block body_attributes %}class="python pep-index default-page"{% endblock %} - -{% block content %} - -
-

Index of Python Enhancement Proposals

- - {% for cat in categories %} - - {% if cat.peps.all|length > 0 %} -

{{ cat.name }}

- -
-
Type/Status
-
Number
-
Title (click for more)
-
Owner
-
- - {% endif %} - - {% endfor %} - -

Numerical List

- -
-
Type/Status
-
Number
-
Title (click for more)
-
Owner
-
- - - -
- -
- -

Key

- -
-
-
Types
-
- {% for t in types %} -
{{ t.abbreviation }}
-
{{ t.name }}
- {% endfor %} -
-
- -
-
Statuses
-
- {% for s in statuses %} -
{{ s.abbreviation }}
-
{{ s.name }}
- {% endfor %} -
-
-
- -
-
- -

Owners

-
-
Name
-
Email Address
-
- - -
-
- -
-{% endblock %} \ No newline at end of file diff --git a/templates/python/documentation.html b/templates/python/documentation.html index e301b0010..a87de21d0 100644 --- a/templates/python/documentation.html +++ b/templates/python/documentation.html @@ -80,7 +80,7 @@

P

Porting from Python 2 to Python 3