Skip to content

tests/unit/create/test_creator.py::test_create_no_seed --creator venv fails on Python 3.13 #2670

Closed
@hroncok

Description

@hroncok

Issue

When I try to run the tests with Python 3.13.0a2, I see the following 8 failures:

FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-symlinks-global] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-symlinks-isolated] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-copies-isolated] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[venv-venv-copies-global] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-symlinks-isolated] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-copies-global] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-symlinks-global] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
FAILED tests/unit/create/test_creator.py::test_create_no_seed[root-venv-copies-isolated] - AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']

The failure is:

        git_ignore = (dest / ".gitignore").read_text(encoding="utf-8")
>       assert git_ignore.splitlines() == ["# created by virtualenv automatically", "*"]
E       AssertionError: assert ['# Created b...nv.html', '*'] == ['# created b...tically', '*']
E         At index 0 diff: '# Created by venv; see https://docs.python.org/3/library/venv.html' != '# created by virtualenv automatically'
E         Full diff:
E         - ['# created by virtualenv automatically', '*']
E         + ['# Created by venv; see https://docs.python.org/3/library/venv.html', '*']

I'd like to investigate, but I have no idea what is happening here. Looks like venv is used on Python 3.13... ?

I've tied the main branch, I've tried from #2669

I've tried to add:

diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py
index ed6027b..09ec8cb 100644
--- a/src/virtualenv/seed/wheels/embed/__init__.py
+++ b/src/virtualenv/seed/wheels/embed/__init__.py
@@ -36,6 +36,11 @@ BUNDLE_SUPPORT = {
         "setuptools": "setuptools-69.0.2-py3-none-any.whl",
         "wheel": "wheel-0.42.0-py3-none-any.whl",
     },
+    "3.13": {
+        "pip": "pip-23.3.1-py3-none-any.whl",
+        "setuptools": "setuptools-69.0.2-py3-none-any.whl",
+        "wheel": "wheel-0.42.0-py3-none-any.whl",
+    },
 }
 MAX = "3.7"
 

It still fails.

To reproduce, run tox -e py313 -- -k test_create_no_seed -v.

Full output: virtualenv.txt

Environment

Provide at least:

  • OS: Fedora Linux 37 or 40
  • pip list of the host python where virtualenv is installed:
Package                    Version
-------------------------- -------------------------------
covdefaults                2.3.0
coverage                   7.3.2
coverage-enable-subprocess 1.0
distlib                    0.3.7
filelock                   3.13.1
flaky                      3.7.0
iniconfig                  2.0.0
packaging                  23.2
pip                        23.3.1
platformdirs               4.0.0
pluggy                     1.3.0
pytest                     7.4.3
pytest-env                 1.1.3
pytest-mock                3.12.0
pytest-randomly            3.15.0
pytest-timeout             2.2.0
python-dateutil            2.8.2
setuptools                 69.0.2
six                        1.16.0
time-machine               2.13.0
virtualenv                 20.24.7.dev9+g6fbe60b.d20231128

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions