Bug 2279985 - python-pip fails to build with Python 3.13: AssertionError: assert '2024-05-10T08:42:16,462 fake' == '2019-01-17T06:00:37,040 fake'
Summary: python-pip fails to build with Python 3.13: AssertionError: assert '2024-05-1...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pip
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-05-10 11:53 UTC by Karolina Surma
Modified: 2024-05-28 12:47 UTC (History)
7 users (show)

Fixed In Version: python-pip-24.0-3.fc41
Clone Of:
Environment:
Last Closed: 2024-05-28 12:47:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-pip pull-request 138 0 None None None 2024-05-28 12:09:19 UTC

Description Karolina Surma 2024-05-10 11:53:46 UTC
python-pip fails to build with Python 3.13.0b1.

=================================== FAILURES ===================================
___________________________ test_log_command_success ___________________________

fixed_time = None
tmpdir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_log_command_success0')

    def test_log_command_success(fixed_time: None, tmpdir: Path) -> None:
        """Test the --log option logs when command succeeds."""
        cmd = FakeCommand()
        log_path = os.path.join(tmpdir, "log")
        cmd.main(["fake", "--log", log_path])
        with open(log_path) as f:
>           assert f.read().rstrip() == "2019-01-17T06:00:37,040 fake"
E           AssertionError: assert '2024-05-10T08:42:16,462 fake' == '2019-01-17T06:00:37,040 fake'
E             - 2019-01-17T06:00:37,040 fake
E             + 2024-05-10T08:42:16,462 fake

tests/unit/test_base_command.py:112: AssertionError
----------------------------- Captured stdout call -----------------------------
fake
____________________________ test_log_command_error ____________________________

fixed_time = None
tmpdir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_log_command_error0')

    def test_log_command_error(fixed_time: None, tmpdir: Path) -> None:
        """Test the --log option logs when command fails."""
        cmd = FakeCommand(error=True)
        log_path = os.path.join(tmpdir, "log")
        cmd.main(["fake", "--log", log_path])
        with open(log_path) as f:
>           assert f.read().startswith("2019-01-17T06:00:37,040 fake")
E           assert False
E            +  where False = <built-in method startswith of str object at 0x561ebe174940>('2019-01-17T06:00:37,040 fake')
E            +    where <built-in method startswith of str object at 0x561ebe174940> = '2024-05-10T08:42:16,510 fake\n2024-05-10T08:42:16,511 ERROR: Exception:\n2024-05-10T08:42:16,511 Traceback (most rece...nd.py", line 33, in run_func\n2024-05-10T08:42:16,511     raise SystemExit(1)\n2024-05-10T08:42:16,511 SystemExit: 1\n'.startswith
E            +      where '2024-05-10T08:42:16,510 fake\n2024-05-10T08:42:16,511 ERROR: Exception:\n2024-05-10T08:42:16,511 Traceback (most rece...nd.py", line 33, in run_func\n2024-05-10T08:42:16,511     raise SystemExit(1)\n2024-05-10T08:42:16,511 SystemExit: 1\n' = <built-in method read of _io.TextIOWrapper object at 0x7f1b3e63fae0>()
E            +        where <built-in method read of _io.TextIOWrapper object at 0x7f1b3e63fae0> = <_io.TextIOWrapper name='/tmp/pytest-of-mockbuild/pytest-0/test_log_command_error0/log' mode='r' encoding='UTF-8'>.read

tests/unit/test_base_command.py:121: AssertionError
----------------------------- Captured stdout call -----------------------------
fake
----------------------------- Captured stderr call -----------------------------
ERROR: Exception:
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-pip-24.0-2.fc41.x86_64/usr/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/builddir/build/BUILD/pip-24.0/tests/unit/test_base_command.py", line 46, in run
    return self.run_func()
           ~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/pip-24.0/tests/unit/test_base_command.py", line 33, in run_func
    raise SystemExit(1)
SystemExit: 1
------------------------------ Captured log call -------------------------------
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'global', will try loading '/tmp/pytest-of-mockbuild/pytest-0/test_log_command_error0/fake-root/etc/xdg/pip/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'global', will try loading '/etc/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'user', will try loading '/tmp/pytest-of-mockbuild/pytest-0/test_log_command_error0/home/.pip/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'user', will try loading '/tmp/pytest-of-mockbuild/pytest-0/test_log_command_error0/home/.config/pip/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'site', will try loading '/usr/pip.conf'
DEBUG    pip._internal.cli.parser:parser.py:191 Ignoring configuration key ':env:.use-feature' as it's value is empty.
DEBUG    pip._internal.cli.parser:parser.py:191 Ignoring configuration key ':env:.use-deprecated' as it's value is empty.
_________________________ test_log_file_command_error __________________________

fixed_time = None
tmpdir = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_log_file_command_error0')

    def test_log_file_command_error(fixed_time: None, tmpdir: Path) -> None:
        """Test the --log-file option logs (when there's an error)."""
        cmd = FakeCommand(error=True)
        log_file_path = os.path.join(tmpdir, "log_file")
        cmd.main(["fake", "--log-file", log_file_path])
        with open(log_file_path) as f:
>           assert f.read().startswith("2019-01-17T06:00:37,040 fake")
E           assert False
E            +  where False = <built-in method startswith of str object at 0x561ebe1542c0>('2019-01-17T06:00:37,040 fake')
E            +    where <built-in method startswith of str object at 0x561ebe1542c0> = '2024-05-10T08:42:16,518 fake\n2024-05-10T08:42:16,518 ERROR: Exception:\n2024-05-10T08:42:16,518 Traceback (most rece...nd.py", line 33, in run_func\n2024-05-10T08:42:16,518     raise SystemExit(1)\n2024-05-10T08:42:16,518 SystemExit: 1\n'.startswith
E            +      where '2024-05-10T08:42:16,518 fake\n2024-05-10T08:42:16,518 ERROR: Exception:\n2024-05-10T08:42:16,518 Traceback (most rece...nd.py", line 33, in run_func\n2024-05-10T08:42:16,518     raise SystemExit(1)\n2024-05-10T08:42:16,518 SystemExit: 1\n' = <built-in method read of _io.TextIOWrapper object at 0x7f1b3e63de00>()
E            +        where <built-in method read of _io.TextIOWrapper object at 0x7f1b3e63de00> = <_io.TextIOWrapper name='/tmp/pytest-of-mockbuild/pytest-0/test_log_file_command_error0/log_file' mode='r' encoding='UTF-8'>.read

tests/unit/test_base_command.py:130: AssertionError
----------------------------- Captured stdout call -----------------------------
fake
----------------------------- Captured stderr call -----------------------------
ERROR: Exception:
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-pip-24.0-2.fc41.x86_64/usr/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/builddir/build/BUILD/pip-24.0/tests/unit/test_base_command.py", line 46, in run
    return self.run_func()
           ~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/pip-24.0/tests/unit/test_base_command.py", line 33, in run_func
    raise SystemExit(1)
SystemExit: 1
------------------------------ Captured log call -------------------------------
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'global', will try loading '/tmp/pytest-of-mockbuild/pytest-0/test_log_file_command_error0/fake-root/etc/xdg/pip/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'global', will try loading '/etc/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'user', will try loading '/tmp/pytest-of-mockbuild/pytest-0/test_log_file_command_error0/home/.pip/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'user', will try loading '/tmp/pytest-of-mockbuild/pytest-0/test_log_file_command_error0/home/.config/pip/pip.conf'
VERBOSE  pip._internal.configuration:_log.py:23 For variant 'site', will try loading '/usr/pip.conf'
DEBUG    pip._internal.cli.parser:parser.py:191 Ignoring configuration key ':env:.use-feature' as it's value is empty.
DEBUG    pip._internal.cli.parser:parser.py:191 Ignoring configuration key ':env:.use-deprecated' as it's value is empty.
=========================== short test summary info ============================
FAILED tests/unit/test_base_command.py::test_log_command_success - AssertionError: assert '2024-05-10T08:42:16,462 fake' == '2019-01-17T06:00:...
FAILED tests/unit/test_base_command.py::test_log_command_error - assert False
FAILED tests/unit/test_base_command.py::test_log_file_command_error - assert False
= 3 failed, 1498 passed, 21 skipped, 1015 deselected, 8 xfailed, 38 warnings in 32.00s =

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

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07434121-python-pip/

For all our attempts to build python-pip with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-pip/

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.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
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 Miro Hrončok 2024-05-28 12:47:25 UTC
Fixed in distgit.


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