@@ -298,6 +298,61 @@ Example build constraints file (``build-constraints.txt``):
298298 cython==0.29.24
299299
300300
301+ .. _`Filtering by Upload Time` :
302+
303+ Filtering by Upload Time
304+ =========================
305+
306+ The ``--uploaded-prior-to `` option allows you to filter packages by their upload time
307+ to an index, only considering packages that were uploaded before a specified datetime.
308+ This can be useful for creating reproducible builds by ensuring you only install
309+ packages that were available at a known point in time.
310+
311+ .. tab :: Unix/macOS
312+
313+ .. code-block :: shell
314+
315+ python -m pip install --uploaded-prior-to=2025-03-16T00:00:00Z SomePackage
316+
317+ .. tab :: Windows
318+
319+ .. code-block :: shell
320+
321+ py -m pip install --uploaded-prior-to=2025-03-16T00:00:00Z SomePackage
322+
323+ The option accepts ISO 8601 datetime strings in several formats:
324+
325+ * ``2025-03-16 `` - Date in local timezone
326+ * ``2025-03-16 12:30:00 `` - Datetime in local timezone
327+ * ``2025-03-16T12:30:00Z `` - Datetime in UTC
328+ * ``2025-03-16T12:30:00+05:00 `` - Datetime in UTC offset
329+
330+ For consistency across machines, use either UTC format (with 'Z' suffix) or UTC offset
331+ format (with timezone offset like '+05:00'). Local timezone formats may produce different
332+ results on different machines.
333+
334+ .. note ::
335+
336+ This option only works with package indexes that provide upload-time metadata
337+ (such as PyPI). When upload-time information is not available, packages are not
338+ filtered and installation continues normally.
339+
340+ You can combine this option with other filtering mechanisms like constraints files:
341+
342+ .. tab :: Unix/macOS
343+
344+ .. code-block :: shell
345+
346+ python -m pip install -c constraints.txt --uploaded-prior-to=2025-03-16 SomePackage
347+
348+ .. tab :: Windows
349+
350+ .. code-block :: shell
351+
352+ py -m pip install -c constraints.txt --uploaded-prior-to=2025-03-16 SomePackage
353+ >>>>>>> e592e95e9 (Add `--uploaded-prior-to ` to the user guide)
354+
355+
301356.. _`Dependency Groups` :
302357
303358
0 commit comments