[issue22032] Use __qualname__ together with __module__

2015-09-24 Thread STINNER Victor
STINNER Victor added the comment: Barry, Robert: I'm sorry that the change broke tests, but tests should not rely on the exact representation. They can test type(obj).__name__ for example. Barry: "people should be aware that this can break doctests" Some years ago, I was a big fan of doctest.

[issue22032] Use __qualname__ together with __module__

2015-09-24 Thread STINNER Victor
STINNER Victor added the comment: Oh by the way, this issue is closed, what do you expect Barry and Robert? If you consider that it's a bug, please open a new issue and describe what you want :-) -- ___ Python tracker

[issue22032] Use __qualname__ together with __module__

2015-09-24 Thread Robert Kuska
Robert Kuska added the comment: FYI This also broke nosetests tests which relies on exact output. https://github.com/nose-devs/nose/issues/928 -- nosy: +rkuska ___ Python tracker

[issue22032] Use __qualname__ together with __module__

2015-09-24 Thread STINNER Victor
STINNER Victor added the comment: Ok, anyway, thanks for your feedback. -- ___ Python tracker ___ ___

[issue22032] Use __qualname__ together with __module__

2015-09-24 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm not expecting a change either, I was also just documenting observed breakages. Given that I've ported a *ton* of code to 3.5 and only seen a handful of failures related to this issue, I agree that it's better just to provide information and let packages

[issue22032] Use __qualname__ together with __module__

2015-06-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: FWIW, this broke the zope.testing doctests: https://bugs.launchpad.net/zope.testing/+bug/1467644 I submitted a patch, which was reasonable given the normalization that zope.testing does for doctest output, but people should be aware that this can break

[issue22032] Use __qualname__ together with __module__

2014-07-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Often when class name is reported in stdlib (e.g. in reprs), it used together with module name: '%s.%s' % (self.__class__.__module__, self.__class__.__name__). But this code is wrong when a class is nested. The __qualname__ attribute should be used

[issue22032] Use __qualname__ together with __module__

2014-07-22 Thread STINNER Victor
STINNER Victor added the comment: The patch looks good to me. For Python 3.4, may it break the backward compatibility? For example, breaking doctests relying on the exact representation? If there is a risk, it's maybe safer to only modify Python 3.5. -- nosy: +haypo

[issue22032] Use __qualname__ together with __module__

2014-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It broke Python tests (test_traceback and test_unittest), and the patch contains fixes for this. Yes, it can break user test if they test nested subclasses of classes touched by this patch. This is not very likely, but on other hand I don't see what can

[issue22032] Use __qualname__ together with __module__

2014-07-22 Thread STINNER Victor
STINNER Victor added the comment: If an application relies on the exact representation in an unit test, it would be annoying to check the minor Python version to support the old and the new format. Using the qualified name is better, but it can wait Python 3.5 IMO. They are enough complains

[issue22032] Use __qualname__ together with __module__

2014-07-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset fe3c98313855 by Serhiy Storchaka in branch 'default': Issue #22032: __qualname__ instead of __name__ is now always used to format http://hg.python.org/cpython/rev/fe3c98313855 -- nosy: +python-dev ___

[issue22032] Use __qualname__ together with __module__

2014-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with you. Thank for your review Victor. All these issues are precursors to issue22033. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python