[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Narendra
Narendra added the comment: Hi Storchaka, As per re.groups(), its should work as below: groups([default]) Return a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The default argument is used for groups that did not

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-07 Thread 张晓林
Change by 张晓林 : -- type: resource usage -> behavior ___ Python tracker ___ ___

[issue31834] BLAKE2: the (pure) SSE2 impl forced on x86_64 is slower than reference

2017-11-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: @tiran, can we close this again? -- ___ Python tracker ___

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-07 Thread 张晓林
New submission from 张晓林 : the python document say Condition work will Locks, like RLock... but i find it not work with Semaphore, because Condition._is_owned is like this def _is_owned(self): # Return True if lock is owned by current_thread. # This

[issue31971] idle_test: failures on x86 Windows7 3.x

2017-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: In build 129, which finished perhaps 3 hours ago, test_idle passed again. I think we should merge the fix anyway in case 'hover' appears again on some machine. A similar try:except is needed elsewhere. --

[issue31976] Segfault when closing BufferedWriter from a different thread

2017-11-07 Thread Benjamin Fogle
Change by Benjamin Fogle : -- type: -> crash ___ Python tracker ___ ___

[issue31971] idle_test: failures on x86 Windows7 3.x

2017-11-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The failure in tearDownClass is a side-effect of the failure in test_set_keys causing 'p.set_keys_type = Func' being skipped. That could be prevented with 'try:finally: p.set_keys_type = Func'. I am completely puzzled at the sudden failure

[issue31976] Segfault when closing BufferedWriter from a different thread

2017-11-07 Thread Benjamin Fogle
Change by Benjamin Fogle : -- keywords: +patch pull_requests: +4287 stage: -> patch review ___ Python tracker ___

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-07 Thread Éric Araujo
Éric Araujo added the comment: This can’t be backported, but could the docs of 2.7 and stable 3.x version gain an example of equivalent PYTHONWARNINGS envvar? -- nosy: +eric.araujo ___ Python tracker

[issue31976] Segfault when closing BufferedWriter from a different thread

2017-11-07 Thread Benjamin Fogle
New submission from Benjamin Fogle : To reproduce: ``` import threading import io import time import _pyio class MyFileIO(io.FileIO): def flush(self): # Simulate a slow flush. Slow disk, etc. time.sleep(0.25) super().flush() raw =

[issue31971] idle_test: failures on x86 Windows7 3.x

2017-11-07 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +4286 stage: -> patch review ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-07 Thread Anders Lorentsen
Anders Lorentsen added the comment: While researching this, I discovered that on MS Windows >>> subprocess.run([pathlike_object, additional_arguments]) did not run like it did on Posix. My PR includes this problem and it's fix. --

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +4285 stage: -> patch review ___ Python tracker ___

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-07 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-07 Thread Nick Coghlan
New submission from Nick Coghlan : As per the post at https://mail.python.org/pipermail/python-dev/2017-November/150366.html, this is an RFE to cover adding a new warning filter to the default set: once::DeprecationWarning:__main__ This means that all deprecation

[issue31974] Cursor misbahavior with Tkinter 3.6.1/tk 8.5 Text on Mac Sierra

2017-11-07 Thread Terry J. Reedy
New submission from Terry J. Reedy : MacOS Sierra 10.12.6, Python 3.6.1, tk 8.5.15 or .18. Consider this code with arbitrary compound statements and therefore indented lines. for i in range(10): if i%2: print(f(i)) Irv Kalb on idle-dev thread 'Bug in cursor

[issue24132] Direct sub-classing of pathlib.Path

2017-11-07 Thread Stephen M. Gava
Stephen M. Gava added the comment: Using a set of paths with special properties and formats in a project, thought "the cleanest oop way to do this is try out python's oop paths in pathlib". Subclassed Path to implement my extra (non platfor specific) properties and fell

[issue25862] TextIOWrapper assertion failure after read() and SEEK_CUR

2017-11-07 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz versions: +Python 3.6, Python 3.7 -Python 3.5 ___ Python tracker ___

[issue31973] Incomplete DeprecationWarning for async/await keywords

2017-11-07 Thread Jakub Wilk
Change by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31973] Incomplete DeprecationWarning for async/await keywords

2017-11-07 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : Issue bpo-26182 added DeprecationWarnings for "import async" and "import await" since both of those pseudo-keywords were to become actual reserved keywords in Python 3.7. This latter has now happened, but the fix in bpo-26182 is

[issue26692] cgroups support in multiprocessing

2017-11-07 Thread Mihai Capotă
Change by Mihai Capotă : -- nosy: +mihaic ___ Python tracker ___ ___ Python-bugs-list

[issue31957] [Windows] PCbuild error: A numeric comparison was attempted

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: Thank you Steve for the quick fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +4284 stage: needs patch -> patch review ___ Python tracker

[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: bpo-28280 fixed this issue only in the master branch. I had left this issue open for fixing 3.6. -- resolution: out of date -> stage: resolved -> needs patch status: closed -> open

[issue28791] update sqlite to latest version before beta 1

2017-11-07 Thread Zachary Ware
Zachary Ware added the comment: I'd say that's up to Ned and Benjamin. It's a very simple backport at this point. -- nosy: +benjamin.peterson ___ Python tracker

[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-11-07 Thread Berker Peksag
Berker Peksag added the comment: PR 3840 has been merged and it looks like Oren was correct. I'm getting the following output with current master: >>> encoder(obj=BadDict({'spam': 42}), _current_indent_level=4) ['{}'] -- nosy: +berker.peksag resolution: ->

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-07 Thread Berker Peksag
Berker Peksag added the comment: For those who want to work on this issue: codecs.StreamReaderWriter documentation is located at Doc/library/codecs.rst. -- keywords: +easy nosy: +berker.peksag stage: -> needs patch versions: +Python 3.7

[issue31937] Add the term "dunder" to the glossary

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I never seen terms like "stir" or "inker", but the term "dunder" is used pretty widely. The glossary already contains abbreviations and Python folk terminology like EAFP and BDFL. --

[issue31937] Add the term "dunder" to the glossary

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with Raymond that Python folk terminology should not go into the glossary. I don't think I ever say "dunder" myself. -- nosy: +pitrou ___ Python tracker

[issue31951] import curses is broken on windows

2017-11-07 Thread joe m
joe m added the comment: I would much prefer the curses module to be supported in newer versions since I believe that curses is installed as a built in module (not sure about that). Anyhow, thank you for your help but I have found a replacement module called

[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset ac4f6d4448fb6f9affb817bafb8357450fe43349 by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-31620: have asyncio/queues not leak memory when you've exceptions during waiting (GH-3813) (#4326)

[issue31972] Inherited docstrings for pathlib classes are confusing

2017-11-07 Thread Éric Araujo
New submission from Éric Araujo : pydoc pathlib.Path shows the docstring of PurePath: | PurePath represents a filesystem path and offers operations which | don't imply any actual filesystem I/O. But immediately after we see methods like chmod, exists and co which

[issue31425] Expose AF_QIPCRTR in socket module

2017-11-07 Thread Christian Heimes
Change by Christian Heimes : -- assignee: -> christian.heimes nosy: +christian.heimes ___ Python tracker ___

[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4283 ___ Python tracker ___

[issue31620] asyncio.Queue leaks memory if the queue is empty and consumers poll it frequently

2017-11-07 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset c62f0cb3b1f6f9ca4ce463b1c99b0543bdfa38d6 by Andrew Svetlov (Suren Nihalani) in branch 'master': bpo-31620: have asyncio/queues not leak memory when you've exceptions during waiting (#3813)

[issue31937] Add the term "dunder" to the glossary

2017-11-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks Raymond. +1 for adding the above list. I don't think FAQ is the right place either, I prefer we don't have to add the entries in the form of questions & answers. -- ___ Python

[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Julien. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 ___ Python tracker

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you for helping with asyncio! I'll try to get to that transport performance issues you found sometime this week. I've a few ideas how to add 0-copy support to protocols. -- ___ Python

[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki
INADA Naoki added the comment: New changeset 64f10492dcda4117ac06399ae46ab645cb09b19e by INADA Naoki (Miss Islington (bot)) in branch '3.6': bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)

[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki
INADA Naoki added the comment: New changeset 47eaaa55247b6ad8ae507c0048509c2e3db79bf0 by INADA Naoki (Miss Islington (bot)) in branch '2.7': bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset d8d218ffda6b7569625ff9edadbbc9a2b1055e32 by Antoine Pitrou in branch '3.6': [3.6] bpo-31970: Reduce performance overhead of asyncio debug mode. (GH-4314) (#4322)

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the quick reviews! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4282 ___ Python tracker ___

[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4281 ___ Python tracker ___

[issue31793] Allow to specialize smart quotes in documentation translations

2017-11-07 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5a66c8a64d180b5f3c80307924adaec53cc8faa3 by INADA Naoki (Julien Palard) in branch 'master': bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> postponed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: I guess you can set Resolution to "postponed", Stage to "Resolved". -- ___ Python tracker ___

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +4280 ___ Python tracker ___ ___

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 921e9432a1461bbf312c9c6dcc2b916be6c05fa0 by Antoine Pitrou in branch 'master': bpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: The documentation has been fixed. Should we close this now? Ideally I'd rather have asyncio warn me in such situations, but I feel this won't be doable. -- ___ Python tracker

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 518c6b97868d9c665475a40567b0aa417afad607 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (GH-4319) (#4320)

[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker

[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset d9c61c2a2662761dc89e0be14ceb7ea57531c836 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-31965: fix doc for multiprocessing.connection.Client and Listener (GH-4304) (#4321)

[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +4279 stage: -> patch review ___ Python tracker ___

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Maybe the solution is to fix Tornado? That's a possibility. I have to convince Ben Darnell that it deserves fixing :-) Another possibility is to use the asyncio concurrency primitives on Python 3, though that slightly complicates things,

[issue31965] Incorrect documentation for multiprocessing.connection.{Client, Listener}

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 1e5d54cfa031f1de9ee2d2e968e0551b6e2397b7 by Antoine Pitrou (Jelle Zijlstra) in branch 'master': bpo-31965: fix doc for multiprocessing.connection.Client and Listener (#4304)

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4278 stage: -> patch review ___ Python tracker ___

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 22b1128559bdeb96907da5840960691bb050d11a by Antoine Pitrou in branch 'master': bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (#4319)

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: > Just try the snippet :-) If you want to see it finish in a finite time, move > the future instantiation inside the coroutine. Yeah, I see the problem. OTOH your proposed change to lazily attach a loop to the future isn't fully

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So imagine a Future `fut` is completed. And we call `fut.add_done_callback()` > in different contexts with different active event loops. With your > suggestion we'll schedule our callbacks in different loops. I'm wondering: does this

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: > My underlying question is why the Future has to set its loop in its > constructor, instead of simply using get_event_loop() inside > _schedule_callbacks(). This would always work. So imagine a Future `fut` is completed. And we call

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: The call_soon / call_soon_threadsafe distinction is not relevant to the problem I posted. The problem is that the Future is registered with the event loop for the thread it was created in, even though it is only ever used in another thread

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: >> I think we should update `Future._schedule_callbacks` to check if the loop >> is in debug mode. > Unfortunately this is not sufficient for the snippet I posted. The loop's > thread_id is only set when the loop runs, but the main

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4277 stage: -> patch review ___ Python tracker ___

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: My underlying question is why the Future has to set its loop in its constructor, instead of simply using get_event_loop() inside _schedule_callbacks(). This would always work. -- ___ Python

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My opinion on this: update documentation for all Python versions to reflect > that Future uses call_soon. Agreed. > I think we should update `Future._schedule_callbacks` to check if the loop is > in debug mode. Unfortunately this is not

[issue31971] idle_test: failures on x86 Windows7 3.x

2017-11-07 Thread STINNER Victor
New submission from STINNER Victor : http://buildbot.python.org/all/#/builders/58/builds/122 == ERROR: tearDownClass (idlelib.idle_test.test_configdialog.KeysPageTest)

[issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: The _io__WindowsConsoleIO_write_impl() function should be fixed to not call MultiByteToWideChar() but use 0 if the input string is zero. Ok, it makes sense. In that case, I agree to call it a simple issue ;-) -- title:

[issue31960] Protection against using a Future with another loop only works with await

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: > On the other hand, the Future implementation is entirely not thread-safe > (btw, the constructor optimistically claims the done callbacks are scheduled > using call_soon_threadsafe(), but the implementation actually calls >

[issue31955] distutils C compiler: set_executables() incorrectly parse values with spaces

2017-11-07 Thread Dee Mee
Dee Mee added the comment: I agree, that this fix is necessary only for Python 2. Submitted new PR 4316 -- versions: -Python 3.6, Python 3.7 ___ Python tracker

[issue31956] Add start and stop parameters to the array.index()

2017-11-07 Thread Николай Спахиев
Николай Спахиев added the comment: I plan to work on a patch. -- ___ Python tracker ___

[issue31955] distutils C compiler: set_executables() incorrectly parse values with spaces

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4275 ___ Python tracker ___

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
Change by Ilya Polyakovskiy : -- pull_requests: +4274 ___ Python tracker ___

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list

[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Eryk Sun
Eryk Sun added the comment: The error is in _io__WindowsConsoleIO_write_impl. If it's passed a length 0 buffer, it still tries to decode it via MultiByteToWideChar, which fails as documented. As Serhiy says, it can simply return Python int(0) in the zero-length case.

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: If this is accepted on the principle, it would be great to also patch 3.6. -- ___ Python tracker ___

[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___

[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is nothing wrong with this output if you use the first example. -- ___ Python tracker

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4273 stage: -> patch review ___ Python tracker ___

[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All work as designed. In your example you don't see a difference because all groups are defined. Look at other example: >>> import re >>> m = re.match(r'(?:(\w+)@)?(\w+)\.(\w+)', 'hackerrank.com') >>> m.groups() (None,

[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Narendra
Narendra added the comment: Please look in to the following example: >>> m.groups() ('narendra', 'happiestmidns', 'com') >>> m.groups(1) ('narendra', 'happiestmidns', 'com') >>> m.groups(34) ('narendra', 'happiestmidns', 'com') >>>

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : Each time a new future, handle or task is created, asyncio with debug mode enabled will parse the whole call stack and create a StackSummary object for it. Imagine a recursive coroutine: with N nested calls, you get O(N**2) performance.

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
Change by Ilya Polyakovskiy : -- keywords: +patch pull_requests: +4272 stage: -> patch review ___ Python tracker ___

[issue31969] re.groups() is not checking the arguments

2017-11-07 Thread Narendra
New submission from Narendra : Hi Team, I have observed a bug in re.groups() function behavior in Python as below: Issue: re.groups() is not validating the arguments Example: >>> m = re.match(r'(\w+)@(\w+)\.(\w+)','usern...@hackerrank.com') >>> m.groups() ('username',

[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know which part of _WindowsConsoleIO.write() fails to handle empty bytes string, but the simplest and the most efficient way to fix this bug it to add an explicit check for zero length at the begin of this method and

[issue20486] msilib: can't close opened database

2017-11-07 Thread Berker Peksag
Berker Peksag added the comment: Thank you, all. The OP's snippet should work now: >>> import msilib as m >>> db = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT) >>> db.Commit() >>> db2 = m.OpenDatabase('py33.msi', m.MSIDBOPEN_TRANSACT) Traceback (most recent call

[issue20486] msilib: can't close opened database

2017-11-07 Thread Berker Peksag
Berker Peksag added the comment: New changeset a935654f0613640535fbf0ba190f81d02a63d35c by Berker Peksag in branch 'master': bpo-20486: Implement Database.Close() method in msilib (GH-4141)

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread R. David Murray
R. David Murray added the comment: Yes, that's the way it works (and is intended to work, for performance reasons). The documentation on this could be improved...while it does say globals must be a dict and that locals can be any mapping object, it does it in a

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
Change by Ilya Polyakovskiy : -- type: -> behavior ___ Python tracker ___

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
New submission from Ilya Polyakovskiy : I'm using exec() to run code with globals object inherited from dict. The problem is overloaded __getitem__ doesn't called to load default argument for class methods. Here the example. Let's assume we create some variable

[issue28791] update sqlite to latest version before beta 1

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: > sqlite-3.15.1 fixes an old annoying bug (hidden since 3.8.0) Since the bug seems to be important, maybe it's worth it to backport the commit upgrading SQLite to Python 2.7 and 3.6? --

[issue31966] print('hello\n', end='', flush=True) raises OSError when ran with py -u

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: serhiy.storchaka: "keywords: + easy (C)" For easy issue, you should explain how do you want the issue to be fixed. -- ___ Python tracker

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

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: For allocations larger than 512 bytes, PyObject_Malloc() calls PyMem_RawMalloc(). When debug hooks are installed, PyObject_Malloc() calls a debug hook which calls PyMem_RawMalloc() which calls another debug hook. --

[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: Also, based on reviewing this, I suspect the same approach would also work for the pure Python profile module. -- ___ Python tracker

[issue21862] cProfile command-line should accept "-m module_name" as an alternative to script path

2017-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: I added an inline comment on the PR - I think what's there now would work fine, but I also suggested a slightly shorter and clearer (at least to me) alternative. -- ___ Python tracker

[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-11-07 Thread Simon Descarpentries
Simon Descarpentries added the comment: Hi, I missed the part of the doc you pointed out, being focused on ratio() function family. Thanks for your gentle reply. -- ___ Python tracker

[issue31967] [Windows] test_distutils: fatal error LNK1158: cannot run 'rc.exe'

2017-11-07 Thread David Bolen
David Bolen added the comment: Ok, so rc.exe appears truly not to be found when the test runs. The binary is a bit buried in the Windows Kit directory tree, and I'm guessing something is off after the upgrade (I'm not sure where it was in the tree before). I manually

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

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one issue is left. In debug mode two debug allocators are used, the one is nested in the other. Is it correct? -- ___ Python tracker

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

2017-11-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4271 ___ Python tracker ___ ___

  1   2   >