You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(some of them are pulled in by other dependencies, so
just not including them in d/control doesn't stop them being installed)
Most of the content of this patch was generated by the following Python code:
import pathlib
import re
basedir = pathlib.Path.cwd()
if not (basedir / 'pandas/tests').exists():
raise FileNotFoundError('must be run from the pandas root')
for source_file in basedir.glob('pandas/**/*.py'):
with open(source_file, 'r') as fd:
source_text = fd.read()
if 'pytest.importorskip' in source_text:
source_text = re.sub(r'pytest\.importorskip(.*)minversion', r'td.versioned_importorskip\1min_version', source_text)
source_text = re.sub(r'pytest\.importorskip', r'td.versioned_importorskip', source_text)
if '_test_decorators as td' not in source_text:
# add the import if it isn't already present
source_text, count = re.subn(r'^(import pandas|from pandas.*import)',r'import pandas.util._test_decorators as td\n\1', source_text, count=1, flags=re.MULTILINE)
if count != 1:
raise KeyError("failed to add import")
with open(source_file, 'w') as fd:
fd.write(source_text)
Author: Rebecca N. Palmer <[email protected]>
Forwarded: no
Gbp-Pq: Name versioned_importorskip.patch
0 commit comments