Bug 2050080 - python-pep517 fails to build with Python 3.11: E DeprecationWarning: path is deprecated. Use files() instead.
Summary: python-pep517 fails to build with Python 3.11: E DeprecationWarning: path is ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pep517
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Viktorin (pviktori)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-02-03 08:17 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:49:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Avoid importlib.resources (548 bytes, patch)
2022-03-25 09:39 UTC, Petr Viktorin (pviktori)
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github pypa pep517 issues 140 0 None open Tests fail on Python 3.11 due to importlib.resources DeprecationWarning 2022-03-25 09:33:32 UTC

Description Tomáš Hrnčiar 2022-02-03 08:17:17 UTC
python-pep517 fails to build with Python 3.11.0a4.


=================================== FAILURES ===================================
_____________________ test_missing_backend_gives_exception _____________________

    def test_missing_backend_gives_exception():
        hooks = get_hooks('pkg1')
        with modified_env({'PYTHONPATH': ''}):
            with pytest.raises(BackendUnavailable):
>               hooks.get_requires_for_build_wheel({})

tests/test_call_hooks.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
______________________ test_get_requires_for_build_wheel _______________________

    def test_get_requires_for_build_wheel():
        hooks = get_hooks('pkg1')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_wheel({})

tests/test_call_hooks.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_____________________ test_get_requires_for_build_editable _____________________

    def test_get_requires_for_build_editable():
        hooks = get_hooks('pkg1')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_editable({})

tests/test_call_hooks.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:225: in get_requires_for_build_editable
    return self._call_hook('get_requires_for_build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
______________________ test_get_requires_for_build_sdist _______________________

    def test_get_requires_for_build_sdist():
        hooks = get_hooks('pkg1')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_sdist({})

tests/test_call_hooks.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:278: in get_requires_for_build_sdist
    return self._call_hook('get_requires_for_build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
____________________ test_prepare_metadata_for_build_wheel _____________________

    def test_prepare_metadata_for_build_wheel():
        hooks = get_hooks('pkg1')
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               hooks.prepare_metadata_for_build_wheel(metadatadir, {})

tests/test_call_hooks.py:71: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:188: in prepare_metadata_for_build_wheel
    return self._call_hook('prepare_metadata_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
___________________ test_prepare_metadata_for_build_editable ___________________

    def test_prepare_metadata_for_build_editable():
        hooks = get_hooks('pkg1')
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               hooks.prepare_metadata_for_build_editable(metadatadir, {})

tests/test_call_hooks.py:80: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:241: in prepare_metadata_for_build_editable
    return self._call_hook('prepare_metadata_for_build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_______________________________ test_build_wheel _______________________________

    def test_build_wheel():
        hooks = get_hooks('pkg1')
        with TemporaryDirectory() as builddir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               whl_file = hooks.build_wheel(builddir, {})

tests/test_call_hooks.py:89: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:208: in build_wheel
    return self._call_hook('build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_____________________________ test_build_editable ______________________________

    def test_build_editable():
        hooks = get_hooks('pkg1')
        with TemporaryDirectory() as builddir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               whl_file = hooks.build_editable(builddir, {})

tests/test_call_hooks.py:103: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:261: in build_editable
    return self._call_hook('build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
___________________________ test_build_wheel_relpath ___________________________

    def test_build_wheel_relpath():
        hooks = get_hooks('pkg1')
        with TemporaryWorkingDirectory() as builddir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               whl_file = hooks.build_wheel('.', {})

tests/test_call_hooks.py:117: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:208: in build_wheel
    return self._call_hook('build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_______________________________ test_build_sdist _______________________________

    def test_build_sdist():
        hooks = get_hooks('pkg1')
        with TemporaryDirectory() as sdistdir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               sdist = hooks.build_sdist(sdistdir, {})

tests/test_call_hooks.py:131: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:289: in build_sdist
    return self._call_hook('build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_________________________ test_build_sdist_unsupported _________________________

    def test_build_sdist_unsupported():
        hooks = get_hooks('pkg1')
        with TemporaryDirectory() as sdistdir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
                with pytest.raises(UnsupportedOperation):
>                   hooks.build_sdist(sdistdir, {'test_unsupported': True})

tests/test_call_hooks.py:150: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:289: in build_sdist
    return self._call_hook('build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
______________________ test_runner_replaced_on_exception _______________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f9d1528d650>

    def test_runner_replaced_on_exception(monkeypatch):
        monkeypatch.setenv('PYTHONPATH', BUILDSYS_PKGS)
    
        runner = Mock(wraps=default_subprocess_runner)
        hooks = get_hooks('pkg1', runner=runner)
    
>       hooks.get_requires_for_build_wheel()

tests/test_call_hooks.py:159: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
________________________ test_custom_python_executable _________________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f9d1517ce90>
tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_custom_python_executable0')

    def test_custom_python_executable(monkeypatch, tmpdir):
        monkeypatch.setenv('PYTHONPATH', BUILDSYS_PKGS)
    
        runner = Mock(autospec=default_subprocess_runner)
        hooks = get_hooks('pkg1', runner=runner, python_executable='some-python')
    
        with hooks.subprocess_runner(runner):
            with pytest.raises(FileNotFoundError):
                # output.json is missing because we didn't actually run the hook
>               hooks.get_requires_for_build_wheel()

tests/test_call_hooks.py:186: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
________________________________ test_issue_104 ________________________________

    def test_issue_104():
        hooks = get_hooks('test-for-issue-104')
        with TemporaryDirectory() as outdir:
            with modified_env({
                'PYTHONPATH': BUILDSYS_PKGS,
                'PEP517_ISSUE104_OUTDIR': outdir,
            }):
>               hooks.get_requires_for_build_wheel({})

tests/test_call_hooks.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
________________________________ test_setup_py _________________________________

    def test_setup_py():
        hooks = get_hooks('setup-py')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_wheel({})

tests/test_call_hooks.py:210: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
___________________ test__supported_features[pkg1-expected0] ___________________

pkg = 'pkg1', expected = ['build_editable']

    @pytest.mark.parametrize(
        ("pkg", "expected"),
        [
            ("pkg1", ["build_editable"]),
            ("pkg2", []),
            ("pkg3", ["build_editable"]),
        ],
    )
    def test__supported_features(pkg, expected):
        hooks = get_hooks(pkg)
        with modified_env({"PYTHONPATH": BUILDSYS_PKGS}):
>           res = hooks._supported_features()

tests/test_call_hooks.py:227: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:159: in _supported_features
    return self._call_hook('_supported_features', {})
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
___________________ test__supported_features[pkg2-expected1] ___________________

pkg = 'pkg2', expected = []

    @pytest.mark.parametrize(
        ("pkg", "expected"),
        [
            ("pkg1", ["build_editable"]),
            ("pkg2", []),
            ("pkg3", ["build_editable"]),
        ],
    )
    def test__supported_features(pkg, expected):
        hooks = get_hooks(pkg)
        with modified_env({"PYTHONPATH": BUILDSYS_PKGS}):
>           res = hooks._supported_features()

tests/test_call_hooks.py:227: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:159: in _supported_features
    return self._call_hook('_supported_features', {})
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
___________________ test__supported_features[pkg3-expected2] ___________________

pkg = 'pkg3', expected = ['build_editable']

    @pytest.mark.parametrize(
        ("pkg", "expected"),
        [
            ("pkg1", ["build_editable"]),
            ("pkg2", []),
            ("pkg3", ["build_editable"]),
        ],
    )
    def test__supported_features(pkg, expected):
        hooks = get_hooks(pkg)
        with modified_env({"PYTHONPATH": BUILDSYS_PKGS}):
>           res = hooks._supported_features()

tests/test_call_hooks.py:227: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:159: in _supported_features
    return self._call_hook('_supported_features', {})
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_______________________________ test_build_wheel _______________________________

mock_pip_install = <MagicMock name='pip_install' id='140312640919312'>

    @patch.object(BuildEnvironment, 'pip_install')
    def test_build_wheel(mock_pip_install):
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}), \
                TemporaryDirectory() as outdir:
>           filename = build_wheel(pjoin(SAMPLES_DIR, 'pkg1'), outdir)

tests/test_envbuild.py:21: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/envbuild.py:147: in build_wheel
    reqs = hooks.get_requires_for_build_wheel(config_settings)
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_______________________________ test_build_sdist _______________________________

mock_pip_install = <MagicMock name='pip_install' id='140312641399376'>

    @patch.object(BuildEnvironment, 'pip_install')
    def test_build_sdist(mock_pip_install):
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}), \
                TemporaryDirectory() as outdir:
>           filename = build_sdist(pjoin(SAMPLES_DIR, 'pkg1'), outdir)

tests/test_envbuild.py:34: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/envbuild.py:169: in build_sdist
    reqs = hooks.get_requires_for_build_sdist(config_settings)
pep517/wrappers.py:278: in get_requires_for_build_sdist
    return self._call_hook('get_requires_for_build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
______________________ test_get_requires_for_build_wheel _______________________

    def test_get_requires_for_build_wheel():
        hooks = get_hooks('pkg2')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_wheel({})

tests/test_hook_fallbacks.py:24: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:172: in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_____________________ test_get_requires_for_build_editable _____________________

    def test_get_requires_for_build_editable():
        hooks = get_hooks('pkg2')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_editable({})

tests/test_hook_fallbacks.py:31: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:225: in get_requires_for_build_editable
    return self._call_hook('get_requires_for_build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
______________________ test_get_requires_for_build_sdist _______________________

    def test_get_requires_for_build_sdist():
        hooks = get_hooks('pkg2')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_sdist({})

tests/test_hook_fallbacks.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:278: in get_requires_for_build_sdist
    return self._call_hook('get_requires_for_build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
____________________ test_prepare_metadata_for_build_wheel _____________________

    def test_prepare_metadata_for_build_wheel():
        hooks = get_hooks('pkg2')
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               hooks.prepare_metadata_for_build_wheel(metadatadir, {})

tests/test_hook_fallbacks.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:188: in prepare_metadata_for_build_wheel
    return self._call_hook('prepare_metadata_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
___________________ test_prepare_metadata_for_build_editable ___________________

    def test_prepare_metadata_for_build_editable():
        hooks = get_hooks('pkg3')
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>               hooks.prepare_metadata_for_build_editable(metadatadir, {})

tests/test_hook_fallbacks.py:55: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:241: in prepare_metadata_for_build_editable
    return self._call_hook('prepare_metadata_for_build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_______ test_prepare_metadata_for_build_editable_missing_build_editable ________

    def test_prepare_metadata_for_build_editable_missing_build_editable():
        hooks = get_hooks('pkg2')
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
                # pkg2's build system does not have build_editable
                with pytest.raises(HookMissing) as exc_info:
>                   hooks.prepare_metadata_for_build_editable(metadatadir, {})

tests/test_hook_fallbacks.py:66: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:241: in prepare_metadata_for_build_editable
    return self._call_hook('prepare_metadata_for_build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
______________ test_prepare_metadata_for_build_wheel_no_fallback _______________

    def test_prepare_metadata_for_build_wheel_no_fallback():
        hooks = get_hooks('pkg2')
    
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
                with pytest.raises(HookMissing) as exc_info:
>                   hooks.prepare_metadata_for_build_wheel(
                        metadatadir, {}, _allow_fallback=False
                    )

tests/test_hook_fallbacks.py:79: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:188: in prepare_metadata_for_build_wheel
    return self._call_hook('prepare_metadata_for_build_wheel', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_____________ test_prepare_metadata_for_build_editable_no_fallback _____________

    def test_prepare_metadata_for_build_editable_no_fallback():
        hooks = get_hooks('pkg2')
    
        with TemporaryDirectory() as metadatadir:
            with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
                with pytest.raises(HookMissing) as exc_info:
>                   hooks.prepare_metadata_for_build_editable(
                        metadatadir, {}, _allow_fallback=False
                    )

tests/test_hook_fallbacks.py:94: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:241: in prepare_metadata_for_build_editable
    return self._call_hook('prepare_metadata_for_build_editable', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_____________________________ test_intree_backend ______________________________

    def test_intree_backend():
        hooks = get_hooks('pkg_intree')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
>           res = hooks.get_requires_for_build_sdist({})

tests/test_inplace_hooks.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:278: in get_requires_for_build_sdist
    return self._call_hook('get_requires_for_build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
_______________________ test_intree_backend_not_in_path ________________________

    def test_intree_backend_not_in_path():
        hooks = get_hooks('pkg_intree', backend='buildsys')
        with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
            with pytest.raises(BackendInvalid):
>               hooks.get_requires_for_build_sdist({})

tests/test_inplace_hooks.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pep517/wrappers.py:278: in get_requires_for_build_sdist
    return self._call_hook('get_requires_for_build_sdist', {
/usr/lib64/python3.11/contextlib.py:155: in __exit__
    self.gen.throw(typ, value, traceback)
pep517/wrappers.py:28: in tempdir
    yield td
pep517/wrappers.py:320: in _call_hook
    with _in_proc_script_path() as script:
pep517/in_process/__init__.py:13: in _in_proc_script_path
    return resources.path(__package__, '_in_process.py')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('pep517.in_process', '_in_process.py'), kwargs = {}

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
>       warnings.warn(
            f"{func.__name__} is deprecated. Use files() instead. "
            "Refer to https://importlib-resources.readthedocs.io"
            "/en/latest/using.html#migrating-from-legacy for migration advice.",
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.

/usr/lib64/python3.11/importlib/resources/_legacy.py:18: DeprecationWarning
=========================== short test summary info ============================
FAILED tests/test_call_hooks.py::test_missing_backend_gives_exception - Depre...
FAILED tests/test_call_hooks.py::test_get_requires_for_build_wheel - Deprecat...
FAILED tests/test_call_hooks.py::test_get_requires_for_build_editable - Depre...
FAILED tests/test_call_hooks.py::test_get_requires_for_build_sdist - Deprecat...
FAILED tests/test_call_hooks.py::test_prepare_metadata_for_build_wheel - Depr...
FAILED tests/test_call_hooks.py::test_prepare_metadata_for_build_editable - D...
FAILED tests/test_call_hooks.py::test_build_wheel - DeprecationWarning: path ...
FAILED tests/test_call_hooks.py::test_build_editable - DeprecationWarning: pa...
FAILED tests/test_call_hooks.py::test_build_wheel_relpath - DeprecationWarnin...
FAILED tests/test_call_hooks.py::test_build_sdist - DeprecationWarning: path ...
FAILED tests/test_call_hooks.py::test_build_sdist_unsupported - DeprecationWa...
FAILED tests/test_call_hooks.py::test_runner_replaced_on_exception - Deprecat...
FAILED tests/test_call_hooks.py::test_custom_python_executable - DeprecationW...
FAILED tests/test_call_hooks.py::test_issue_104 - DeprecationWarning: path is...
FAILED tests/test_call_hooks.py::test_setup_py - DeprecationWarning: path is ...
FAILED tests/test_call_hooks.py::test__supported_features[pkg1-expected0] - D...
FAILED tests/test_call_hooks.py::test__supported_features[pkg2-expected1] - D...
FAILED tests/test_call_hooks.py::test__supported_features[pkg3-expected2] - D...
FAILED tests/test_envbuild.py::test_build_wheel - DeprecationWarning: path is...
FAILED tests/test_envbuild.py::test_build_sdist - DeprecationWarning: path is...
FAILED tests/test_hook_fallbacks.py::test_get_requires_for_build_wheel - Depr...
FAILED tests/test_hook_fallbacks.py::test_get_requires_for_build_editable - D...
FAILED tests/test_hook_fallbacks.py::test_get_requires_for_build_sdist - Depr...
FAILED tests/test_hook_fallbacks.py::test_prepare_metadata_for_build_wheel - ...
FAILED tests/test_hook_fallbacks.py::test_prepare_metadata_for_build_editable
FAILED tests/test_hook_fallbacks.py::test_prepare_metadata_for_build_editable_missing_build_editable
FAILED tests/test_hook_fallbacks.py::test_prepare_metadata_for_build_wheel_no_fallback
FAILED tests/test_hook_fallbacks.py::test_prepare_metadata_for_build_editable_no_fallback
FAILED tests/test_inplace_hooks.py::test_intree_backend - DeprecationWarning:...
FAILED tests/test_inplace_hooks.py::test_intree_backend_not_in_path - Depreca...
================== 30 failed, 9 passed, 3 deselected in 0.72s ==================
ERROR: InvocationError for command /usr/bin/pytest -v -k 'not test_meta' (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py311: commands failed

https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03271732-python-pep517/

For all our attempts to build python-pep517 with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/python-pep517/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Ben Cotton 2022-02-08 20:18:26 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 2 Miro Hrončok 2022-03-24 13:09:26 UTC
This is BRed by python-poetry-core, hence raising severity. We can probably workaround this in Poetry by skipping some (all?) tests, however making the DeprecationWarning not fail the %check here should be eaiser.

Comment 3 Petr Viktorin (pviktori) 2022-03-25 09:39:34 UTC
Created attachment 1868305 [details]
Avoid importlib.resources

Patch to avoid importlib.resources

Comment 4 Petr Viktorin (pviktori) 2022-03-25 09:41:47 UTC
Looks like importlib.resources isn't ready yet in Python 3.11 :/

Upstream issue: https://github.com/pypa/pep517/issues/140
Python discourse complaint: https://discuss.python.org/t/deprecating-importlib-resources-legacy-api/11386/25?u=encukou

I attached a patch you can use to build for Python 3.11 before a proper fix is ready.

Comment 5 Miro Hrončok 2022-06-22 11:49:14 UTC
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.


Note You need to log in before you can comment on or make changes to this bug.