Calling of GetVolumeInformation returns empty serial number

2017-11-07 Thread Durumdara
Hi! Windows 10, Python 3.6. I want to get the serial number of the drives (without external modules like Win32 or WMI). It is needed for identification of removable devices (like USB external drives). Somewhere I saw this code: def GetVolumeID(Drive): import ctypes kernel32 =

[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your microbenchmark Inada. The difference is small, but repeating it with different modifications almost always show small speedup. The only problem is that this change increases the size of dict object by one

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

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 07/11/2017 à 08:48, Nick Coghlan a écrit : > > So from a runpy perspective, this approach gets a +1 from me, but I'd prefer > if there was someone more familiar with the cProfile module that was willing > to handle the merge. Thanks Nick.

[issue31950] Default event loop policy doc lacks precision

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

[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Guido. This is fixed now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31950] Default event loop policy doc lacks precision

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

[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 4135c89395726024abddb7340a0c7a42c801f616 by Antoine Pitrou in branch 'master': bpo-31950: Improve event loop policy doc (#4306) https://github.com/python/cpython/commit/4135c89395726024abddb7340a0c7a42c801f616 --

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

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Guido, Yury, what is your take on this? Do you think it would be fine for Future._schedule_callbacks() to check the event loop is the current one, or do you think it would impact performance too much (or perhaps it is simply not desirable)?

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

2017-11-07 Thread Guillaume Aldebert
New submission from Guillaume Aldebert : noticed on windows10, 3.6.3-64 and 3.7.0a2-64: using this test.py file: #!/usr/bin/env python3 print('hello\n', end='', flush=True) and running it in unbuffered mode: C:\Dev>py -u test.py hello Traceback (most recent call last):

[issue31954] Don't prevent dict optimization by coupling with OrderedDict

2017-11-07 Thread INADA Naoki
INADA Naoki added the comment: I don't know why dk_lookup is in dictkeys object. But I think it's because sharing 1 word from all key-sharing dict. So ma_clean flag can be in dictkeys object for same reason. BTW, We use dk_lookup function pointer and it tooks 1 word.

[issue31950] Default event loop policy doc lacks precision

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset e65617f65e203a2a6d3e3100d0d6fed0ffa0613d by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-31950: Improve event loop policy doc (GH-4306) (#4307)

Re: Ideas about how software should behave

2017-11-07 Thread Ned Batchelder
On 11/7/17 5:48 PM, Ben Finney wrote: Ian Kelly writes: Nowadays I realize and accept that this is preposterous. You cannot criticize an idea without also criticizing the people who are attached to that idea. Maybe so. Does that mean we must not criticise ideas? Later

[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

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-07 Thread Steve D'Aprano
On Wed, 8 Nov 2017 04:28 am, Ian Kelly wrote: > Steve's manufactured interactive example ("manufactured" because > who really uses for-else interactively? If I really care that much > about output formatting I'm going to put it in a script). Me. As I have said. I really don't appreciate you

[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

[issue26692] cgroups support in multiprocessing

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

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-07 Thread Ian Kelly
On Tue, Nov 7, 2017 at 4:28 PM, Steve D'Aprano wrote: > On Wed, 8 Nov 2017 04:28 am, Ian Kelly wrote: > >> Steve's manufactured interactive example ("manufactured" because >> who really uses for-else interactively? If I really care that much >> about output formatting

[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

[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 ___

[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. --

[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 ___

[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
Change by Benjamin Fogle : -- keywords: +patch pull_requests: +4287 stage: -> patch review ___ 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

[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 ___ ___

[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

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

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

[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

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

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: Similar error on AMD64 Windows8 3.x: http://buildbot.python.org/all/#/builders/32/builds/127 -- ___ Python tracker

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

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: Hi David Bolen: Would you mind to look at this bug, please? thank you in advance ;-) -- nosy: +db3l ___ Python tracker

[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: The problem is with _WindowsConsoleIO. C:\py\cpython>python.bat -u -c "import sys; sys.stdout.buffer.write(b'')" Running Release|Win32 interpreter... Traceback (most recent call last): File "", line 1, in OSError: [WinError

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

2017-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy (C) stage: -> needs patch ___ Python tracker ___

[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: Once the bug will be fixed, it would be nice to test this simple case :-) -- nosy: +haypo ___ Python tracker

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

2017-11-07 Thread David Bolen
David Bolen added the comment: This seems to correlate with my upgrading to the latest Win10 SDK on those workers (Steve pointed out I was still getting ucrt warnings during compilation). So they both jumped from like 10240 up to 16299. But that's all I changed.

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

2017-11-07 Thread STINNER Victor
New submission from STINNER Victor : test_distutils failed on AMD64 Windows10 3.x buildbot: http://buildbot.python.org/all/#/builders/3/builds/128 0:19:07 [165/407/1] test_distutils failed -- running: test_multiprocessing_spawn (377 sec) xxmodule.c xxmodule.obj :

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't have any strong opinion, but I think doing the check at runtime is better. -- ___ Python tracker

[issue31808] tarfile.extractall fails to overwrite symlinks

2017-11-07 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.7 -Python 3.5 ___ Python tracker

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

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3cc4c53a64bdcf21431ad306eca0e568f88735a2 by Serhiy Storchaka in branch 'master': bpo-31626: Mark ends of the reallocated block in debug build. (#4210)

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

2017-11-07 Thread STINNER Victor
STINNER Victor added the comment: I don't think that it's related, but a recent change in PCbuild is: bpo-31957. IMHO it's more something that changed on the two buildbots. -- ___ Python tracker

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

2017-11-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +IO nosy: +serhiy.storchaka ___ Python tracker ___

Re: Calling of GetVolumeInformation returns empty serial number

2017-11-07 Thread Thomas Jollans
On 2017-11-07 08:58, Durumdara wrote: > Hi! > > Windows 10, Python 3.6. > > I want to get the serial number of the drives (without external modules > like Win32 or WMI). > It is needed for identification of removable devices (like USB external > drives). > > Somewhere I saw this code: > > def

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

2017-11-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are large discussions at PR 3844 and PR 4210. -- ___ Python tracker ___

ANN: Wing Python IDE v. 6.0.8 released

2017-11-07 Thread Wingware
Hi, We've just released Wing 6.0.8, a minor release that improves display of PEP 287 docstrings, fixes stability problems seen on Linux, fixes remote debugging of Django code, further improves remote development, adds some missing vi bindings, and makes about 30 other improvements. For

[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

[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

Re: Ideas about how software should behave

2017-11-07 Thread Grant Edwards
On 2017-11-07, Chris Angelico wrote: > On Wed, Nov 8, 2017 at 6:44 AM, Stefan Ram wrote: >> Chris Angelico writes: >>>sure what your point is. None, False, and True are all keywords, not >>>built-ins, so you can't assign to them (any

[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. --

Re: Ideas about how software should behave

2017-11-07 Thread Chris Angelico
On Wed, Nov 8, 2017 at 6:44 AM, Stefan Ram wrote: > Chris Angelico writes: >>sure what your point is. None, False, and True are all keywords, not >>built-ins, so you can't assign to them (any more than you could assign >>to a literal integer). > >

Re: Ideas about how software should behave

2017-11-07 Thread Grant Edwards
On 2017-11-07, Stefan Ram wrote: > Chris Angelico writes: >>sure what your point is. None, False, and True are all keywords, not >>built-ins, so you can't assign to them (any more than you could assign >>to a literal integer). > >|Python 2.6.6

Re: Easiest way to access C module in Python

2017-11-07 Thread bartc
On 07/11/2017 20:08, Gisle Vanem wrote: Lele Gaifax wrote: On my PC, I get the following, using the "-v" option to verbosely see the imported modules: $ $ python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook ... import life dlopen("./life.so", 2);

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-07 Thread Chris Angelico
On Wed, Nov 8, 2017 at 8:16 AM, Ian Kelly wrote: > All of these are things that a linter should probably catch and warn > about. If you had said that the break syntax suggestion was a good > idea but probably better suited as a linter warning than as a > SyntaxError

Re: Easiest way to access C module in Python

2017-11-07 Thread Gisle Vanem
Lele Gaifax wrote: On my PC, I get the following, using the "-v" option to verbosely see the imported modules: $ $ python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook ... import life dlopen("./life.so", 2); import life # dynamically loaded from life.so

[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

Re: Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)

2017-11-07 Thread Ian Kelly
On Tue, Nov 7, 2017 at 12:10 PM, Chris Angelico wrote: > On Wed, Nov 8, 2017 at 4:28 AM, Ian Kelly wrote: >> On Sat, Nov 4, 2017 at 6:40 AM, Chris Angelico wrote: >>> Maybe we're not defending the abuse of other contributors. Maybe

[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

[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: ->

[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

[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

[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

[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 ___

PyDev 6.1.0 Released

2017-11-07 Thread Fabio Zadrozny
PyDev 6.1.0 Release Highlights - *Important* PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. - PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). - *Code Formatter* - The PyDev code formatter can now add/remove blank lines to comply with pep-8.

Re: Easiest way to access C module in Python

2017-11-07 Thread bartc
On 07/11/2017 02:23, Chris Angelico wrote: On Tue, Nov 7, 2017 at 12:52 PM, bartc wrote: Cython seems very confusing to me. Otherwise what /I/ would look for is ways to call C functions inside shared libraries (.dll and .so). That requires that the modules under test

Re: Easiest way to access C module in Python

2017-11-07 Thread Chris Angelico
On Tue, Nov 7, 2017 at 10:06 PM, bartc wrote: > On 07/11/2017 02:23, Chris Angelico wrote: >> >> On Tue, Nov 7, 2017 at 12:52 PM, bartc wrote: > > >>> Cython seems very confusing to me. >> >> > >> >>> Otherwise what /I/ would look for is ways to call C functions

Re: Easiest way to access C module in Python

2017-11-07 Thread Lele Gaifax
bartc writes: > But just staying with the "function with no arguments" for the minute (the > equivalent of Hello World for this exercise), how would it be done in > Cython? Would a working example be simple enough to show in a usenet post? fred.c:: int fred(void) {

[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

Re: Easiest way to access C module in Python

2017-11-07 Thread bartc
On 07/11/2017 12:14, Lele Gaifax wrote: bartc writes: But just staying with the "function with no arguments" for the minute (the equivalent of Hello World for this exercise), how would it be done in Cython? Would a working example be simple enough to show in a usenet post?

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

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

[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 ___

Re: Easiest way to access C module in Python

2017-11-07 Thread Lele Gaifax
bartc writes: > OK, compiling fred.c. Is there a dependency on gcc too? This looks more like > makefile hell. That's pretty standard distutils functionality. I'm pretty sure that on M$Windows it would invoke its C compiler, not gcc. I wrote "fred.c" to get closer to the case

[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.

[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 ___ ___

cx_Oracle 6..0.3

2017-11-07 Thread Anthony Tuininga
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python 3.x and 2.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to

PyDev 6.1.0 Released

2017-11-07 Thread Fabio Zadrozny
PyDev 6.1.0 Release Highlights - *Important* PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. - PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). - *Code Formatter* - The PyDev code formatter can now add/remove blank lines to comply with pep-8.

Re: Easiest way to access C module in Python

2017-11-07 Thread Paul Moore
On 7 November 2017 at 11:16, Chris Angelico wrote: > Thanks for the FUD. I love it when someone, on the basis of one failed > experiment, trash-talks an excellent piece of software that would > solve the OP's problem. It *is* true that the learning curve for Cython is steeper

Re: Easiest way to access C module in Python

2017-11-07 Thread bartc
On 07/11/2017 11:35, Paul Moore wrote: On 7 November 2017 at 11:16, Chris Angelico wrote: Thanks for the FUD. I love it when someone, on the basis of one failed experiment, trash-talks an excellent piece of software that would solve the OP's problem. It *is* true that the

[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. --

[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

[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

[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',

Re: I am trying to delete duplicates but the job just finishes with an exit code 0

2017-11-07 Thread Peter Otten
tysondog...@gmail.com wrote: > I am trying to delete duplicates but the job just finishes with an exit > code 0 and does not delete any duplicates. > > The duplicates for the data always exist in Column F and I am desiring to > delete the entire row B-I > > Any ideas? > > > import openpyxl >

RISE 5.1.0 is out!

2017-11-07 Thread Damián Avila
Howdy all, We're pleased to announce the release of *RISE 5.1.0*! *RISE* allows you show your Jupyter notebooks rendered as an *executable* Reveal.js-based slideshow. It is your very same notebook but presented in a slidy way! You can find more info about the release and the new goodies in this

Re: Easiest way to access C module in Python

2017-11-07 Thread bartc
On 07/11/2017 11:16, Chris Angelico wrote: On Tue, Nov 7, 2017 at 10:06 PM, bartc wrote: My experience is different. Thanks for the FUD. I love it when someone, on the basis of one failed experiment, trash-talks an excellent piece of software that would solve the OP's

[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

[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 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

Re: Easiest way to access C module in Python

2017-11-07 Thread bartc
On 07/11/2017 13:11, bartc wrote: $ python setup.py build_ext --inplace OK, thanks. Although when I get to this bit, my system still says: 17.297 Traceback (most recent call last):   File "setup.py", line 1, in     from distutils.core import setup   Update: if I copy

Re: Easiest way to access C module in Python

2017-11-07 Thread Thomas Jollans
On 2017-11-07 12:53, bartc wrote: > Having > said that, I located pip.exe, trying typing 'pip install cffi' and it > seemed to be doing something but then failed with a bunch of errors.) So you're missing out on all of PyPI? That's tragic. You should really try to fix that. I'm sure people on

[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

[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

Re: Calling of GetVolumeInformation returns empty serial number

2017-11-07 Thread eryk sun
On Tue, Nov 7, 2017 at 7:58 AM, Durumdara wrote: > > I want to get the serial number of the drives (without external modules > like Win32 or WMI). The volume serial number is more easily available as os.stat(drive).st_dev, which comes from calling GetFileInformationByHandle.

[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? --

[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)

[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 ___

  1   2   >