@@ -150,14 +150,31 @@ def __exit__(self, *exc_info):
150150 # py.test reads files with the 'U' flag, which is
151151 # deprecated.
152152 r"'U' mode is deprecated" ,
153- # inspect raises this slightly different warning on Python 3.6.
153+ # inspect raises this slightly different warning on Python 3.6-3.7 .
154154 # Keeping it since e.g. lxml as of 3.8.0 is still calling getargspec()
155155 r"inspect\.getargspec\(\) is deprecated, use "
156156 r"inspect\.signature\(\) or inspect\.getfullargspec\(\)" ,
157157 # https://github.com/astropy/astropy/pull/7372
158158 r"Importing from numpy\.testing\.decorators is deprecated, import from numpy\.testing instead\." ,
159159 # Deprecation warnings ahead of pytest 4.x
160- r"MarkInfo objects are deprecated" ])}
160+ r"MarkInfo objects are deprecated" ]),
161+ (3 , 7 ): set ([
162+ # py.test reads files with the 'U' flag, which is
163+ # deprecated.
164+ r"'U' mode is deprecated" ,
165+ # inspect raises this slightly different warning on Python 3.6-3.7.
166+ # Keeping it since e.g. lxml as of 3.8.0 is still calling getargspec()
167+ r"inspect\.getargspec\(\) is deprecated, use "
168+ r"inspect\.signature\(\) or inspect\.getfullargspec\(\)" ,
169+ # https://github.com/astropy/astropy/pull/7372
170+ r"Importing from numpy\.testing\.decorators is deprecated, import from numpy\.testing instead\." ,
171+ # Deprecation warnings ahead of pytest 4.x
172+ r"MarkInfo objects are deprecated" ,
173+ # Deprecation warning for collections.abc, fixed in Astropy but still
174+ # used in lxml, and maybe others
175+ r"Using or importing the ABCs from 'collections'" ,
176+ ]),
177+ }
161178
162179
163180def enable_deprecations_as_exceptions (include_astropy_deprecations = True ,
0 commit comments