#34118: Python 3.12 compatibility
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Core (Other)         |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Someday/Maybe
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by David Sanders):

 I'm getting errors on the following which was working for 3.11.0

 {{{
 tests main % python --version
 Python 3.11.0
 tests main % ./runtests.py
 queries.tests.Queries1Tests.test_avoid_infinite_loop_on_too_many_subqueries
 Testing against Django installed in
 '/Users/dsanders/projects/django/django' with up to 10 processes
 Found 1 test(s).
 Creating test database for alias 'default'...
 System check identified no issues (1 silenced).
 .
 ----------------------------------------------------------------------
 Ran 1 test in 0.295s

 OK
 Destroying test database for alias 'default'...


 … 8< … switch venvs


 tests main % python --version
 Python 3.12.0a1
 tests main % ./runtests.py
 queries.tests.Queries1Tests.test_avoid_infinite_loop_on_too_many_subqueries
 Testing against Django installed in
 '/Users/dsanders/projects/django/django' with up to 10 processes
 Found 1 test(s).
 Creating test database for alias 'default'...
 System check identified no issues (1 silenced).
 F
 ======================================================================
 FAIL: test_avoid_infinite_loop_on_too_many_subqueries
 (queries.tests.Queries1Tests.test_avoid_infinite_loop_on_too_many_subqueries)
 ----------------------------------------------------------------------
 RecursionError: maximum recursion depth exceeded

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/Users/dsanders/projects/django/tests/queries/tests.py", line 550,
 in test_avoid_infinite_loop_on_too_many_subqueries
     with self.assertRaisesMessage(RecursionError, msg):
   File
 
"/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py",
 line 155, in __exit__
     self.gen.throw(value)
   File "/Users/dsanders/projects/django/django/test/testcases.py", line
 890, in _assert_raises_or_warns_cm
     self.assertIn(expected_message, str(getattr(cm, cm_attr)))
 AssertionError: 'Maximum recursion depth exceeded: too many subqueries.'
 not found in 'maximum recursion depth exceeded'

 ----------------------------------------------------------------------
 Ran 1 test in 0.207s

 FAILED (failures=1)
 Destroying test database for alias 'default'...
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34118#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018412520958-79981346-e77b-4a92-b96c-4c91607ce58a-000000%40eu-central-1.amazonses.com.

Reply via email to