Following commits contain the fixes on django's side:
c2bc1cefdcbbf074408f4a4cace88b315cf9d652
a0175724b086127a4e13612042961d3ba88d6bd9
e89c3a46035e9fe17c373a6c9cd63b9fd631d596
--
Ticket URL: <https://code.djangoproject.com/ticket/24903>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> In https://bugs.python.org/issue24134 python changed the behaviour of
> `assertRaises` that breaks django's `assertRaisesMessage`.
> Unfortunately this bug is not fixed in python's 2.7.10 release, so I
> think the fixes on django's side should be backported at least to 1.8
> because right now it's not possible to use `assertRaisesMessage` as
> context manager with 2.7.10.
>
> Following commits contain the fixes on django's side:
> c2bc1cefdcbbf074408f4a4cace88b315cf9d652
> a0175724b086127a4e13612042961d3ba88d6bd9
> e89c3a46035e9fe17c373a6c9cd63b9fd631d596
New description:
In https://bugs.python.org/issue24134 cpython changed the behaviour of
`assertRaises` that breaks django's `assertRaisesMessage`.
Unfortunately this bug is not fixed in cpython's 2.7.10 release, so I
think the fixes on django's side should be backported at least to 1.8
because right now it's not possible to use `assertRaisesMessage` as
context manager with 2.7.10.
Following commits contain the fixes on django's side:
c2bc1cefdcbbf074408f4a4cace88b315cf9d652
a0175724b086127a4e13612042961d3ba88d6bd9
e89c3a46035e9fe17c373a6c9cd63b9fd631d596
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:1>
Comment (by timgraham):
I'm fairly sure that change was reverted in 2.7.10. Are you sure you're
running the final version and not the release candidate? Django's test
suite passes for me on 2.7.10.
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:2>
Comment (by MoritzS):
{{{
$ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
$ tar -xf Python-2.7.10.tar.xz
$ grep -n 'is _sentinel' Python-2.7.10/Lib/unittest/case.py
472: if callableObj is _sentinel:
992: if callable_obj is _sentinel:
}}}
I took it straight from the official download, so I think that's the final
version.
The changes got reverted here:
https://hg.python.org/cpython/rev/0c93868f202e
Unfortunately that got merged into the 2.7 branch just after the 2.7.10
release.
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:3>
* owner: nobody => timgraham
* status: new => assigned
* stage: Unreviewed => Accepted
Comment:
Okay, that's a bit odd. The Windows installer seems to contain the revert
but the gzip tarball doesn't. I'll try to figure out what's going on.
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:4>
* has_patch: 0 => 1
Comment:
From bitdancer in #python-dev regarding merging of fixes to the release
branches of Python:
the way it is supposed to work is that issue like that get marked as
"release blocker" in the tracker, and the release manager makes sure they
are dealt with before cutting the release. Things do slip through the
cracks, though, and once they do the need to go into NEWS.
And as to why the Windows version contains the fix:
things being different between different builds of the release is a bug
in the release process. I'm not sure what happened there.
I'll fix this on 1.8 and 1.7. 1.4 isn't affected.
[https://github.com/django/django/pull/4841 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"8bc18ebf0fc7d82dda266812a1920d179c54223c" 8bc18eb]:
{{{
#!CommitTicketReference repository=""
revision="8bc18ebf0fc7d82dda266812a1920d179c54223c"
[1.8.x] Fixed #24903 -- Fixed assertRaisesMessage on Python 2.7.10.
A regression in Python 2.7.10 rc1 wasn't reverted in the final
release: https://bugs.python.org/issue24134
Backport of two commits from master:
* c2bc1cefdcbbf074408f4a4cace88b315cf9d652
* e89c3a46035e9fe17c373a6c9cd63b9fd631d596
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"207da07d5988dc80439a10810ba28fc1fba42fe3" 207da07]:
{{{
#!CommitTicketReference repository=""
revision="207da07d5988dc80439a10810ba28fc1fba42fe3"
[1.7.x] Fixed #24903 -- Fixed assertRaisesMessage on Python 2.7.10.
A regression found in in Python 2.7.10 rc1 wasn't reverted for the final
release: https://bugs.python.org/issue24134
Backport of two commits from master:
* c2bc1cefdcbbf074408f4a4cace88b315cf9d652
* e89c3a46035e9fe17c373a6c9cd63b9fd631d596
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:7>
Comment (by Tim Graham <timograham@…>):
In [changeset:"90c59db7a3e1c9725ed6e3683ef8beba4eb77333" 90c59db]:
{{{
#!CommitTicketReference repository=""
revision="90c59db7a3e1c9725ed6e3683ef8beba4eb77333"
Forwardported release notes for refs #24903.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:8>
Comment (by bouke):
I ran into this issue with Django 1.4 on Python 2.7.10 as well. Any chance
on merging it into Django 1.4?
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:9>
Comment (by timgraham):
As Django 1.4 will be unsupported in a month and half (October 1), I don't
think it's a priority.
--
Ticket URL: <https://code.djangoproject.com/ticket/24903#comment:10>