Bug 2294769 - python-django fails tests with Python 3.13.0b3
Summary: python-django fails tests with Python 3.13.0b3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-django
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F41FTBFS PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-06-29 09:57 UTC by Miro Hrončok
Modified: 2024-07-10 17:02 UTC (History)
7 users (show)

Fixed In Version: python-django-4.2.14-2.fc41
Clone Of:
Environment:
Last Closed: 2024-07-10 17:02:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2024-06-29 09:57:46 UTC
From python-django-4.2.11-4.fc41 https://koji.fedoraproject.org/koji/taskinfo?taskID=119766912

======================================================================
ERROR: test_send_unicode (mail.tests.LocmemBackendTests.test_send_unicode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/tests/mail/tests.py", line 1229, in test_send_unicode
    message = self.get_the_message()
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/tests/mail/tests.py", line 1207, in get_the_message
    % (len(mailbox), [m.as_string() for m in mailbox]),
                      ~~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/django/core/mail/message.py", line 133, in as_string
    g.flatten(self, unixfrom=unixfrom, linesep=linesep)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 115, in flatten
    self._write(msg)
    ~~~~~~~~~~~^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 180, in _write
    self._dispatch(msg)
    ~~~~~~~~~~~~~~^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 217, in _dispatch
    meth(msg)
    ~~~~^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 246, in _handle_text
    msg.set_payload(msg._payload, charset)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/django/core/mail/message.py", line 168, in set_payload
    has_long_lines = any(
        len(line.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
        for line in payload.splitlines()
    )
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/django/core/mail/message.py", line 169, in <genexpr>
    len(line.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
        ~~~~~~~~~~~^^
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 12-13: surrogates not allowed
======================================================================
ERROR: test_dont_base64_encode (mail.tests.MailTests.test_dont_base64_encode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/tests/mail/tests.py", line 902, in test_dont_base64_encode
    s = msg.message().as_string()
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/django/core/mail/message.py", line 133, in as_string
    g.flatten(self, unixfrom=unixfrom, linesep=linesep)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 115, in flatten
    self._write(msg)
    ~~~~~~~~~~~^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 180, in _write
    self._dispatch(msg)
    ~~~~~~~~~~~~~~^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 217, in _dispatch
    meth(msg)
    ~~~~^^^^^
  File "/usr/lib64/python3.13/email/generator.py", line 246, in _handle_text
    msg.set_payload(msg._payload, charset)
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/django/core/mail/message.py", line 168, in set_payload
    has_long_lines = any(
        len(line.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
        for line in payload.splitlines()
    )
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/django/core/mail/message.py", line 169, in <genexpr>
    len(line.encode()) > RFC5322_EMAIL_LINE_LENGTH_LIMIT
        ~~~~~~~~~~~^^
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 28-33: surrogates not allowed
======================================================================
FAIL: test_help_default_options_with_custom_arguments (admin_scripts.tests.CommandTypes.test_help_default_options_with_custom_arguments)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/tests/admin_scripts/tests.py", line 1903, in test_help_default_options_with_custom_arguments
    self.assertOutput(out, "--option_a OPTION_A, -a OPTION_A")
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-django-4.2.11-build/Django-4.2.11/tests/admin_scripts/tests.py", line 182, in assertOutput
    self.assertIn(
    ~~~~~~~~~~~~~^
        msg,
        ^^^^
        stream,
        ^^^^^^^
        "'%s' does not match actual output text '%s'" % (msg, stream),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: '--option_a OPTION_A, -a OPTION_A' not found in 'usage: manage.py base_command [-h] [--option_a OPTION_A] [--option_b OPTION_B]\n                              [--option_c OPTION_C] [--version] [-v {0,1,2,3}]\n                              [--settings SETTINGS] [--pythonpath PYTHONPATH]\n                              [--traceback] [--no-color] [--force-color]\n                              [args ...]\n\nTest basic commands\n\npositional arguments:\n  args\n\noptions:\n  -h, --help            show this help message and exit\n  --option_a, -a OPTION_A\n  --option_b, -b OPTION_B\n  --option_c, -c OPTION_C\n  --version             Show program\'s version number and exit.\n  -v, --verbosity {0,1,2,3}\n                        Verbosity level; 0=minimal output, 1=normal output,\n                        2=verbose output, 3=very verbose output\n  --settings SETTINGS   The Python path to a settings module, e.g.\n                        "myproject.settings.main". If this isn\'t provided, the\n                        DJANGO_SETTINGS_MODULE environment variable will be\n                        used.\n  --pythonpath PYTHONPATH\n                        A directory to add to the Python path, e.g.\n                        "/home/djangoprojects/myproject".\n  --traceback           Raise on CommandError exceptions.\n  --no-color            Don\'t colorize the command output.\n  --force-color         Force colorization of the command output.\n' : '--option_a OPTION_A, -a OPTION_A' does not match actual output text 'usage: manage.py base_command [-h] [--option_a OPTION_A] [--option_b OPTION_B]
                              [--option_c OPTION_C] [--version] [-v {0,1,2,3}]
                              [--settings SETTINGS] [--pythonpath PYTHONPATH]
                              [--traceback] [--no-color] [--force-color]
                              [args ...]
Test basic commands
positional arguments:
  args
options:
  -h, --help            show this help message and exit
  --option_a, -a OPTION_A
  --option_b, -b OPTION_B
  --option_c, -c OPTION_C
  --version             Show program's version number and exit.
  -v, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
'
----------------------------------------------------------------------
Ran 16333 tests in 397.506s
FAILED (failures=1, errors=2, skipped=1321, expected failures=5)

Comment 1 Fedora Update System 2024-07-10 16:59:44 UTC
FEDORA-2024-dbdb4423d1 (python-django-4.2.14-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-dbdb4423d1

Comment 2 Fedora Update System 2024-07-10 17:02:29 UTC
FEDORA-2024-dbdb4423d1 (python-django-4.2.14-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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