[issue25961] Disallow the null character in type name

2015-12-31 Thread Florin Papa
Florin Papa added the comment: Hi all, I fixed a compile error introduced in Python 2.7 by this issue. There is a jump made to an nonexistent label "error" in type_new function in Objects/typeobject.c. Please see the attached patch. Regards, Florin Papa -- nosy: +florin.papa Added

[issue25961] Disallow the null character in type name

2015-12-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 57fea6f75ac2 by Serhiy Storchaka in branch '2.7': Issue #25961: Fixed compilation error and a leak in type constructor. https://hg.python.org/cpython/rev/57fea6f75ac2 -- ___ Python tracker

[issue25961] Disallow the null character in type name

2015-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Florin. How could I miss this? But your patch is not correct. It leads to double free and deallocating using non-initialized pointer. It also contains trailing spaces and incorrect indentation. -- ___

[issue25520] unittest load_tests protocol not working as documented

2015-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Library (Lib) versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___

[issue25704] Update the devguide to 3.5

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: With rst is possible to define replacements once like: .. |current_branch| replace:: 3.6 .. |prev_branch| replace:: 3.5 and use them across the devguide, however I'm afraid this won't work with code blocks. Perhaps a new entry about updating the devguide

[issue19316] devguide: compiler - wording

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: Stéphane, did you forget to attach the patch? -- ___ Python tracker ___ ___

[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: See msg146972 -- AFAIU the padding of %Y is inconsistent for years <1000 (e.g. 0042 vs 42), and this is not documented in the note (2) of https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior Also, using %4Y seems to consistently produce

[issue19006] UnitTest docs should have a single list of assertions

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: Here's a patch. -- assignee: docs@python -> ezio.melotti keywords: +patch stage: -> commit review versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file41462/issue19006.diff

[issue13253] 2to3 fix_renames renames sys.maxint only in imports

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: Nikita, did you manage to find a solution? If not, do you have a patch (even if not complete) to share? -- versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-31 Thread Martin Panter
Martin Panter added the comment: If this patch goes ahead, I think the ABC documentation should clarify which methods are checked for None and which aren’t. The datamodel.rst file will suggest None for any method, but ABC will only support it for Iterable and Hashable (I think). Also, what

[issue1182143] making builtin exceptions more informative

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: I would suggest you to bring this up to python-dev (or perhaps python-ideas?). Also note that Brett proposed something similar in #18162 and other related issues (#18156, #18163, #18165, #18166). -- versions: +Python 3.6 -Python 3.5

[issue18162] Add index attribute to IndexError

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: See also #1182143. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25637] Move non-collections-related ABCs out of collections.abc

2015-12-31 Thread Nick Coghlan
Nick Coghlan added the comment: >From a documentation perspective, I'd suggest breaking the ABC module >documentation at https://docs.python.org/3/library/abc.html into three >subsections: 29.7.1 Defining Abstract Base Classes This would include the existing docs for ABC, ABCMeta,

[issue17756] test_syntax_error fails when run in the installed location

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: I'm going to close this since the reported issue has been fixed. In the test sys.stderr was mocked, and Mock.method_calls simply records the calls done to the mock. Therefore the fact that 'NameError' and ':' were written on sys.stderr on two separate calls to

[issue25439] Add type checks to urllib.request.Request

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: > But maybe I am being too nitpicky and paranoid. Ezio? IIUC your last example used to work because technically it is an iterable of bytes, but the patch would give an error instead. Even in the unlikely case someone is relying on this behavior, simply adding

[issue17006] Add advice on best practices for hashing secrets

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: > People are going to skip warning boxes if they occur too often. I'm not sure I agree. This would be true if they were abused for trivial things ("Warnings: using .pop() on a empty list will return an IndexError!"), but I don't think they are. I think

[issue25461] Unclear language (the word ineffective) in the documentation for os.walk

2015-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: needs patch -> patch review ___ Python tracker ___

[issue18162] Add index attribute to IndexError

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: And PEP 473. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2015-12-31 Thread Ezio Melotti
Ezio Melotti added the comment: If there is consensus about adding this to sys, then the latest patch LGTM (module a couple of unaddressed comments on Rietveld). If not, you should probably bring this up to python-dev. -- ___ Python tracker

[issue25985] Use sys.version_info instead of sys.version

2015-12-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch replaces all occurrences of sys.version[:3] with '%d.%d' % sys.version_info[:2]. The former doesn't work with non-one-digit versions (such as 3.10 and 10.1). -- components: Distutils, Library (Lib) files: use_version_info.patch

[issue25409] fnmatch.fnmatch normalizes slashes/backslashes on Windows

2015-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> docs@python components: +Documentation, Windows keywords: +easy nosy: +docs@python ___ Python tracker

[issue18174] Make regrtest with --huntrleaks check for fd leaks

2015-12-31 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review type: -> enhancement ___ Python tracker ___

[issue25958] Implicit ABCs have no means of "anti-registration"

2015-12-31 Thread Martin Panter
Martin Panter added the comment: I don’t think you need to define __len__() to get an iterable, only __getitem__(). Also, if I understand your problem, Container would also be susceptible in theory, because membership testing via “in” and “not in” falls back to iteration. If you only define