[issue22581] Other mentions of the buffer protocol
Serhiy Storchaka added the comment: Could anyone please look at the patch? I touches only docs and comments. -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg231643 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Serhiy Storchaka added the comment: Could anyone please look at the patch? It touches only docs and comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20899] Nested namespace imports do not work inside zip archives
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20899 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20002] Cleanup and microoptimize pathlib
Serhiy Storchaka added the comment: If you are not interested in any of proposed changes Antoine, this issue can be closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20002] Cleanup and microoptimize pathlib
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20002] Cleanup and microoptimize pathlib
Antoine Pitrou added the comment: Not really, sorry. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Serhiy Storchaka added the comment: Ping. -- assignee: - serhiy.storchaka keywords: +needs review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22798] time.mktime doesn't update time.tzname
Akira Li added the comment: One of the ways to fix this issue is to synchronize time.tzname attribute with the corresponding C tzname variable. I've uploaded sync-time-timezone-attr-with-c.diff patch that synchronizes tzname, timezone, altzone, daylight attributes. The patch also includes tests. No docs changes are necessary. The code follows C, POSIX standards and the time module documentation. Any differences are unintetional. The patch also fixes wrong time.timezone issue http://bugs.python.org/issue22799 The patch doesn't use tm_gmtoff, tm_zone C values from jan, jul to set timezone, tzname time module attributes therefore it may break software that relies on that behaviour. I would be interested to hear about such instances. I've removed the cygwin branch in the code (I haven't found cygwin buildbot). It could be added back as is if necessary. -- Added file: http://bugs.python.org/file37273/sync-time-timezone-attr-with-c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22798 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22798] time.mktime doesn't update time.tzname
Changes by Akira Li 4kir4...@gmail.com: Removed file: http://bugs.python.org/file37132/test_mktime_changes_tzname.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22798 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Amaury Forgeot d'Arc added the comment: The patch looks good to me. But it seems that the reverse operation is not possible in the general case: .decode('unicode_escape') assumes a latin-1 or ascii encoding. Should we document this? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Marc-Andre Lemburg added the comment: The patch looks good. One nit: the name buffer length should be NAME_MAXLEN instead of 100. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
New submission from Clement Rouault: I found an interger overflow in the standard iterator object (Objects/iterobject.c) The `it_index` attribute used by the iterator is a `Py_ssize_t` but overflow is never checked. So after the index `PY_SSIZE_T_MAX`, the iterator object will ask for the index `PY_SSIZE_T_MIN`. Here is an example: import sys class Seq: def __getitem__(self, item): print([-] Asked for item at {0}.format(item)) return 0 s = Seq() i = iter(s) # Manually set `it_index` to PY_SSIZE_T_MAX without a loop i.__setstate__(sys.maxsize) next(i) [-] Asked for item at 9223372036854775807 next(i) [-] Asked for item at -9223372036854775808 I would be really interested in writing a patch but first I wanted to discuss the expected behaviour and fix. The iterator could stop after `PY_SSIZE_T_MAX` but it seems strange as other iterator (like `enumobject`) handle values bigger than `PY_SSIZE_T_MAX`. Or the same technique used in `enumobject` could be used: adding a field `PyObject* en_longindex` (a python long) which would be used for values bigger than `PY_SSIZE_T_MAX` -- components: Interpreter Core messages: 231651 nosy: hakril priority: normal severity: normal status: open title: integer overflow in iterator object type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Nick Coghlan added the comment: Patch looks good to me, too. As far as Amaury's question goes, isn't the general reverse operation the same as for the existing backslashreplace handler? That is, decode with the appropriate ASCII compatible encoding (since ASCII compatibility is needed for the escape sequences to be valid), then run the result through ast.literal_eval? (I'll grant we don't currently provide guidance on reversing backslashreplace either, but addressing that sounds like a separate question from this change) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20002] Cleanup and microoptimize pathlib
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - rejected stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20002 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Roundup Robot added the comment: New changeset 32d08aacffe0 by Serhiy Storchaka in branch 'default': Issue #19676: Added the namereplace error handler. https://hg.python.org/cpython/rev/32d08aacffe0 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Serhiy Storchaka added the comment: Thank you all for reviews. One nit: the name buffer length should be NAME_MAXLEN instead of 100. NAME_MAXLEN is private name available only in Modules/unicodedata.c. Making it public name would be other issue. I have increased buffer size to 256. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22286] Allow backslashreplace error handler to be used on input
Serhiy Storchaka added the comment: Synchronized with the tip (resolved conflicts with issue22470 and issue19676). -- assignee: - serhiy.storchaka keywords: +needs review Added file: http://bugs.python.org/file37274/backslashreplace_decode_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22286 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19105] pprint doesn't use all width
Serhiy Storchaka added the comment: Could anyone please make a review? -- keywords: +needs review versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19105 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18965] 2to3 can produce illegal bytes literals
Serhiy Storchaka added the comment: Now Python 2 with the -3 option warns about b-prefixed strings with non-ASCII characters (issue19656). -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18965 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +rhettinger, serhiy.storchaka stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22638] ssl module: the SSLv3 protocol is vulnerable (POODLE attack)
Robert Kuska added the comment: FYI fedora (rawhide) has SSLv3 disabled in SSLv23 method of openssl package. http://pkgs.fedoraproject.org/cgit/openssl.git/commit/?id=80b5477597e9f0d9fababd854adfb4988b37efd5 This looks like the same approach as in attached issue22638.diff. -- nosy: +rkuska ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22638 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
R. David Murray added the comment: For possibly relevant background information, see issue 21444 and the issues linked from it, and issue 14794. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
STINNER Victor added the comment: The `it_index` attribute used by the iterator is a `Py_ssize_t` but overflow is never checked. Yes it is a bug. iter_iternext() must raises an OverflowError if it-it_index is equal to PY_SSIZE_T_MAX. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22940] readline does not offer partial saves
New submission from bru: The readline module offers write_history_file from readline/history.h write_history, but there's no append_history_file that would invoke append_history from the C header. This causes inconveniences when saving history to a file (like shown there: https://docs.python.org/3.5/library/readline.html?highlight=readline#example). Indeed, say you have 2 interpreters (A) and (B) open. - (A) and (B) load the history, composed of (z) lines - you work on both, writing (a) lines in (A) and (b) lines in (b) - you close (A), the history file now has (z)+(a) - you close (B), the history file now has (z)+(b) Therefore (A) history (the (a) lines) is lost. Offering append_history_file would be a nice way to fix this problem: having (z)+(a)+(b) in the end would be easy. This is exactly what the attached patch does. With it are tests, doc and an example. I've not updated Misc/NEWS yet though (no issue #). -- components: Library (Lib) files: 0001-Add-readline.append_history_file-function.patch keywords: patch messages: 231661 nosy: bru priority: normal severity: normal status: open title: readline does not offer partial saves type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file37275/0001-Add-readline.append_history_file-function.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22940 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22841] Avoid to use coroutine with add_signal_handler()
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22841 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
STINNER Victor added the comment: Here is a patch with a simple unit test. Can someone review it? If not, I will commit it without review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20899] Nested namespace imports do not work inside zip archives
Changes by Brett Cannon br...@python.org: -- nosy: +gregory.p.smith, twouters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20899 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
R. David Murray added the comment: There's no review link. And no obvious reason why there isn't. Could you try regenerating the patch and uploading it again? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
Serhiy Storchaka added the comment: I think OverflowError is good for maintained releases, but for 3.5 Clement's idea with long index looks attractive to me. In any case an exception should be raised for negative argument in __setstate__(). Let split this issue on two parts. First fix the bug by raising exceptions, and then add long index (if anyone will need it). -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Serhiy Storchaka added the comment: Regenerated for review. I don't know why Rietweld didn't like previous patch. -- Added file: http://bugs.python.org/file37276/bytes_like.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
Guido van Rossum added the comment: Sorry, looks good. On Tue, Nov 25, 2014 at 6:37 AM, STINNER Victor rep...@bugs.python.org wrote: STINNER Victor added the comment: Here is a patch with a simple unit test. Can someone review it? If not, I will commit it without review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
Roundup Robot added the comment: New changeset f75d40c02f0a by Victor Stinner in branch '3.4': Closes #22685, asyncio: Set the transport of stdout and stderr StreamReader https://hg.python.org/cpython/rev/f75d40c02f0a New changeset 7da2288183d1 by Victor Stinner in branch 'default': (Merge 3.4) Closes #22685, asyncio: Set the transport of stdout and stderr https://hg.python.org/cpython/rev/7da2288183d1 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
STINNER Victor added the comment: Fix also pushed to Python 3.4, 3.5 and to Tulip. Thanks for the report wabu. Tulip commit: changeset: 1350:c3a9d355eb34 user:Victor Stinner victor.stin...@gmail.com date:Tue Nov 25 17:17:13 2014 +0100 files: asyncio/subprocess.py tests/test_subprocess.py description: Python issue #22685: Set the transport of stdout and stderr StreamReader objects in the SubprocessStreamProtocol. It allows to pause the transport to not buffer too much stdout or stderr data. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22941] IPv4Interface arithmetic changes subnet mask
New submission from Søren Løvborg: Addition and subtraction of integers are documented for ipaddress.IPv4Address and ipaddress.IPv6Address, but also work for IPv4Interface and IPv6Interface (though the only documentation of this is a brief mention that the Interface classes inherit from the respective Address classes). That's good. The problem is that adding/subtracting an integer to an Interface object changes the subnet mask (to max_prefixlen), something which is 1) not documented and 2) not the least surprising result. import ipaddress ipaddress.IPv4Interface('10.0.0.1/8') + 1 IPv4Interface('10.0.0.2/32') ipaddress.IPv6Interface('fd00::1/64') + 1 IPv6Interface('fd00::2/128') Changing this breaks backwards compatibility; though since the ipaddress module was provisional until recently and the behavior is undocumented, I hope it's not too late to change. -- components: Library (Lib) messages: 231670 nosy: kwi.dk priority: normal severity: normal status: open title: IPv4Interface arithmetic changes subnet mask type: behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22941 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
STINNER Victor added the comment: I think OverflowError is good for maintained releases, but for 3.5 Clement's idea with long index looks attractive to me. What is your use case? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22941] IPv4Interface arithmetic changes subnet mask
Søren Løvborg added the comment: Proposed implementation patch attached. If this has any interest, I'll look into expanding the patch to include documentation and unit tests. Resulting behavior: import ipaddress ipaddress.IPv4Interface('10.0.0.1/8') + 1 IPv4Interface('10.0.0.2/8') ipaddress.IPv6Interface('fd00::1/64') + 1 IPv6Interface('fd00::2/64') -- keywords: +patch Added file: http://bugs.python.org/file37277/ipaddress.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22941 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19676] Add the namereplace error handler
Roundup Robot added the comment: New changeset b6fab008d63a by Berker Peksag in branch 'default': Issue #19676: Tweak documentation a bit. https://hg.python.org/cpython/rev/b6fab008d63a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19676 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22941] IPv4Interface arithmetic changes subnet mask
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +ncoghlan, pmoody ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22941 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22524] PEP 471 implementation: os.scandir() directory scanning function
Miki Tebeka added the comment: Can we also update iglob [1] as well? [1] https://docs.python.org/2/library/glob.html#glob.iglob -- nosy: +tebeka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20204] pydocs fails for some C implemented classes
Serhiy Storchaka added the comment: The problem not in pydoc or inspect itself. In Python 3.3 _tkinter.TkappType has the __module__ attribute: import _tkinter _tkinter.TkappType.__module__ 'builtins' Something was changed in 3.4 and builtin classes without dot in qualified name no longer have the __module__ attribute. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20204 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Chris Angelico added the comment: Known issues with the current patch, if anyone feels like playing with this who better knows the code: 1) Needs a __future__ directive to control behaviour 2) test_generators needs to be heavily reworked 3) The test of what exception was thrown needs to also handle StopIteration subclasses 4) Check for refleaks and/or over-freeing 5) Properly provide a traceback for the original StopIteration (not always happening) Any others? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22939] integer overflow in iterator object
Serhiy Storchaka added the comment: What is your use case? Something like range(). I agree that it is very unlike to encounter this problem in real work, and we can live with implementation-related limitation (for which OverflowError exists). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22939 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22524] PEP 471 implementation: os.scandir() directory scanning function
Akira Li added the comment: scandir is slower on my machine: $ git clone https://github.com/benhoyt/scandir $ cd scandir/ $ ../cpython/python benchmark.py /usr/ Using slower ctypes version of scandir Comparing against builtin version of os.walk() Priming the system's cache... Benchmarking walks on /usr/, repeat 1/3... Benchmarking walks on /usr/, repeat 2/3... Benchmarking walks on /usr/, repeat 3/3... os.walk took 7.761s, scandir.walk took 10.420s -- 0.7x as fast What commands should I run to benchmark the attached patch (scandir-2.patch)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
wabu added the comment: thanks for the fixes 'n' integration -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22518] integer overflow in encoding unicode
Serhiy Storchaka added the comment: Do you want to add a bigmem test or close this issue Benjamin? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22942] Language Reference - optional comma
New submission from Jordan: # I would like to report three bugs in the # Language Reference Python 3.4.2 # # bug 1: Typo in parameter_list # # # In 8.6 the rule for parameter_list should be corrected: The first | should be ( # parameter_list ::= (defparameter ,)* # | * [parameter] (, defparameter)* [, ** parameter] # | ** parameter # | defparameter [,] ) # This rule was correct in 3.3 but has been changed with issue #21439, I guess. ### # bug 2: print(*(1,2),) is allowed according to the syntax - but not accepted # ### # In 6.3.4: # call ::= primary ( [argument_list [,] | comprehension] ) # argument_list::= positional_arguments [, keyword_arguments] # [, * expression] [, keyword_arguments] # [, ** expression] # | keyword_arguments [, * expression] # [, keyword_arguments] [, ** expression] # | * expression [, keyword_arguments] [, ** expression] # | ** expression # Why is this wrong? print(1,2,) # is allowed print(*(1,2)) # is allowed #print(*(1,2),) # is allowed according to the syntax - but not accepted # I guess the trailing comma is only allowed when there is no *-argument # as it is in the rule for parameter_list ### # bug 3: decorator rule allows (aditional) trailing comma # ### # In 8.6: # decorator ::= @ dotted_name [( [parameter_list [,]] )] NEWLINE # parameter_list ::= (defparameter ,)* # ( * [parameter] (, defparameter)* [, ** parameter] # | ** parameter # | defparameter [,] ) # Why is this wrong? def klammer(klammer_left,klammer_right): def klammer_decorator(func): def func_wrapper(name): return klammer_left + func(name) + klammer_right return func_wrapper return klammer_decorator @klammer(,,) # is allowed #@klammer(,,,) # is allowed according to the syntax - but is not accepted def get_text(name): return Hallo + name print(get_text(Uli)) @klammer(*(,)) # is allowed #@klammer(*(,),) # is allowed according to the syntax - but is not accepted def get_text(name): return Hallo + name print(get_text(Uli)) # I guess the decorator rule might be changed to: # decorator ::= @ dotted_name [( [parameter_list ] )] NEWLINE # The other appearences of parameter_list have no optional comma. -- assignee: docs@python components: Documentation messages: 231680 nosy: docs@python, jordan priority: normal severity: normal status: open title: Language Reference - optional comma type: enhancement versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22942 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22942] Language Reference - optional comma
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22942 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22518] integer overflow in encoding unicode
Benjamin Peterson added the comment: I wouldn't object if you had a patch. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22524] PEP 471 implementation: os.scandir() directory scanning function
STINNER Victor added the comment: scandir is slower on my machine: Please share more information about your config: OS, disk type (hard drive, SSD, something else), filesystem, etc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22898] segfault during shutdown attempting to log ResourceWarning
Xavier de Gaye added the comment: The attached script raises the PyExc_RecursionErrorInst singleton and reproduces the issue. The attached patch fixes the issue by ignoring the warning when clearing PyExc_RecursionErrorInst and clearing the frames associated with its traceback, in _PyExc_Fini(). -- nosy: +xdegaye Added file: http://bugs.python.org/file37278/runtimerror_singleton_2.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22898] segfault during shutdown attempting to log ResourceWarning
Changes by Xavier de Gaye xdeg...@gmail.com: Added file: http://bugs.python.org/file37279/warn_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22524] PEP 471 implementation: os.scandir() directory scanning function
Ben Hoyt added the comment: Akira, note the Using slower ctypes version of scandir -- this is the older, ctypes implementation of scandir. On Linux, depending on file system etc, that can often be slower. You need to at least be using the fast C version in _scandir.c, which is then half C, half Python. But ideally you'd use the all-C version that I've provided as a CPython 3.5 patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
STINNER Victor added the comment: You can workaround the issue by setting manually the transport on the StreamReader objects. Tell me if you need help to write the workaround if you cannot wait for a release containing the fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22898] segfault during shutdown attempting to log ResourceWarning
STINNER Victor added the comment: +/* during Python finalization, warnings may be emited after interp-sysdict + is cleared: see issue #22898 */ I would prefer to see this comment in the else block. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22898 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22943] bsddb: test_queue fails on Windows
New submission from Benjamin Peterson: One gets this on the Windows bots: == FAIL: test01_basic (bsddb.test.test_queue.SimpleQueueTestCase) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\bsddb\test\test_queue.py, line 49, in test01_basic self.assertEqual(len(d), len(string.letters)+3) AssertionError: 125 != 128 == FAIL: test02_basicPost32 (bsddb.test.test_queue.SimpleQueueTestCase) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\2.7.bolen-windows7\build\lib\bsddb\test\test_queue.py, line 120, in test02_basicPost32 self.assertEqual(len(d), len(string.letters)+3) AssertionError: 125 != 128 -- (See http://buildbot.python.org/all/builders/x86%20Windows7%202.7/builds/2925/steps/test/logs/stdio) This has been going on for a long time. I doubt anyone cares. I'm just going to disable the test. -- components: Extension Modules messages: 231687 nosy: benjamin.peterson priority: normal severity: normal stage: needs patch status: open title: bsddb: test_queue fails on Windows type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22943] bsddb: test_queue fails on Windows
Roundup Robot added the comment: New changeset e5ed983bc784 by Benjamin Peterson in branch '2.7': disable tests that always fail on windows (#22943) https://hg.python.org/cpython/rev/e5ed983bc784 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22943 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22944] Python argument tuple unpacking
New submission from Simon Zack: Python already has tuple unpacking in many places, I wonder if this has been considered for arguments yet, it seems rather convenient and a natural extension to me. Here's what I mean: def func((a, b, c)): print(a, b, c) func((1, 2, 3)) should print 1 2 3 -- components: Interpreter Core messages: 231689 nosy: simonzack priority: normal severity: normal status: open title: Python argument tuple unpacking ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22944] Python argument tuple unpacking
Benjamin Peterson added the comment: Python 2 has it. It was removed in Python 3. See https://www.python.org/dev/peps/pep-3113/ -- nosy: +benjamin.peterson resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22944 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
Changes by koobs koobs.free...@gmail.com: Added file: http://bugs.python.org/file37281/koobs-freebsd10-python34-build-598.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell
koobs added the comment: Buildbot failures observed on koobs-freebsd9 and koobs-freebsd10 for 3.x and 3.4, respectively. Both logs are attached, inlined failure below: == FAIL: test_pause_reading (test.test_asyncio.test_subprocess.SubprocessSafeWatcherTests) -- Traceback (most recent call last): File /usr/home/buildbot/python/3.4.koobs-freebsd10/build/Lib/test/test_asyncio/test_subprocess.py, line 194, in test_pause_reading self.assertTrue(called) AssertionError: False is not true == -- nosy: +koobs status: closed - open Added file: http://bugs.python.org/file37280/koobs-freebsd9-python3x-build-2405.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22685 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22945] Ctypes inconsistent between Linux and OS X
Changes by Daniel Standage daniel.stand...@gmail.com: -- hgrepos: -281 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22945] Ctypes inconsistent between Linux and OS X
New submission from Daniel Standage: The ctypes documentation describes the '._as_parameter_' attribute, which simplifies using Python objects to encapsulate C objects. If a ctypes object with the '._as_parameter_' attribute defined is passed as a parameter to a C function, the value of '._as_parameter_' is supplied to the C function instead of a pointer to the Python project. At least that's how it's advertised to work. And it does indeed work as advertised on Linux, but on Mac OS X the mechanism doesn't appear to work correctly. I have created a small dummy example demonstrating this at https://github.com/standage/ctypes-demo. -- components: ctypes hgrepos: 281 messages: 231692 nosy: Daniel.Standage priority: normal severity: normal status: open title: Ctypes inconsistent between Linux and OS X type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22945] Ctypes inconsistent between Linux and OS X
Ned Deily added the comment: FWIW, your test does seem to run if the C test program is instead built in 32-bit mode (modifying CFLAGS to include -arch i386). For example, with the Apple OS X 10.10 system Python: DYLD_LIBRARY_PATH=.. arch -i386 /usr/bin/python2.7 test.py Gizmo 1: 15 Gizmo 2: 20 Empty data -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge, ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22945 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22804] Can't run Idle in Windows 8 or windows 64
Vandana Rao added the comment: Try uninstalling IDLE and install it once again.I had this situation previously where the command prompt opens and gets closed within fraction of seconds. Uninstall it completely and try once again.I hope this would work. -- nosy: +Vandana.Rao ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22804 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20204] pydocs fails for some C implemented classes
Serhiy Storchaka added the comment: _tkinter.TkappType.__flags__ is different. In 3.3: 0b101 In 3.4: 0b1010010 The difference is Py_TPFLAGS_HEAPTYPE. This is the consequence of the change made in issue15721. -- components: +Interpreter Core, Tkinter nosy: +Robin.Schreiber, amaury.forgeotdarc, asvetlov, loewis, ned.deily, pitrou versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20204 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15721] PEP 3121, 384 Refactoring applied to tkinter module
Serhiy Storchaka added the comment: _tkinter classes are now heap types and they no longer have the __module__ attribute. import _tkinter _tkinter.TkappType.__module__ Traceback (most recent call last): File stdin, line 1, in module AttributeError: __module__ See issue20204. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15721 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com