Skip to content

Commit 2b9f8e3

Browse files
authored
Merge branch 'main' into miketheman/blog-stuff
2 parents bab3baa + 42f2eb4 commit 2b9f8e3

File tree

1,342 files changed

+5119
-18911
lines changed

Some content is hidden

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

1,342 files changed

+5119
-18911
lines changed

.git-blame-ignore-revs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# .git-blame-ignore-revs
2+
# Reformatted codebase with black (#3367)
3+
40fbc32fef7c7ffe41cd18f3f8951578555db1aa
4+
# Collapsed license headers across codebase (#18217)
5+
f59df186dc62274b5831a72f639a1e92bbe3f94c

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
5555
# Initializes the CodeQL tools for scanning.
5656
- name: Initialize CodeQL
57-
uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
57+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
5858
with:
5959
languages: ${{ matrix.language }}
6060
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
6868
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6969
# If this step fails, then you should remove it and run the build manually (see below)
7070
- name: Autobuild
71-
uses: github/codeql-action/autobuild@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
71+
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
7272

7373
# ℹ️ Command-line programs to run using the OS shell.
7474
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -81,6 +81,6 @@ jobs:
8181
# ./location_of_script_within_repo/buildscript.sh
8282

8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
84+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
8585
with:
8686
category: "/language:${{matrix.language}}"

.github/workflows/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Run zizmor
2929
run: pipx run zizmor --format sarif . > results.sarif
3030
- name: Upload SARIF file
31-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
31+
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
3232
with:
3333
# Path to SARIF file relative to the root of the repository
3434
sarif_file: results.sarif

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG PYTHON_IMAGE_VERSION=3.13.2-slim-bookworm
33

44
# First things first, we build an image which is where we're going to compile
55
# our static assets with. We use this stage in development.
6-
FROM node:24.0.1-bookworm AS static-deps
6+
FROM node:24.1.0-bookworm AS static-deps
77

88
WORKDIR /opt/warehouse/src/
99

babel.config.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
/* Licensed under the Apache License, Version 2.0 (the "License");
2-
* you may not use this file except in compliance with the License.
3-
* You may obtain a copy of the License at
4-
*
5-
* http://www.apache.org/licenses/LICENSE-2.0
6-
*
7-
* Unless required by applicable law or agreed to in writing, software
8-
* distributed under the License is distributed on an "AS IS" BASIS,
9-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10-
* See the License for the specific language governing permissions and
11-
* limitations under the License.
12-
*/
1+
/* SPDX-License-Identifier: Apache-2.0 */
132

143
module.exports = {
154
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],

bin/depchecker.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
# Licensed under the Apache License, Version 2.0 (the "License");
2-
# you may not use this file except in compliance with the License.
3-
# You may obtain a copy of the License at
4-
#
5-
# http://www.apache.org/licenses/LICENSE-2.0
6-
#
7-
# Unless required by applicable law or agreed to in writing, software
8-
# distributed under the License is distributed on an "AS IS" BASIS,
9-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10-
# See the License for the specific language governing permissions and
11-
# limitations under the License.import sys
1+
# SPDX-License-Identifier: Apache-2.0
122

133
import sys
144

bin/licenses

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ for fn in $(find . -type f \( \
99
-name "*.scss" -o \
1010
! -name "*.min.js" \
1111
-name "*.js" \) \
12+
! -path "./.cache*" \
1213
! -path "./.state*" \
14+
! -path "./.venv*" \
1315
! -path "./docs*" \
1416
! -path "./htmlcov*" \
1517
! -path "./node_modules*" \
@@ -18,7 +20,7 @@ for fn in $(find . -type f \( \
1820
! -path "./warehouse/static/html*" \
1921
! -path "./warehouse/static/js/vendor*"); do
2022
# Check for license in first 5 lines (allows for shebang, encoding and handles comment character in various languages)
21-
if [[ ! "$(head -5 $fn | grep "^ *\(#\|\*\|\/\/\) .* License\(d*\)")" ]]; then
23+
if [[ ! "$(head -5 $fn | grep "^ *\(#\|\*\|\/\/\|\/\*\|{#\).*License")" ]]; then
2224
echo $fn is missing a license
2325
EXIT_CODE=1
2426
fi

dev/compose/opensearch/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM opensearchproject/opensearch:2.12.0
1+
FROM opensearchproject/opensearch:2.13.0
22

33
RUN opensearch-plugin remove opensearch-skills --purge
44
RUN opensearch-plugin remove opensearch-ml --purge

dev/flake8/checkers.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
# Licensed under the Apache License, Version 2.0 (the "License");
2-
# you may not use this file except in compliance with the License.
3-
# You may obtain a copy of the License at
4-
#
5-
# http://www.apache.org/licenses/LICENSE-2.0
6-
#
7-
# Unless required by applicable law or agreed to in writing, software
8-
# distributed under the License is distributed on an "AS IS" BASIS,
9-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10-
# See the License for the specific language governing permissions and
11-
# limitations under the License.
1+
# SPDX-License-Identifier: Apache-2.0
122

133
"""
144
Warehouse Flake8 Local Checkers

dev/notdatadog.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
# Licensed under the Apache License, Version 2.0 (the "License");
2-
# you may not use this file except in compliance with the License.
3-
# You may obtain a copy of the License at
4-
#
5-
# http://www.apache.org/licenses/LICENSE-2.0
6-
#
7-
# Unless required by applicable law or agreed to in writing, software
8-
# distributed under the License is distributed on an "AS IS" BASIS,
9-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10-
# See the License for the specific language governing permissions and
11-
# limitations under the License.
1+
# SPDX-License-Identifier: Apache-2.0
122

133
import asyncio
144
import asyncudp

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ volumes:
1111

1212
services:
1313
db:
14-
image: postgres:16.1
14+
image: postgres:16.4
1515
ports:
1616
# 5432 may already in use by another PostgreSQL on host
1717
- "5433:5432"
@@ -226,7 +226,7 @@ services:
226226
- caches:/opt/warehouse/src/.stylelintcache
227227

228228
maildev:
229-
image: maildev/maildev:2.1.0
229+
image: maildev/maildev:2.2.1
230230
ports:
231231
- "1080:1080"
232232
- "1025:1025"

docs/dev/conf.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
#!/usr/bin/env python3
2-
# Licensed under the Apache License, Version 2.0 (the "License");
3-
# you may not use this file except in compliance with the License.
4-
# You may obtain a copy of the License at
5-
#
6-
# http://www.apache.org/licenses/LICENSE-2.0
7-
#
8-
# Unless required by applicable law or agreed to in writing, software
9-
# distributed under the License is distributed on an "AS IS" BASIS,
10-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11-
# See the License for the specific language governing permissions and
12-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
133

144
import os
155
from datetime import datetime
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
#############
2+
Documentation
3+
#############
4+
5+
Developer documentation
6+
=======================
7+
8+
The developer documentation is hosted at `warehouse.pypa.io`_. It's written in
9+
`reStructuredText`_ or `Markdown`_ (via `MyST`_) and built using
10+
`Sphinx`_.
11+
12+
.. _warehouse.pypa.io: https://warehouse.pypa.io
13+
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
14+
.. _Markdown: https://www.markdownguide.org/
15+
.. _MyST: https://myst-parser.readthedocs.io/en/latest/
16+
.. _Sphinx: https://www.sphinx-doc.org/
17+
18+
.. _dev-docs-layout:
19+
20+
Layout
21+
------
22+
23+
The developer documentation is located in the ``docs/dev`` directory.
24+
25+
.. _dev-docs-local-dev:
26+
27+
Local development
28+
-----------------
29+
30+
To run a single local build of the dev docs, you can use the ``dev-docs``
31+
Makefile target:
32+
33+
.. code-block:: console
34+
35+
make dev-docs
36+
37+
That will produce a local build under ``docs/dev/_build/``.
38+
39+
To run a local development server, you can use ``docker compose``:
40+
41+
.. code-block:: console
42+
43+
docker compose up dev-docs
44+
45+
Once running, you can visit a local build of the pages at `localhost:10002`_.
46+
47+
.. _localhost\:10002: http://localhost:10002
48+
49+
User documentation
50+
==================
51+
52+
The user documentation is hosted at `docs.pypi.org`_. It's written in
53+
`Markdown`_ and built using `MkDocs`_.
54+
55+
.. _docs.pypi.org: https://docs.pypi.org
56+
.. _MkDocs: https://www.mkdocs.org/
57+
58+
.. _user-docs-layout:
59+
60+
Layout
61+
------
62+
63+
The user documentation is located in the ``docs/user`` directory.
64+
65+
.. _user-docs-local-dev:
66+
67+
Local development
68+
-----------------
69+
70+
To run a single local build of the user docs, you can use the ``user-docs``
71+
Makefile target:
72+
73+
.. code-block:: console
74+
75+
make user-docs
76+
77+
That will produce a local build under ``docs/user-site/``.
78+
79+
To run a local development server, you can use ``docker compose``:
80+
81+
.. code-block:: console
82+
83+
docker compose up user-docs
84+
85+
Once running, you can visit a local build of the user documentation at `localhost:10000`_.
86+
87+
.. _localhost\:10000: http://localhost:10000
88+
89+
PyPI blog
90+
=========
91+
92+
The PyPI blog is hosted at `blog.pypi.org`_. Like the user documentation,
93+
it's written in `Markdown`_ and built using `MkDocs`_.
94+
95+
.. _blog.pypi.org: https://blog.pypi.org
96+
97+
.. _blog-layout:
98+
99+
Layout
100+
------
101+
102+
The blog is located in the ``docs/blog`` directory.
103+
104+
.. _blog-local-dev:
105+
106+
Local development
107+
-----------------
108+
109+
To run a single local build of the blog, you can use the ``blog``
110+
Makefile target:
111+
112+
.. code-block:: console
113+
114+
make blog
115+
116+
That will produce a local build under ``docs/blog-site/``.
117+
118+
To run a local development server, you can use ``docker compose``:
119+
120+
.. code-block:: console
121+
122+
docker compose up blog
123+
124+
Once running, you can visit a local build of the blog at `localhost:10001`_.
125+
126+
.. _localhost\:10001: http://localhost:10001

docs/dev/development/getting-started.rst

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,21 @@ Errors when executing ``make initdb``
536536
opensearch wants a lot of memory (Dustin gives warehouse ~4GB locally).
537537
Refer to the tip under :ref:`running-warehouse-containers` section for more details.
538538

539+
* If ``make initdb`` fails with an error like::
540+
541+
A fatal error has been detected by the Java Runtime Environment:
542+
SIGILL (0x4) at pc=0x0000f819dfc67c5c, pid=25, tid=26
543+
544+
while building the ``warehouse-opensearch`` image, this is a known issue
545+
with OpenSearch in Apple M4 processors. A workaround (described in
546+
`this comment <https://github.com/elastic/elasticsearch/issues/118583#issuecomment-2567270484>`_)
547+
is to add the following line to ``dev/compose/opensearch/Dockerfile.yml`` (after
548+
the FROM line):
549+
550+
.. code-block:: docker
551+
552+
ENV _JAVA_OPTIONS=-XX:UseSVE=0
553+
539554

540555
"no space left on device" when using ``docker compose``
541556
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -747,38 +762,6 @@ formatting and linting. You can reformat with:
747762
748763
make reformat
749764
750-
.. _build-docs:
751-
752-
Building documentation
753-
----------------------
754-
755-
The Warehouse documentation is stored in the :file:`docs/`
756-
directory with three subdirectories: blog, dev and user.
757-
Development docs (in the dev directory) are written in
758-
`reStructured Text`_ and rendered using `Sphinx`_. User docs ``/user``
759-
are written in markdown and rendered using ``mkdocs``. The blog is
760-
also written in markdown.
761-
762-
Use :command:`make` to build the documentation. For example:
763-
764-
.. code-block:: console
765-
766-
make user-docs dev-docs
767-
768-
The HTML index for the user documentation can now be found at
769-
:file:`docs/user-site/index.html`, and the index for the developer
770-
documentation at :file:`docs/dev/_build/html/index.html`.
771-
772-
Building the docs requires Python 3.8. If it is not installed, the
773-
:command:`make` command will give the following error message:
774-
775-
.. code-block:: console
776-
777-
make: python3.8: Command not found
778-
Makefile:53: recipe for target '.state/env/pyvenv.cfg' failed
779-
make: *** [.state/env/pyvenv.cfg] Error 127
780-
781-
782765
.. _building-translations:
783766

784767
Building translations

docs/dev/development/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Get involved or find help using:
3838
cloud
3939
email
4040
token-scanning
41+
documentation
4142

4243
.. _`GitHub`: https://github.com/pypi/warehouse
4344
.. _`"What to put in your bug report"`: https://www.contribution-guide.org/#what-to-put-in-your-bug-report

docs/dev/development/submitting-patches.rst

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,7 @@ Every code file must start with the boilerplate licensing notice:
3434

3535
.. code-block:: python
3636
37-
# Licensed under the Apache License, Version 2.0 (the "License");
38-
# you may not use this file except in compliance with the License.
39-
# You may obtain a copy of the License at
40-
#
41-
# http://www.apache.org/licenses/LICENSE-2.0
42-
#
43-
# Unless required by applicable law or agreed to in writing, software
44-
# distributed under the License is distributed on an "AS IS" BASIS,
45-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
46-
# See the License for the specific language governing permissions and
47-
# limitations under the License.
37+
# SPDX-License-Identifier: Apache-2.0
4838
4939
You can view :doc:`patterns` to see more patterns that should be used within
5040
Warehouse.

0 commit comments

Comments
 (0)