This repository was archived by the owner on Dec 4, 2023. It is now read-only.
File tree 2 files changed +21
-0
lines changed 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ 4.4
2
+ ===
3
+
4
+ * #43: Detect condition where declarative config will cause
5
+ errors and emit a UserWarning with guidance on necessary
6
+ actions.
7
+
1
8
4.3.1
2
9
=====
3
10
Original file line number Diff line number Diff line change 8
8
import sys as _sys
9
9
import operator as _operator
10
10
import itertools as _itertools
11
+ import warnings as _warnings
11
12
12
13
try :
13
14
# ensure that map has the same meaning on Python 2
@@ -153,11 +154,24 @@ def install_extra_dists(self, dist):
153
154
results = list (map (dist .fetch_build_eggs , matching_extras ))
154
155
return _itertools .chain .from_iterable (results )
155
156
157
+ @staticmethod
158
+ def _warn_old_setuptools ():
159
+ msg = (
160
+ "pytest-runner will stop working on this version of setuptools; "
161
+ "please upgrade to setuptools 30.4 or later or pin to "
162
+ "pytest-runner < 5."
163
+ )
164
+ ver_str = pkg_resources .get_distribution ('setuptools' ).version
165
+ ver = pkg_resources .parse_version (ver_str )
166
+ if ver < pkg_resources .parse_version ('30.4' ):
167
+ _warnings .warn (msg )
168
+
156
169
def run (self ):
157
170
"""
158
171
Override run to ensure requirements are available in this session (but
159
172
don't install them anywhere).
160
173
"""
174
+ self ._warn_old_setuptools ()
161
175
dist = CustomizedDist ()
162
176
for attr in 'allow_hosts index_url' .split ():
163
177
setattr (dist , attr , getattr (self , attr ))
You can’t perform that action at this time.
0 commit comments