Skip to content

Commit 8ed37a6

Browse files
authored
Merge pull request numpy#25920 from rgommers/neps-update-statuses
NEP: update status fields of many NEPs
2 parents 8ac53ff + 7470655 commit 8ed37a6

14 files changed

+44
-24
lines changed

doc/neps/meta.rst.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Meta-NEPs (NEPs about NEPs or Processes)
2-
----------------------------------------
1+
Meta-NEPs (NEPs about NEPs or active Processes)
2+
-----------------------------------------------
33

44
.. toctree::
55
:maxdepth: 1

doc/neps/nep-0021-advanced-indexing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ NEP 21 — Simplified and explicit advanced indexing
66

77
:Author: Sebastian Berg
88
:Author: Stephan Hoyer <[email protected]>
9-
:Status: Draft
9+
:Status: Deferred
1010
:Type: Standards Track
1111
:Created: 2015-08-27
1212

doc/neps/nep-0023-backwards-compatibility.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NEP 23 — Backwards compatibility and deprecation policy
55
=======================================================
66

77
:Author: Ralf Gommers <[email protected]>
8-
:Status: Final
8+
:Status: Active
99
:Type: Process
1010
:Created: 2018-07-14
1111
:Resolution: https://mail.python.org/pipermail/numpy-discussion/2021-January/081423.html

doc/neps/nep-0030-duck-array-protocol.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ NEP 30 — Duck typing for NumPy arrays - implementation
66

77
:Author: Peter Andreas Entschev <[email protected]>
88
:Author: Stephan Hoyer <[email protected]>
9-
:Status: Draft
9+
:Status: Superseded
10+
:Replaced-By: 56
1011
:Type: Standards Track
1112
:Created: 2019-07-31
1213
:Updated: 2019-07-31
13-
:Resolution:
14+
:Resolution: https://mail.python.org/archives/list/[email protected]/message/Z6AA5CL47NHBNEPTFWYOTSUVSRDGHYPN/
1415

1516
Abstract
1617
--------

doc/neps/nep-0031-uarray.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ NEP 31 — Context-local and global overrides of the NumPy API
77
:Author: Hameer Abbasi <[email protected]>
88
:Author: Ralf Gommers <[email protected]>
99
:Author: Peter Bell <[email protected]>
10-
:Status: Draft
10+
:Status: Superseded
11+
:Replaced-By: 56
1112
:Type: Standards Track
1213
:Created: 2019-08-22
14+
:Resolution: https://mail.python.org/archives/list/[email protected]/message/Z6AA5CL47NHBNEPTFWYOTSUVSRDGHYPN/
1315

1416

1517
Abstract

doc/neps/nep-0036-fair-play.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NEP 36 — Fair play
55
==================
66

77
:Author: Stéfan van der Walt <[email protected]>
8-
:Status: Accepted
8+
:Status: Active
99
:Type: Informational
1010
:Created: 2019-10-24
1111
:Resolution: https://mail.python.org/pipermail/numpy-discussion/2021-June/081890.html

doc/neps/nep-0037-array-module.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ NEP 37 — A dispatch protocol for NumPy-like modules
77
:Author: Stephan Hoyer <[email protected]>
88
:Author: Hameer Abbasi
99
:Author: Sebastian Berg
10-
:Status: Draft
10+
:Status: Superseded
11+
:Replaced-By: 56
1112
:Type: Standards Track
1213
:Created: 2019-12-29
14+
:Resolution: https://mail.python.org/archives/list/[email protected]/message/Z6AA5CL47NHBNEPTFWYOTSUVSRDGHYPN/
15+
1316

1417
Abstract
1518
--------

doc/neps/nep-0038-SIMD-optimizations.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NEP 38 — Using SIMD optimization instructions for performance
55
=============================================================
66

77
:Author: Sayed Adel, Matti Picus, Ralf Gommers
8-
:Status: Accepted
8+
:Status: Final
99
:Type: Standards
1010
:Created: 2019-11-25
1111
:Resolution: https://mail.python.org/archives/list/[email protected]/thread/PVWJ74UVBRZ5ZWF6MDU7EUSJXVNILAQB/#PVWJ74UVBRZ5ZWF6MDU7EUSJXVNILAQB

doc/neps/nep-0045-c_style_guide.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NEP 45 — C style guide
55
=================================
66

77
:Author: Charles Harris <[email protected]>
8-
:Status: Accepted
8+
:Status: Active
99
:Type: Process
1010
:Created: 2012-02-26
1111
:Resolution: https://github.com/numpy/numpy/issues/11911

doc/neps/nep-0046-sponsorship-guidelines.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ NEP 46 — NumPy sponsorship guidelines
55
=====================================
66

77
:Author: Ralf Gommers <[email protected]>
8-
:Status: Accepted
8+
:Status: Active
99
:Type: Process
1010
:Created: 2020-12-27
1111
:Resolution: https://mail.python.org/pipermail/numpy-discussion/2021-January/081424.html

doc/neps/nep-0047-array-api-standard.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ NEP 47 — Adopting the array API standard
1111
:Replaced-By: 56
1212
:Type: Standards Track
1313
:Created: 2021-01-21
14-
:Resolution:
14+
:Resolution: https://mail.python.org/archives/list/[email protected]/message/Z6AA5CL47NHBNEPTFWYOTSUVSRDGHYPN/
1515

1616
.. note::
1717

doc/neps/nep-0048-spending-project-funds.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ NEP 48 — Spending NumPy project funds
77
:Author: Ralf Gommers <[email protected]>
88
:Author: Inessa Pawson <[email protected]>
99
:Author: Stefan van der Walt <[email protected]>
10-
:Status: Draft
10+
:Status: Active
1111
:Type: Informational
1212
:Created: 2021-02-07
1313
:Resolution:

doc/neps/nep-0056-array-api-main-namespace.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ NEP 56 — Array API standard support in NumPy's main namespace
77
:Author: Ralf Gommers <[email protected]>
88
:Author: Mateusz Sokół <[email protected]>
99
:Author: Nathan Goldbaum <[email protected]>
10-
:Status: Draft
11-
:Replaces: 47
10+
:Status: Accepted
11+
:Replaces: 30, 31, 37, 47
1212
:Type: Standards Track
1313
:Created: 2023-12-19
1414
:Resolution: TODO mailing list link (after acceptance)

doc/neps/tools/build_index.py

+22-8
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,37 @@ def nep_metadata():
8484
f"no Replaces tag."
8585
)
8686

87-
if not int(replacement_nep['Replaces']) == nr:
87+
if nr not in parse_replaces_metadata(replacement_nep):
8888
raise RuntimeError(
8989
f'NEP {nr} is superseded by {replaced_by}, but that NEP has a '
9090
f"Replaces tag of `{replacement_nep['Replaces']}`."
9191
)
9292

9393
if 'Replaces' in tags:
94-
replaced_nep = int(tags['Replaces'])
95-
replaced_nep_tags = neps[replaced_nep]
96-
if not replaced_nep_tags['Status'] == 'Superseded':
97-
raise RuntimeError(
98-
f'NEP {nr} replaces {replaced_nep}, but that NEP has not '
99-
f'been set to Superseded'
100-
)
94+
replaced_neps = parse_replaces_metadata(tags)
95+
for nr_replaced in replaced_neps:
96+
replaced_nep_tags = neps[nr_replaced]
97+
if not replaced_nep_tags['Status'] == 'Superseded':
98+
raise RuntimeError(
99+
f'NEP {nr} replaces NEP {nr_replaced}, but that NEP '
100+
'has not been set to Superseded'
101+
)
101102

102103
return {'neps': neps, 'has_provisional': has_provisional}
103104

105+
106+
def parse_replaces_metadata(replacement_nep):
107+
"""Handle :Replaces: as integer or list of integers"""
108+
replaces = replacement_nep['Replaces']
109+
if ' ' in replaces:
110+
# Replaces multiple NEPs, should be comma-separated ints
111+
replaced_neps = [int(s) for s in replaces.split(', ')]
112+
else:
113+
replaced_neps = [int(replaces)]
114+
115+
return replaced_neps
116+
117+
104118
meta = nep_metadata()
105119

106120
for nepcat in (

0 commit comments

Comments
 (0)