Skip to content

Commit 37f20e9

Browse files
authored
Merge branch 'main' into main
2 parents 82e8d05 + 54ad867 commit 37f20e9

3 files changed

Lines changed: 42 additions & 35 deletions

File tree

source/guides/analyzing-pypi-package-downloads.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ the `BigQuery quickstart guide
6868
Data schema
6969
-----------
7070

71-
Linehaul writes an entry in a ``the-psf.pypi.file_downloads`` table for each
71+
Linehaul writes an entry in a ``bigquery-public-data.pypi.file_downloads`` table for each
7272
download. The table contains information about what file was downloaded and how
7373
it was downloaded. Some useful columns from the `table schema
74-
<https://console.cloud.google.com/bigquery?pli=1&p=the-psf&d=pypi&t=file_downloads&page=table>`__
74+
<https://console.cloud.google.com/bigquery?pli=1&p=bigquery-public-data&d=pypi&t=file_downloads&page=table>`__
7575
include:
7676

7777
+------------------------+-----------------+-----------------------------+
@@ -108,7 +108,7 @@ The following query counts the total number of downloads for the project
108108

109109
#standardSQL
110110
SELECT COUNT(*) AS num_downloads
111-
FROM `the-psf.pypi.file_downloads`
111+
FROM `bigquery-public-data.pypi.file_downloads`
112112
WHERE file.project = 'pytest'
113113
-- Only query the last 30 days of history
114114
AND DATE(timestamp)
@@ -118,7 +118,7 @@ The following query counts the total number of downloads for the project
118118
+---------------+
119119
| num_downloads |
120120
+===============+
121-
| 20531925 |
121+
| 26190085 |
122122
+---------------+
123123

124124
To only count downloads from pip, filter on the ``details.installer.name``
@@ -128,7 +128,7 @@ column.
128128

129129
#standardSQL
130130
SELECT COUNT(*) AS num_downloads
131-
FROM `the-psf.pypi.file_downloads`
131+
FROM `bigquery-public-data.pypi.file_downloads`
132132
WHERE file.project = 'pytest'
133133
AND details.installer.name = 'pip'
134134
-- Only query the last 30 days of history
@@ -139,7 +139,7 @@ column.
139139
+---------------+
140140
| num_downloads |
141141
+===============+
142-
| 19391645 |
142+
| 24334215 |
143143
+---------------+
144144

145145
Package downloads over time
@@ -154,7 +154,7 @@ filtering by this column reduces corresponding costs.
154154
SELECT
155155
COUNT(*) AS num_downloads,
156156
DATE_TRUNC(DATE(timestamp), MONTH) AS `month`
157-
FROM `the-psf.pypi.file_downloads`
157+
FROM `bigquery-public-data.pypi.file_downloads`
158158
WHERE
159159
file.project = 'pytest'
160160
-- Only query the last 6 months of history
@@ -192,7 +192,7 @@ query processes over 500 GB of data.
192192
SELECT
193193
REGEXP_EXTRACT(details.python, r"[0-9]+\.[0-9]+") AS python_version,
194194
COUNT(*) AS num_downloads,
195-
FROM `the-psf.pypi.file_downloads`
195+
FROM `bigquery-public-data.pypi.file_downloads`
196196
WHERE
197197
-- Only query the last 6 months of history
198198
DATE(timestamp)
@@ -204,17 +204,17 @@ query processes over 500 GB of data.
204204
+--------+---------------+
205205
| python | num_downloads |
206206
+========+===============+
207-
| 3.7 | 12990683561 |
207+
| 3.7 | 18051328726 |
208208
+--------+---------------+
209-
| 3.6 | 9035598511 |
209+
| 3.6 | 9635067203 |
210210
+--------+---------------+
211-
| 2.7 | 8467785320 |
211+
| 3.8 | 7781904681 |
212212
+--------+---------------+
213-
| 3.8 | 4581627740 |
213+
| 2.7 | 6381252241 |
214214
+--------+---------------+
215-
| 3.5 | 2412533601 |
215+
| null | 2026630299 |
216216
+--------+---------------+
217-
| null | 1641456718 |
217+
| 3.5 | 1894153540 |
218218
+--------+---------------+
219219

220220
Caveats
@@ -251,7 +251,7 @@ the official Python client library for BigQuery.
251251
252252
query_job = client.query("""
253253
SELECT COUNT(*) AS num_downloads
254-
FROM `the-psf.pypi.file_downloads`
254+
FROM `bigquery-public-data.pypi.file_downloads`
255255
WHERE file.project = 'pytest'
256256
-- Only query the last 30 days of history
257257
AND DATE(timestamp)
@@ -303,7 +303,7 @@ References
303303
.. [#] `PyPI Download Counts deprecation email <https://mail.python.org/pipermail/distutils-sig/2013-May/020855.html>`__
304304
.. [#] `PyPI BigQuery dataset announcement email <https://mail.python.org/pipermail/distutils-sig/2016-May/028986.html>`__
305305
306-
.. _public PyPI download statistics dataset: https://console.cloud.google.com/bigquery?p=the-psf&d=pypi&page=dataset
306+
.. _public PyPI download statistics dataset: https://console.cloud.google.com/bigquery?p=bigquery-public-data&d=pypi&page=dataset
307307
.. _bandersnatch: /key_projects/#bandersnatch
308308
.. _Google BigQuery: https://cloud.google.com/bigquery
309309
.. _BigQuery web UI: https://console.cloud.google.com/bigquery

source/specifications/platform-compatibility-tags.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ The scheme defined in :pep:`425` is insufficient for public distribution of
3333
wheel files (and \*nix wheel files in general) to Linux platforms, due to the
3434
large ecosystem of Linux platforms and subtle differences between them.
3535

36-
Instead, :pep:`513` defines the ``manylinux`` standard, which represents a
36+
Instead, :pep:`600` defines the ``manylinux`` standard, which represents a
3737
common subset of Linux platforms, and allows building wheels tagged with the
3838
``manylinux`` platform tag which can be used across most common Linux
3939
distributions.
4040

41-
There are multiple iterations of the ``manylinux`` specification, each
41+
There were multiple iterations of the ``manylinux`` specification, each
4242
representing the common subset of Linux platforms at a given point in time:
4343

4444
* ``manylinux1`` (:pep:`513`) supports ``x86_64`` and ``i686``
@@ -51,6 +51,11 @@ representing the common subset of Linux platforms at a given point in time:
5151
and ``s390x``) and updates the base platform to a compatible Linux platform
5252
from 2014.
5353

54+
``manylinux_x_y`` (:pep:`600`) supersedes all previous PEPs to define a
55+
future-proof standard. It defines ``x`` and ``y`` as glibc major an minor
56+
versions supported (e.g. ``manylinux_2_24`` should work on any distro using
57+
glibc 2.24+). Previous tags are still supported for backward compatibility.
58+
5459
In general, distributions built for older versions of the specification are
5560
forwards-compatible (meaning that ``manylinux1`` distributions should continue
5661
to work on modern systems) but not backwards-compatible (meaning that
@@ -59,26 +64,27 @@ existed before 2010).
5964

6065
Package maintainers should attempt to target the most compatible specification
6166
possible, with the caveat that the provided build environment for
62-
``manylinux1`` has reached end-of-life, and the build environment for
63-
``manylinux2010`` will reach end-of-life in November 2020 [#]_, meaning that
67+
``manylinux1`` and ``manylinux2010`` have reached end-of-life meaning that
6468
these images will no longer receive security updates.
6569

6670
Manylinux compatibility support
6771
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6872

6973
.. Note::
70-
The ``manylinux2014`` specification is relatively new and is not yet widely
71-
recognised by install tools.
74+
* The ``manylinux2014`` specification is relatively new and is not yet widely
75+
recognised by install tools.
76+
* The ``manylinux_x_y`` specification is relatively new and is not yet widely
77+
recognised by install tools.
7278

7379
The following table shows the minimum versions of relevant projects to support
7480
the various ``manylinux`` standards:
7581

76-
========== ============== ================= =================
77-
Tool ``manylinux1`` ``manylinux2010`` ``manylinux2014``
78-
========== ============== ================= =================
79-
pip ``>=8.1.0`` ``>=19.0`` ``>=19.3``
80-
auditwheel ``>=1.0.0`` ``>=2.0.0`` ``>=3.0.0``
81-
========== ============== ================= =================
82+
========== ============== ================= ================= =================
83+
Tool ``manylinux1`` ``manylinux2010`` ``manylinux2014`` ``manylinux_x_y``
84+
========== ============== ================= ================= =================
85+
pip ``>=8.1.0`` ``>=19.0`` ``>=19.3`` ``>=20.3``
86+
auditwheel ``>=1.0.0`` ``>=2.0.0`` ``>=3.0.0`` ``>=3.3.0`` [#]_
87+
========== ============== ================= ================= =================
8288

8389
Platform tags for other \*nix platforms
8490
---------------------------------------
@@ -89,4 +95,4 @@ distribution of wheel files to other \*nix platforms. Efforts are currently
8995
schemes for AIX and for Alpine Linux.
9096

9197

92-
.. [#] https://wiki.centos.org/About/Product
98+
.. [#] Only support for ``manylinux_2_24`` has been added in auditwheel 3.3.0

source/tutorials/packaging-projects.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,22 +191,23 @@ an escape hatch when absolutely necessary.
191191
There are many more than the ones mentioned here. See
192192
:doc:`/guides/distributing-packages-using-setuptools` for more details.
193193

194-
195194
If you create a :file:`setup.py` file, this will enable direct interaction
196195
with :file:`setup.py` (which generally should be avoided), and editable
197196
installs. This file used to be required, but can be omitted in modern
198-
setuptools.
199-
200-
Anything you set in :file:`setup.cfg` can instead be set via keyword argument to
201-
:func:`setup()`; this enables computed values to be used. You will also need
202-
:func:`setup()` for setting up extension modules for compilation.
197+
setuptools. If you include the file, you must have a call to
198+
:func:`setup()` in it:
203199

204200
.. code-block:: python
205201
206202
import setuptools
207203
208204
setuptools.setup()
209205
206+
Anything you set in :file:`setup.cfg` can instead be set via keyword argument to
207+
:func:`setup()`; this enables computed values to be used. You will also need
208+
:func:`setup()` for setting up extension modules for compilation.
209+
210+
210211
.. tab:: setup.py (dynamic)
211212

212213
:file:`setup.py` is the build script for :ref:`setuptools`. It tells setuptools

0 commit comments

Comments
 (0)