[issue32122] Improve -x option documentation

2017-11-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The documentation of the -x option is virtually not existing. The current short line of the description was enough to me for understanding what is the purpose of this option and how it can be used (I didn't use Windows for

[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I prefer to keep the current code as is. -- ___ Python tracker ___

[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7.14 was released with test.bisect. While there are corner cases, do we really have to do something? The simplest fix is just to rename Lib/test/bisect.py to Lib/test/bisect_cmd.py in Python 2.7. It's a tool written for

[issue30657] Unsafe arithmetic in PyString_DecodeEscape

2017-11-23 Thread Larry Hastings
Larry Hastings added the comment: I would welcome a backport of this for 3.5 and even 3.4 (if it's vulnerable, which it probably is). -- ___ Python tracker

[issue27068] Add a detach() method to subprocess.Popen

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: Sorry, but I'm not sure that it's a good idea to add a detach() method. It's hard to follow who owns all resources attached to a process, not only it's pid, but also streams which may be buffered. I propose the close the issue. The

[issue23719] PEP 475: port test_eintr to Windows

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I lost track of this idea, and I was unable to review win32-sleep-test.diff :-( While it would be "nice to have", the code is well tested on Unix. I close the issue. -- resolution: -> out of date stage: -> resolved

[issue31805] support._is_gui_available() hangs on x86-64 Sierra 3.6/3.x buildbot

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: The issue is gone. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue31520] ResourceWarning: unclosed warning

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: I'm not confortable to expose the value of the private _io_refs attribute in repr(socket.socket). I'm not sure that anything should really be done here. I close the issue. -- resolution: -> out of date stage: -> resolved

[issue31911] Use malloc_usable_size() in pymalloc for realloc

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: I agree. I don't think that it's worth it to overcompilates the API. I proposed this change since we may change the API to add PyMem_AlignedAlloc(). Since I just rejected bpo-18835, it's no more the case. I close this issue as

[issue32050] Fix -x option documentation

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: The initial proposition was to *deprecate* the option. In the meanwhile, I removed an outdated note. While the documentation is not perfect, I don't feel confortable to fix it, so I left it unchanged. I close this PR. Please open a

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: Antoine: What do you think of using the "default" action for pydebug build and -X dev? -- ___ Python tracker

[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: I added a Py_FatalError() to Python 2.7 if the case that must not happen does happen. Are you ok to apply the same change for Python 3.6 (commit ed4743a2f2bb8d88f7f1aa9307794be9a44f1e0f), or do you prefer to backport your

[issue31626] Writing in freed memory in _PyMem_DebugRawRealloc() after shrinking a memory block

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset ed4743a2f2bb8d88f7f1aa9307794be9a44f1e0f by Victor Stinner in branch '2.7': bpo-31626: Fix _PyObject_DebugReallocApi() (#4310) https://github.com/python/cpython/commit/ed4743a2f2bb8d88f7f1aa9307794be9a44f1e0f

[issue31543] Optimize wrapper descriptors using FASTCALL

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: It seems like these specific descriptors are rare, so the added complexity is not worth it. I close my issue as rejected. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue18835] Add PyMem_AlignedAlloc()

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: Because of the lack of strong motivition compared to the size of the change and the cost to maintain it, I reject this issue. For the archives, I attach a copy of the latest version of my implementation. -- resolution: ->

[issue32121] tracemalloc.Traceback.format() should have an option to reverse the traceback

2017-11-23 Thread Jesse Bakker
Jesse Bakker added the comment: I can work on this if you want. Can have a PR ready in a few minutes. -- nosy: +Jesse Bakker ___ Python tracker

[issue32121] tracemalloc.Traceback.format() should have an option to reverse the traceback

2017-11-23 Thread Jesse Bakker
Change by Jesse Bakker : -- keywords: +patch pull_requests: +4470 stage: needs patch -> patch review ___ Python tracker ___

[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset ff847d1ac7e6a8ee1fb6f8883cfb4aec4b4a9b03 by Raymond Hettinger (Miss Islington (bot)) in branch '3.6': bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (GH-4529) (#4533)

[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 3df02dbc8e197053105f9dffeae40b04ec66766e by Raymond Hettinger (Berker Peksag) in branch 'master': bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (#4529)

[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4469 ___ Python tracker ___

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4467 ___ Python tracker ___ ___

[issue30860] Consolidate stateful C globals under a single struct.

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4468 ___ Python tracker ___ ___

[issue32099] Use range in itertools roundrobin recipe

2017-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 0858495a50e19defde786a4ec050ec182e920f46 by Raymond Hettinger in branch 'master': bpo-32099 Add deque variant of roundrobin() recipe (#4497)

[issue32099] Use range in itertools roundrobin recipe

2017-11-23 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29302] add contextlib.AsyncExitStack

2017-11-23 Thread privatwolke
Change by privatwolke : -- nosy: +privatwolke ___ Python tracker ___ ___

[issue32121] tracemalloc.Traceback.format() should have an option to reverse the traceback

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: The option seems reasonable. Would you like to work on a pull request? -- ___ Python tracker

[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: Looks like I forgot to backport this 3.6 branch. Now it's done. Thanks, Eli. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5

[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: New changeset a645b23ffc76073a2eb4e77b88cb7648cfc6ef77 by Berker Peksag in branch '3.6': bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699)

[issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- keywords: +patch pull_requests: +4466 stage: backport needed -> patch review ___ Python tracker

[issue32121] tracemalloc.Traceback.format() should have an option to reverse the traceback

2017-11-23 Thread Antoine Pitrou
New submission from Antoine Pitrou : Right now tracemalloc.Traceback.format() returns the frames in "most recent call first" order. This is not intuitive since ordinary Python tracebacks are displayed in "most recent call last" order. It would be nice to add a `reverse`

[issue32107] test_uuid uses the incorrect bitmask

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm sorry, but this tests and the typo were added by me in issue23015. This check is a pair of the check for _random_getnode(). They use the same mask and test the same bit. I forgot about this. --

[issue32107] test_uuid uses the incorrect bitmask

2017-11-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 23, 2017, at 11:24, Serhiy Storchaka wrote: > Wait, now I understand the purpose of the current test! There is just a typo > in a comment, should be 41 instead of 47. The test itself is correct. If the >

[issue31325] req_rate is a namedtuple type rather than instance

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- keywords: +patch pull_requests: +4465 ___ Python tracker ___

[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +4464 stage: -> patch review ___ Python tracker ___

[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: New changeset dcaed6b2d954786eb5369ec2e8dfdeefe3cdc6ae by Berker Peksag in branch 'master': bpo-19610: setup() now raises TypeError for invalid types (GH-4519)

[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6a54c676e63517653d3d4a1e164bdd0fd45132d8 by Victor Stinner in branch 'master': bpo-31979: Remove unused align_maxchar() function (#4527) https://github.com/python/cpython/commit/6a54c676e63517653d3d4a1e164bdd0fd45132d8

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset b9197959c186f9061bd74d0adc20e96556426db4 by Victor Stinner in branch 'master': bpo-32030: Fix calculate_path() on macOS (#4526) https://github.com/python/cpython/commit/b9197959c186f9061bd74d0adc20e96556426db4

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: I tested set_match_tests() on python2.7 with: python2.7 -m test --list-cases > cases python2.7 -m test.bisect -i cases Good news: the set().__contains__ matcher can be used! -- ___ Python

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 35d99830f1878867e3964577741d9a2d5a7fc8f7 by Victor Stinner in branch '2.7': bpo-31324: Optimize support._match_test() (#4523) (#4524) https://github.com/python/cpython/commit/35d99830f1878867e3964577741d9a2d5a7fc8f7

[issue32055] Reconsider comparison chaining for containment tests

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm reading the list of most rated in a week questions on StackOverflow (https://python-weekly.blogspot.com/), and it seems to me that the question about chained "in" and "not in" is raised every few months. This may be the one

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > How about not posting about this topic for 24 hours. OK, makes sense :-) -- ___ Python tracker

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: I think we all need to calm down a bit. How about not posting about this topic for 24 hours. -- ___ Python tracker

[issue31979] Simplify converting non-ASCII strings to int, float and complex

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4463 ___ Python tracker ___ ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4462 ___ Python tracker ___ ___

[issue13986] ValueError: cannot convert float NaN to integer

2017-11-23 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker ___ ___

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Guido, I am not sure about the complete removal, this is probably to radical. What I think we are missing more detailed docs that would be clear about the corner cases. (I already mentioned this in https://bugs.python.org/issue32113)

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4461 ___ Python tracker ___ ___

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury OK, sorry then this is a misunderstanding from my side. NP. Again, sorry if I sounded that way to you. -- ___ Python tracker

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yury OK, sorry then this is a misunderstanding from my side. -- ___ Python tracker ___

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: >> Do you understand the difference? > Yury, sorry, but what is your problem? Have I said something about that this > is bad. Your tone is clearly insulting, and this is not the first time. Maybe > it makes sense to have some respect?

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Do you understand the difference? Yury, sorry, but what is your problem? Have I said something about that this is bad. Your tone is clearly insulting, and this is not the first time. Maybe it makes sense to have some respect?

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 70b2f8797146a56a6880743424f0bedf4fc30c62 by Victor Stinner in branch '3.6': [3.6] bpo-31324: Optimize support._match_test() (#4523) https://github.com/python/cpython/commit/70b2f8797146a56a6880743424f0bedf4fc30c62

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: > Well, after all I am thinking maybe it is indeed makes sense to ban `yield` > inside both sync/async and both comprehensions/generator expressions. I agree, as I can't imagine a real use case for a = ((yield a) for a in as) which

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: I honestly think we went too far here. Asynchronous generators are still provisional. Though the PEP is silent about this, the acceptance notice is clear: https://mail.python.org/pipermail/python-dev/2016-September/146267.html. I propose to

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Well, after all I am thinking maybe it is indeed makes sense to ban `yield` inside both sync/async and both comprehensions/generator expressions. Since we already have a smörgåsbord of intuitive behaviors. This, _together_ with

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: > ... but [await x for x in xs] is still valid _only_ inside async def. Yes, because it's computed right where it is defined. a = [x for x in xs] # `a` is a list object a = (x for x in xs) # `a` is a generator Do you understand the

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: ... but [await x for x in xs] is still valid _only_ inside async def. -- ___ Python tracker

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: It's also important to note, that in 3.7, this is legal: def foo(): return (await x for x in xs) Note that 'foo' is a regular function, not 'async def'. -- ___ Python tracker

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury explained why this happens in https://bugs.python.org/issue32113 It happens because '(x for x in xs)' creates a synchronous generator. So when there's an 'await' in it, it creates an asynchronous generator. --

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: (Of course there should be not [1, 2] in the argument, but a list of some awaitables, otherwise there will be an error later.) -- ___ Python tracker

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Remind me what happens when you use `await` in a generator expression that > survives the async function's scope? Awaiting on f([1, 2]) will result in an async generator (even though yield never appears here). Yury explained why this

[issue32107] test_uuid uses the incorrect bitmask

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wait, now I understand the purpose of the current test! There is just a typo in a comment, should be 41 instead of 47. The test itself is correct. If the address is obtained from network cards, it should have the 41 bit clear.

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: Remind me what happens when you use `await` in a generator expression that survives the async function's scope? async def f(xs): return (await x for x in xs) -- ___ Python tracker

[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset b98f1715a35d2cbd1e9e45e1e7ae51a39e00dc4a by Victor Stinner in branch 'master': bpo-27535: Cleanup create_filter() (#4516) https://github.com/python/cpython/commit/b98f1715a35d2cbd1e9e45e1e7ae51a39e00dc4a --

[issue32118] Docs: add note about sequence comparisons containing non-orderable elements

2017-11-23 Thread R. David Murray
R. David Murray added the comment: The surprising thing is the behavior of NaN, which is *not equal* to itself. The statement about orderability says "...are ordered the same as their first unequal elements". This is explicit and unambiguous, there is no difference in

[issue30657] Unsafe arithmetic in PyString_DecodeEscape

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Right, but it is not easy to exploit this bug. You need to parse Python sources longer than 512 MiB in 32-bit Python. Python 3.5 currently takes only fixes for security bugs. I left on to Larry to decide whether it is worth to

[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 448c6739877a4143a2c3599f041fa6127f354044 by Victor Stinner in branch '2.7': bpo-29512: Fix Lib/test/bisect.py shebang (#4522) https://github.com/python/cpython/commit/448c6739877a4143a2c3599f041fa6127f354044

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0327bde9da203bb256b58218d012ca76ad0db4e4 by Victor Stinner in branch 'master': bpo-32030: Rewrite calculate_path() (#4521) https://github.com/python/cpython/commit/0327bde9da203bb256b58218d012ca76ad0db4e4 --

[issue31324] support._match_test() used by test.bisect is very inefficient

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4460 ___ Python tracker ___ ___

[issue29512] regrtest refleak: implement bisection feature

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4459 stage: resolved -> patch review ___ Python tracker ___

[issue30657] Unsafe arithmetic in PyString_DecodeEscape

2017-11-23 Thread Leo kirotawa silva
Leo kirotawa silva added the comment: I couldn't reproduce using the poc, but seems python3.5 is also vulnerable to this bug. The code from py3.5 are quite similar to 2.7. In py3.5: Objects/bytesobject.c PyBytes_DecodeEscape -- nosy: +Leo kirotawa silva

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4458 ___ Python tracker ___ ___

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: Thank you, Anthony. I added a test case and committed your patch to 3.6 and master branches. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: New changeset 4b3042900e7e8dc120408bab86642c09c9d25a5a by Berker Peksag in branch '3.6': bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)

[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: pysqlite2 only works in Python 2: https://github.com/ghaering/pysqlite/blob/e728ffbcaeb7bfae1d6b7165369bd0ae16cabf95/setup.py#L25-L28 You don't need to install pysqlite2 in Python 3. The latest release of Python 3.6 (which is 3.6.3,

[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Abinaya
Abinaya added the comment: Thanks for the help. If we import pysqlite2 I could see the error that pysqlite2 module not found. Please let us know is there anyway to get pysqlite2 in python_v363. -- ___ Python tracker

[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: Éric and Henk-Jaap: I've now opened PR 4519. -- ___ Python tracker ___

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: > Will it be added to 3.6 also? Yes, I've created a backport PR: PR 4520 > And when it will be available in the windows installations you release? The dates for 3.6.4 release is listed at https://www.python.org/dev/peps/pep-0494/#id4

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread uday kiran
uday kiran added the comment: Will it be added to 3.6 also? And when it will be available in the windows installations you release? -- ___ Python tracker

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +4457 stage: backport needed -> patch review ___ Python tracker ___

[issue19610] Give clear error messages for invalid types used for setup.py params (e.g. tuple for classifiers)

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: +4456 ___ Python tracker ___ ___

[issue32039] timeit documentation should describe caveats

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one mistake: https://stackoverflow.com/questions/35014951/why-is-max-slower-than-sort $ python3 -m timeit -s 'import random;a=list(range(1));random.shuffle(a)' 'a.sort();a[-1]' Here the list is sorted at first

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: New changeset bdb8315c21825487b54852ff0511fb4881ea2181 by Berker Peksag in branch 'master': bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)

[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2017-11-23 Thread Berker Peksag
Change by Berker Peksag : -- stage: patch review -> backport needed versions: -Python 2.7 ___ Python tracker ___

[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: > Could you please let me know if we build latest python_v363 then sqlite > will be work right. It should build fine with Python 3.6.3. Let us know if you can't get it working. -- ___ Python

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Ivan. It would be nice to me to disallow "yield" in comprehensions and generator expressions, but the fact that "await" in comprehensions already works right, and this behavior is intentional and useful, make me

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Consider this as a sort of optimization. A function inlining. In general case we can't inline a function because it can be rebinded at any time, but in this particular case we call a just created function that doesn't have any

[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Abinaya
Abinaya added the comment: Thanks for the update. Could you please let me know if we build latest python_v363 then sqlite will be work right. -- ___ Python tracker

[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Berker Peksag
Berker Peksag added the comment: 3.6.0 was required sqlite 3.7.4 but the requirement was lifted in Python 3.6.1. 3.6.3 is the latest release of Python 3.6. Please try Python 3.6.3. Also, this is a duplicate of issue 29098. -- components: +Extension Modules

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Nick, > Yury took all this into account when designing the interaction between > `await` and comprehensions (which is why that's in a better state), but for > `yield` we inherited the existing behaviour of any other nested function.

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is straightforward. __result = []; __i = None try: for __i in range(2, 5): __result2 = []; __x = __y = None try: for __x in range(2): for __y in range(1, __i):

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: Sure, you can technically do that, but you'll have to rewrite most of the symtable pass in the compiler, since you won't be able to re-use the current recursive descent algorithms (which are designed to handle function scopes). That ran

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: Another slight variant to that test case to make sure the inner comprehension actually generates a closure reference in the current implementation: >>> [[x+y for x in range(2) for y in range(1, i)] for i in range(2, 5)] [[1, 2], [1,

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I see nothing special in `[[x for x in range(1, i)] for i in range(2, 5)]`. This should be equivalent to: __result = []; __i = None try: for __i in range(2, 5): __result2 = []; __x = None try: for

[issue32120] python 3.6.0 is not importing sqlite3

2017-11-23 Thread Abinaya
New submission from Abinaya : Hi, We have installed python-3.6.0 on our RedHat 6 machine. when we are trying to import sqlite module in python_v36 we could see below issue, [root@euca-10-254-72-197 rpmbuild]$ python Python 3.6.0 (default, Nov 23 2017, 12:46:54)

[issue10544] yield expression inside generator expression does nothing

2017-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: Also see https://bugs.python.org/issue1660500 for the original Python 3.0 change to hide the iteration variable. While the test suite already covers some interesting scoping edge cases as result of that initial patch, I think one we're

[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2017-11-23 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset 5ce1069a6ff0d5443074d33ba1d403ccd2eaf3d3 by xdegaye in branch 'master': bpo-28762: Revert last commit (now using Android Unified Headers) (GH-4488)

[issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined

2017-11-23 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: not a bug -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

  1   2   >