Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Steve D'Aprano wrote: >> I came across this book title: >> >> Täällä Pohjantähden alla (‘Here beneath the North Star’) >> >> http://www.booksfromfinland.fi/1980/12/the-strike/ >> >> which is partly title case, but I'm not sure what rule is being >> applied there. My

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Jussi Piitulainen
Steve D'Aprano writes: > On Tue, 7 Mar 2017 03:28 am, Grant Edwards wrote: >> >> Besides locale-aware, it'll need to be style-guide-aware so that it >> knows whether you want MLA, Chicago, Strunk & White, NYT, Gregg, >> Mrs. Johnson from 9th grade English class, or any of a dozen or two >>

[issue29694] race condition in pathlib mkdir with flags parents=True

2017-03-06 Thread Armin Rigo
Armin Rigo added the comment: A different bug in the same code: if someone creates the directory itself between the two calls to ``self._accessor.mkdir(self, mode)``, then the function will fail with an exception even if ``exist_ok=True``. Attached is a patch that fixes both cases.

[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are there tests for accepting non-integers in other classes? If no then don't bother about tests. I suppose all this came from the implementation of the 'n' format unit in PyArg_Parse* functions. -- ___ Python

[issue25996] Add support of file descriptor in os.scandir()

2017-03-06 Thread Eryk Sun
Eryk Sun added the comment: > There is no similar function taking a directory handle In 3.5+ the CRT has O_OBTAIN_DIR (0x2000) for opening a directory, i.e. to call CreateFile with backup semantics. A directory can be read via GetFileInformationByHandleEx [1] using the information classes

[issue29739] zipfile raises wrong exception for some incorrect passwords

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ZIP file has something like 8-bit control sum for checking the validity of the password. With the chance 1/256 the check is passed for wrong password. This is unavoidable. -- ___ Python tracker

[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Other objects in the io module use special-purposed converter _PyIO_ConvertSsize_t() which checks PyNumber_Check() and calls PyNumber_AsSsize_t(). I think StringIO implementation can be changed to reuse _PyIO_ConvertSsize_t() for simplicity. After that

Re: spam issue

2017-03-06 Thread Greg Couch
On Thursday, March 2, 2017 at 8:08:44 AM UTC-8, Andrew Zyman wrote: > Why is this group have such an obscene number of spam posts ? > I'm subscribed to a few other google groups and this is the only one that has > this issue. If you do use google groups, please "Report abuse" for these messages.

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Mar 7, 2017 at 12:03 PM, Marko Rauhamaa wrote: >> >> As for the UK: >> >>Yhdistynyt kuningaskunta > > About the only part of that that I understand is "kuning" == > king/queen/kingdom. I swear, you like the letter 'y' more than

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Chris Angelico
On Tue, Mar 7, 2017 at 4:18 PM, Steven D'Aprano wrote: > On Tue, 07 Mar 2017 12:18:13 +1100, Chris Angelico wrote: > >> On Tue, Mar 7, 2017 at 12:03 PM, Marko Rauhamaa >> wrote: >>> >>> As for the UK: >>> >>>Yhdistynyt kuningaskunta >> >> About the only

[issue29737] Optimize concatenating empty tuples

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with your comments Raymond, but let me to expose my reasons. An idea of optimizing empty tuple concatenating is inspired by partial(). It concatenates two tuples of arguments and it is common when one of tuple is empty. Current C implementation

[issue29676] C method is not profiled by lsprof

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Steven D'Aprano
On Tue, 07 Mar 2017 12:18:13 +1100, Chris Angelico wrote: > On Tue, Mar 7, 2017 at 12:03 PM, Marko Rauhamaa > wrote: >> >> As for the UK: >> >>Yhdistynyt kuningaskunta > > About the only part of that that I understand is "kuning" == > king/queen/kingdom. I swear, you like

Re: Basic Packaging strategy question

2017-03-06 Thread Steven D'Aprano
On Sat, 04 Mar 2017 15:08:15 -0800, bilmar19 wrote: > I have a simple project that I want to package to put it on another > machine but everything I have read so far about packaging ends up > putting the whole install alongside with 'packages' - typically in > .../site-packages. > This seems a

[issue29680] gdb/libpython.py does not work with gdb 7.2

2017-03-06 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +442 ___ Python tracker ___ ___

[issue28728] test_host_resolution in test_socket fails

2017-03-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-03-06 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +441 ___ Python tracker ___ ___

[issue29744] memmap behavior changed

2017-03-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29739] zipfile raises wrong exception for some incorrect passwords

2017-03-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue28728] test_host_resolution in test_socket fails

2017-03-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +440 ___ Python tracker ___ ___ Python-bugs-list

[issue29737] Optimize concatenating empty tuples

2017-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Is it at all common to concatenate empty tuples? This seems like optimizing something that rarely occurs. Also, the timings can be misleading if in real code these changes cause new branch mispredictions here which can slow the common case. See

Re: Basic Packaging strategy question

2017-03-06 Thread bilmar19
Thanks, It still seems strange to me that such a well documented ecosystem does not have an official way to package a complete app ( vs packages ). Bill -- https://mail.python.org/mailman/listinfo/python-list

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Chris Angelico
On Tue, Mar 7, 2017 at 12:03 PM, Marko Rauhamaa wrote: > > As for the UK: > >Yhdistynyt kuningaskunta About the only part of that that I understand is "kuning" == king/queen/kingdom. I swear, you like the letter 'y' more than the Welsh do... ChrisA --

[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

2017-03-06 Thread Oren Milman
Oren Milman added the comment: I don't have a use case for that. (I noticed this behavior by chance, while working on some other issue.) However, IIUC, commit 4fa88fa0ba35e25ad9be66ebbdaba9aca553dc8b, by Benjamin Peterson, Antoine Pitrou and Amaury Forgeot d'Arc, includes patching the

Re: Export Event log via python in .txt

2017-03-06 Thread eryk sun
On Mon, Mar 6, 2017 at 3:36 PM, wrote: > I'm a student learning about python I would like to know how to export > Security log Application and generate folder path via python please help If you're asking about the Windows event logs, then it'll be easiest from a

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Marko Rauhamaa
Steve D'Aprano : > On Tue, 7 Mar 2017 01:03 am, Marko Rauhamaa wrote: > If you read "title case" as *literally* as being only for titles (of > books, for instance) then of course you are right. Finnish book titles > are normally written in sentence case (initial

[issue29744] memmap behavior changed

2017-03-06 Thread Andrea Giovannucci
Changes by Andrea Giovannucci : -- resolution: -> not a bug ___ Python tracker ___

[issue29745] asyncio: Make pause/resume_reading idepotent and no-op for closed transports

2017-03-06 Thread Nikolay Kim
New submission from Nikolay Kim: https://github.com/python/asyncio/issues/488 -- messages: 289147 nosy: fafhrd91 priority: normal pull_requests: 439 severity: normal status: open title: asyncio: Make pause/resume_reading idepotent and no-op for closed transports versions: Python 3.5,

[issue29744] memmap behavior changed

2017-03-06 Thread Andrea Giovannucci
New submission from Andrea Giovannucci: The previous version 2.7.12 was returning a memmap file when slicing with a list of integers, now it returns an array. This affects the behaviour of several functions in my package. Is that an aware choice or a side product of some other change?

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Steve D'Aprano
On Tue, 7 Mar 2017 01:03 am, Marko Rauhamaa wrote: > Chris Angelico : > >> Right. If you want true title casing, it has to be *extremely* >> linguistically-aware. > > For instance, title case has no meaning in the context of Finnish. In > other words, your internationalized

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim
Changes by Nikolay Kim : -- pull_requests: +438 ___ Python tracker ___ ___

[issue27035] Cannot set exit code in atexit callback

2017-03-06 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: I just bumped into this myself. If this really is only fixable in a major release, there ought to at least be a minor release for the *documentation* to update it to be correct. -- nosy: +glyph ___ Python tracker

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Grant Edwards
On 2017-03-06, Steve D'Aprano wrote: > On Tue, 7 Mar 2017 03:28 am, Grant Edwards wrote: > >> On 2017-03-06, Chris Angelico wrote: >> >>> Still, it's fun to discuss, if only to show why that kind of >>> locale-aware transformation is important. >>

[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

2017-03-06 Thread Martin Panter
Martin Panter added the comment: What is the use case? Unless changing the behaviour would be useful, I think the simplest solution would be to document that the methods should only be given instances of “int”, so that it is clear that other kinds of numbers are unsupported. -- nosy:

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Steve D'Aprano
On Tue, 7 Mar 2017 03:28 am, Grant Edwards wrote: > On 2017-03-06, Chris Angelico wrote: > >> Still, it's fun to discuss, if only to show why that kind of >> locale-aware transformation is important. > > Besides locale-aware, it'll need to be style-guide-aware so that it >

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-03-06 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +437 ___ Python tracker ___

[issue29743] Closing transport during handshake process leaks open socket

2017-03-06 Thread Nikolay Kim
New submission from Nikolay Kim: https://github.com/python/asyncio/issues/487 https://github.com/KeepSafe/aiohttp/issues/1679 -- messages: 289143 nosy: fafhrd91 priority: normal pull_requests: 436 severity: normal status: open title: Closing transport during handshake process leaks open

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Yury Selivanov
Yury Selivanov added the comment: > Thanks for the report and PR, but your fix is not obviously correct. Not for this particular asyncio method though, see asyncio PEP [1]. But there's an actual bug in the PR, instead of returning `None` we should return `default`. [1]

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim
Nikolay Kim added the comment: get_extra_info() returns optional transport information, I think it is ok to return None for closed transport. https://github.com/python/cpython/blob/master/Lib/asyncio/transports.py#L18 I propose this feature initially, during early tulip development but now I

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread R. David Murray
R. David Murray added the comment: Thanks for the report and PR, but your fix is not obviously correct. In general exceptions are the way in Python that errors are reported, and asking for extra_info on a closed stream is an error. The exception raised is not clear, so perhaps the asyncio

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim
Nikolay Kim added the comment: exception on get_extra_info() on closed ssl transport ``` Feb 18 13:18:09 btc electrumx_server.py[1732]: ERROR:ElectrumX:[15328] Traceback (most recent call last): Feb 18 13:18:09 btc electrumx_server.py[1732]: File

[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim
New submission from Nikolay Kim: https://github.com/python/asyncio/issues/494 -- messages: 289138 nosy: fafhrd91 priority: normal pull_requests: 435 severity: normal status: open title: asyncio get_extra_info() throws exception versions: Python 3.5, Python 3.6, Python 3.7

[issue29736] Optimize builtin types constructor

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: float, list: issue20185. -- ___ Python tracker ___ ___ Python-bugs-list

[issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do

2017-03-06 Thread Oren Milman
New submission from Oren Milman: current state import io class IntLike(): def __init__(self, num): self._num = num def __index__(self): return self._num __int__ = __index__ io.StringIO('blah blah').read(IntLike(2)) io.StringIO('blah

[issue29740] Visual C++ CRT security update from 14 June 2011

2017-03-06 Thread Markus
New submission from Markus: In 14 June 2011 Microsoft released Visual C++ 2008 runtime MFC Security Update https://www.microsoft.com/en-us/download/details.aspx?id=26368 The Security Update also updates the CRT runtime (used by Python 2.7) Without the security update, Python 2.7.13 uses

[issue29736] Optimize builtin types constructor

2017-03-06 Thread STINNER Victor
STINNER Victor added the comment: > I would wait until constructors be converted to Argument Clinic. There are > ready patches for some of these builtin types, patches for other are in > proggress. Do you have links for these changes? It's painful to search for Argument Clinic changes, the

[issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select()

2017-03-06 Thread Martin Panter
Martin Panter added the comment: “Input9)” is probably a typo for “input()”. In Python 2, sys.stdin etc are by default wrappers around ’s “stdin” etc, and can easily be wrappers around other FILE objects, so the PyOS_Readline API and Python’s “readline” module pass these objects directly

[issue29739] zipfile raises wrong exception for some incorrect passwords

2017-03-06 Thread Jack Cushman
New submission from Jack Cushman: This bug arises when attempting to unzip a password-protected zipfile using the wrong password. Usually when zipfile extraction is attempted with an incorrect password, zipfile raise `RuntimeError("Bad password for file")`. But for a small subset of

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The list of failing tests in issue29048 contains test_traceback and test_xml_etree. Thus this issue may be a part of issue29048. Some tests may be fixed since reporting issue29048. -- ___ Python tracker

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-03-06 Thread Olivier Vielpeau
Changes by Olivier Vielpeau : -- pull_requests: +433 ___ Python tracker ___

[issue29738] Fix memory leak in SSLSocket.getpeercert()

2017-03-06 Thread Olivier Vielpeau
New submission from Olivier Vielpeau: The code snippet in #25569 reproduces the memory leak with Python 3.6.0 and 2.7.13. The current memory leak is a regression that was introduced in #26470. Going to attach a PR on github that fixes the issue shortly. -- assignee: christian.heimes

[issue29737] Optimize concatenating empty tuples

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +432 ___ Python tracker ___ ___

[issue29737] Optimize concatenating empty tuples

2017-03-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Since tuples are immutable, concatenating with empty tuple can be optimized by returning an opposite argument. Microbenchmarks (the difference is larger for larger tuples): $ ./python -m perf timeit --duplicate=100 -s 'a = (1, 2)' 'a + ()' Unpatched:

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I'll look into creating a PR when I have some time. It would also be useful to tweak the Travis/coverage configuration so that it fails loudly if one of the tests doesn't pass in the coverage check. -- ___ Python

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Brett Cannon
Brett Cannon added the comment: BTW, just because I assigned this to me doesn't mean others can't write a PR to solve this. :) I will review any PR that fixes this issue, I'm just going to make sure it gets solved no matter what if no one else creates a PR. --

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Brett Cannon
Brett Cannon added the comment: I don't think it's a duplicate because we had a passing coverage run when we initially made the migration so something got tweaked to lead to the failures. -- ___ Python tracker

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is this a duplicate of issue29048? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue15954] No error checking after using of the wcsxfrm()

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue29691] Some tests fail in coverage Travis check

2017-03-06 Thread Brett Cannon
Brett Cannon added the comment: The test_traceback changes should be easy to tweak to use a regex or startwith() check so the tests pass again. For the test_xml_etree failures I'm not sure how best to fix that other than taking it out. Maybe if sys.gettrace() returns something then skip the

[issue29716] Python 3 Module doc still sounds like __init__.py is required

2017-03-06 Thread Brett Cannon
Brett Cannon added the comment: I've gone ahead and closed this. Thanks for taking the time to check in on this, James! -- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29708] support reproducible Python builds

2017-03-06 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue15954] No error checking after using of the wcsxfrm()

2017-03-06 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-06 Thread Ned Deily
Ned Deily added the comment: Thanks for the analysis, Eryk and Nick. Then this sounds like a release blocker problem that should be fixed for 3.6.1. Steve, can you take a look, please? -- nosy: +steve.dower priority: normal -> release blocker stage: -> needs patch type: ->

[issue9051] Improve pickle format for timezone aware datetime instances

2017-03-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> rejected stage: patch review -> resolved status: pending -> closed ___ Python tracker

[issue29676] C method is not profiled by lsprof

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- components: +Interpreter Core -Tests title: verbose output of test_cprofile -> C method is not profiled by lsprof ___ Python tracker

[issue29676] verbose output of test_cprofile

2017-03-06 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +431 ___ Python tracker ___ ___

[issue29676] verbose output of test_cprofile

2017-03-06 Thread INADA Naoki
INADA Naoki added the comment: OK, now I found what caused this difference. lsprof expect `func` is PyCFunction object. But it can be PyMethodDescrObject when LOAD_METHOD is used to call C method. In Modules/_lsprof.c (line 459): case PyTrace_C_CALL: if ProfilerObject

[issue29735] Optimize functools.partial() for positional arguments

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the underlying function doesn't support fast call, and either args or pto->args are empty, partial_call() makes two unneeded copyings. Arguments are copied from a tuple to the raw array and from the array to new tuple. This is what the current code does,

[issue29545] Python behavioral difference between Linux and AIX

2017-03-06 Thread Anna Henningsen
Changes by Anna Henningsen : -- nosy: +addaleax ___ Python tracker ___ ___

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Grant Edwards
On 2017-03-06, Chris Angelico wrote: > Still, it's fun to discuss, if only to show why that kind of > locale-aware transformation is important. Besides locale-aware, it'll need to be style-guide-aware so that it knows whether you want MLA, Chicago, Strunk & White, NYT, Gregg,

[issue13566] Increase pickle compatibility

2017-03-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: Right, but Antoine's objection is that suddenly strs pickled in Py3 can end up as strs in Py2, rather than unicode. If the library enforces a Py3-like type separation on Py2 (text arguments are unicode only, binary data is str only), then you have the problem

[issue29571] test_re is failing when local is set for `en_IN`

2017-03-06 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the explanation - given that, I agree that simply reverting the attempted test-based fix and instead relying on the issue 20087 updates is the way to go. -- ___ Python tracker

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-06 Thread Nick Coghlan
Nick Coghlan added the comment: I think Eryk's diagnosis is correct: this is a straight up bug in the original patch, where it's missing the check to only use the new logic when in isolated mode (as it's compensating for the fact that there is no extra sys.path[0] entry inserted in that

[issue29733] concurrent.futures as_completed raise TimeoutError wrong

2017-03-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: The docs ( https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.as_completed ) do seem to indicate it shouldn't do so as long as results were available before the timeout expired: "The returned iterator raises a

Export Event log via python in .txt

2017-03-06 Thread iilaraja1286
I'm a student learning about python I would like to know how to export Security log Application and generate folder path via python please help -- https://mail.python.org/mailman/listinfo/python-list

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +430 ___ Python tracker ___ ___

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread D'Arcy Cain
On 2017-03-06 05:04 AM, Peter Otten wrote: Won't Steve D'aprano And D'arcy Cain Be Happy Now :) Perhaps one could limit the conversion to go from lower to upper only, as names tend be in the desired case in the original text. That would help with acronyms as well. -- D'Arcy J.M. Cain Vybe

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread STINNER Victor
STINNER Victor added the comment: Unhappy buildbot. http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/456/steps/test/logs/stdio == ERROR: test_keyword_arguments

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks all! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29736] Optimize builtin types constructor

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The half of constructors no longer use PyArg_ParseTupleAndKeywords(). I would wait until constructors be converted to Argument Clinic. There are ready patches for some of these builtin types, patches for other are in proggress. -- nosy:

[issue29735] Optimize functools.partial() for positional arguments

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about C stack consumption? Is not this increase it? Since nested partial()`s are collapsed, you need to interlace them with other wrapper for testing. def decorator(f): def wrapper(*args): return f(*args) return wrapper def f(*args):

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread R. David Murray
R. David Murray added the comment: If Raymond is on the side of skipping the deprecation than I'm good with it. Like I said, this is a marginal case. -- ___ Python tracker

[issue29736] Optimize builtin types constructor

2017-03-06 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +429 ___ Python tracker ___ ___

[issue29736] Optimize builtin types constructor

2017-03-06 Thread STINNER Victor
New submission from STINNER Victor: Attached PR replaces PyArg_ParseTupleAndKeywords() with _PyArg_ParseTupleAndKeywordsFast() to optimize the constructor of the builtin types: * bool: bool_new() * bytes: bytes_new() * complex: complex_new() * float: float_new() * int: long_new() * list:

[issue27577] Make implementation and doc of tuple and list more compliant

2017-03-06 Thread Xiang Zhang
Changes by Xiang Zhang : -- status: open -> closed ___ Python tracker ___ ___

[issue27577] Make implementation and doc of tuple and list more compliant

2017-03-06 Thread Xiang Zhang
Xiang Zhang added the comment: This issue doesn't make any sense once #29695 is applied. So close. -- resolution: -> fixed stage: -> resolved ___ Python tracker

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +428 ___ Python tracker ___ ___

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If David agrees with this. -- ___ Python tracker ___ ___ Python-bugs-list

[issue29714] can't interpolate byte string with \x00 before replacement identifier

2017-03-06 Thread STINNER Victor
STINNER Victor added the comment: Xiang Zhang added the comment: > I think no. String is not affected now and its code uses related macros so I > don't think it could suffer possible regression. Regressions are not something "expected", shit happens, all the time. Unexpected corner cases are

[issue29695] Weird keyword parameter names in builtins

2017-03-06 Thread STINNER Victor
STINNER Victor added the comment: > If you think that it would be better to remove without deprecation, the > following patch does this. @Serhiy: Can you please create a PR for it? -- ___ Python tracker

PyCon ZA 2017 - Call for Speakers

2017-03-06 Thread Neil Muller
PyCon ZA 2017 will take place 5th & 6th October at The River Club, in Observatory, Cape Town, South Africa. There will also be tutorial sessions the day before the conference (the 4th) and we will hold sprints on the 8th & 9th of October. We are currently accepting proposals for talks. If you

Re: str.title() fails with words containing apostrophes

2017-03-06 Thread Marko Rauhamaa
Chris Angelico : > Right. If you want true title casing, it has to be *extremely* > linguistically-aware. For instance, title case has no meaning in the context of Finnish. In other words, your internationalized program shouldn't even think of title case when localized in

[issue15343] "pydoc -w " writes out page with empty "Package Contents" section

2017-03-06 Thread Wolfgang Maier
Wolfgang Maier added the comment: Sorry, for generating noise on this very old issue, but was there a specific reason to duplicate the code of ImpImporter.find_module in changeset 9101eab6178c instead of factoring it out? -- nosy: +wolma ___ Python

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +427 ___ Python tracker ___ ___

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.7 -Python 3.4 ___ Python tracker ___

[issue29735] Optimize functools.partial() for positional arguments

2017-03-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +ncoghlan, rhettinger ___ Python tracker ___

[issue29735] Optimize functools.partial() for positional arguments

2017-03-06 Thread STINNER Victor
STINNER Victor added the comment: functools.partial() is commonly used in the the asyncio module. The asyncio doc suggests to use it, because of deliberate limitations of the asyncio API. -- nosy: +inada.naoki, serhiy.storchaka, yselivanov ___

[issue28243] Performance regression in functools.partial()

2017-03-06 Thread STINNER Victor
STINNER Victor added the comment: > Oh, functools.partial.__call__() doesn't use fastcall yet. This issue reminded me that I didn't finish to optimize partial_call(): see issue #29735 for a minor optimization. -- ___ Python tracker

  1   2   >