[issue27181] Add geometric mean to `statistics` module

2016-07-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to see them spelled-out: geometric_mean and harmonic_mean -- ___ Python tracker ___

[issue27181] Add geometric mean to `statistics` module

2016-07-08 Thread Steven D'Aprano
Steven D'Aprano added the comment: Does anyone have any strong feeling about the name for these functions? gmean and hmean; geometric_mean and harmonic_mean And "subcontrary_mean" is not an option :-) -- ___ Python tracker

[issue27471] sre_constants.error: bad escape \d

2016-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a deprection warning in 3.5. $ python3.5 -Wd >>> import re >>> re.sub(re.escape(r'(\d+?)'), '(?:\d+?)', r'(\d+?)') /usr/lib/python3.5/re.py:182: DeprecationWarning: bad escape \d return _compile(pattern, flags).sub(repl, string, count) '(?:\\d+?)'

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread Connor Wolf
Connor Wolf added the comment: > Python 3.5.1+ (default, Mar 30 2016, 22:46:26) Whatever the stock 3.5 on ubuntu 16.04 x64 is. I've actually been running into a whole horde of really bizarre issues related to what I /think/ is locking in stdout. Basically, I have a context where I have

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: My intent is not to block anything. I'm Just explaining why I'm not motivated to spend much time on this issue myself. Others are welcome to. subprocess is not related to this issue, it has been fixed for use with threads (in 3.2 and higher) with an

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread lesha
lesha added the comment: On a moment's reflection, a lot of my prior comment is wrong. Sorry about that. - glog does not, that I know of, sanitize locks on fork. You just shouldn't log after fork but before exec. - Using `pthread_atfork` to clean up the `logging` lock might be enough to make

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread lesha
lesha added the comment: I work on a multi-million-line C++ codebase that uses fork() from multithreaded programs all over the place. We use `glog` ubiquitously. This bug here that spans 6 years and has affected dozens of people (conservatively) simply does not exist for us. That is because

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread Connor Wolf
Connor Wolf added the comment: Arrrgh, s/threading/multiprocessing/g in my last message. -- ___ Python tracker ___

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread Connor Wolf
Connor Wolf added the comment: > IMNSHO, working on "fixes" for this issue while ignoring the larger > application design flaw elephant in the room doesn't make a lot of sense. I understand the desire for a canonically "correct" fix, but it seems the issue with fixing it "correctly" has lead

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: For me the momentum on fixing these things has stalled because I no longer work on any code that runs into this. There is a fundamental problem: You cannot safely use threading and os.fork() in the same application per POSIX rules. So even if the standard

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-08 Thread Eryk Sun
Eryk Sun added the comment: On second thought, it occurred to me that the problem isn't in Explorer or shell32, but in the drop handler. It turns out the problem is that the drop handler calls the ANSI API DragQueryFileA instead of DragQueryFileW. To see this I attached a debugger to Explorer

[issue6721] Locks in the standard library should be sanitized on fork

2016-07-08 Thread Connor Wolf
Connor Wolf added the comment: Is anything happening with these fixes? This is still an issue (I'm running into it now)? -- nosy: +Connor.Wolf ___ Python tracker

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2016-07-08 Thread Eryk Sun
Eryk Sun added the comment: I'm surprised it's not documented for the types module: https://docs.python.org/3.5/library/types.html#types.MethodType At least the docstring has the parameters: >>> print(types.MethodType.__doc__) method(function, instance) Create a bound

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Stefan Krah added the comment: I guess so. Our Rietveld setup apparently has some heuristics that work best when you're on the default branch and completely synced with the main repo. -- ___ Python tracker

[issue27471] sre_constants.error: bad escape \d

2016-07-08 Thread R. David Murray
R. David Murray added the comment: It's just supposed to be a warning at this point, though, so this looks like a bug. -- nosy: +r.david.murray ___ Python tracker

[issue27471] sre_constants.error: bad escape \d

2016-07-08 Thread Matthew Barnett
Matthew Barnett added the comment: There's a move to treat invalid escape sequences as an error (see issue 27364). The previous behaviour was to treat them as literals. The replacement template string contains \d, which is not a valid escape sequence (it's valid for the pattern, but not the

[issue27471] sre_constants.error: bad escape \d

2016-07-08 Thread Noah Petherbridge
New submission from Noah Petherbridge: I found a bug in Python 3.6.0a2 that wasn't present on previous versions of Python concerning the "\d" escape sequence as used in the following regular expression: import re s = "hello" s = re.sub(re.escape(r'(\d+?)'), '(?:\d+?)', s) (The purpose of

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-08 Thread Eryk Sun
Eryk Sun added the comment: Nothing can be done about this from Python. It's a bug in how Explorer handles the dropped filename. Note that it's not simply replacing Unicode characters with question marks. It's using a best-fit ANSI encoding. For example, codepage 1252 maps "Ā" to "A". If

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Xavier de Gaye
Xavier de Gaye added the comment: Thanks Berker and Stefan for your help on 'hg diff --git'. Yes Stefan, maybe your patch has a [review] button because Rietveld found that your patch applied cleanly against the head of the default branch at the time you have submitted it, so it could guess

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2016-07-08 Thread Daniel Holth
Daniel Holth added the comment: This bit me also. Is there other documentation for how many arguments MethodType() should take? -- nosy: +dholth ___ Python tracker

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-07-08 Thread Oren Milman
Oren Milman added the comment: That's awesome! Thanks :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue20842] pkgutil docs should reference glossary terms not PEP 302

2016-07-08 Thread Oren Milman
Oren Milman added the comment: Note that http://bugs.python.org/issue26896 is now closed (the patches proposed in it (with some minor changes) were committed). -- nosy: +Oren Milman ___ Python tracker

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-08 Thread Steve Piercy
Steve Piercy added the comment: Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26415] Excessive peak memory consumption by the Python parser

2016-07-08 Thread A. Skrobov
A. Skrobov added the comment: Fixing whitespace in the patch, and including an update for the docs -- Added file: http://bugs.python.org/file43664/patch ___ Python tracker

[issue26972] mistakes in docstrings in the import machinery

2016-07-08 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Oren! The only real change I made was to make sure the the one-sentence summary at the start of the docstring fit on a single line (when it spans line it can muck up editors and tools). -- resolution: -> fixed stage: patch review

[issue26415] Excessive peak memory consumption by the Python parser

2016-07-08 Thread A. Skrobov
Changes by A. Skrobov : Added file: http://bugs.python.org/file43665/devguide_patch ___ Python tracker ___

[issue26972] mistakes in docstrings in the import machinery

2016-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d32517de5d8c by Brett Cannon in branch 'default': Issue #26972: Fix some mistakes in importlib-related docstrings. https://hg.python.org/cpython/rev/d32517de5d8c -- nosy: +python-dev ___ Python tracker

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-07-08 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Oren! Only change I made was deleting the lines you commented out in the tests. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset c65f34dafcc1 by Brett Cannon in branch 'default': Issue #26896: Disambiguate uses of "importer" with "finder". https://hg.python.org/cpython/rev/c65f34dafcc1 -- nosy: +python-dev ___ Python tracker

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-08 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the patch, Steve! I went ahead and got this done now when I realized your patch touched so many files, thus waiting could lead to skew and the need to update the patch needlessly. -- resolution: -> fixed stage: needs patch -> resolved

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 414f67e000a7 by Brett Cannon in branch 'default': Issue #27285: Document the deprecation of the pyvenv script. https://hg.python.org/cpython/rev/414f67e000a7 -- nosy: +python-dev ___ Python tracker

[issue27468] Erroneous memory behaviour for objects created in another thread

2016-07-08 Thread Emanuel Barry
Changes by Emanuel Barry : -- resolution: -> not a bug stage: -> resolved ___ Python tracker ___

[issue27468] Erroneous memory behaviour for objects created in another thread

2016-07-08 Thread Adria Garriga
Adria Garriga added the comment: Yes, that seems to be it. Storing info in the Thread object is just for the sake of keeping the example short, but the error is the same you pointed out. Thank you very much and I hope I didn't waste too much of your time! -- status: open -> closed

[issue27468] Erroneous memory behaviour for objects created in another thread

2016-07-08 Thread Peter Otten
Peter Otten added the comment: Your code relies on the assumption that when the lambda is invoked the global t is still bound to the Thread instance you are starting. It seems that this is not always the case, and I don't see why it should be guaranteed either. I don't know whether it's a good

[issue27470] -3 commandline option documented differently via man

2016-07-08 Thread Matthew Gilson
New submission from Matthew Gilson: The man page for python says: > Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. The official documentation (https://docs.python.org/2/using/cmdline.html#cmdoption-3) does not mention 2to3 at all: > Warn about Python 3.x possible

[issue22624] Bogus usage of floatclock in timemodule

2016-07-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1452520dfe7b by Victor Stinner in branch 'default': Issue #22624: Python 3 requires clock() to build https://hg.python.org/cpython/rev/1452520dfe7b -- nosy: +python-dev ___ Python tracker

[issue17213] ctypes loads wrong version of C runtime, leading to error message box from system

2016-07-08 Thread Keno Fischer
Keno Fischer added the comment: pyzmq has a similar issue. I believe one solution would be to call `_Py_ActivateActCtx` in ctypes' load_library, i.e. do ``` #if HAVE_SXS ULONG_PTR cookie = _Py_ActivateActCtx(); #endif hMod = LoadLibraryW(name); #if HAVE_SXS

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-08 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list

[issue27469] Unicode filename gets crippled on Windows when drag and drop

2016-07-08 Thread Adam Bartoš
New submission from Adam Bartoš: When a Python script is run by drag-and-dropping another file on it in Windows explorer, the other file's path becomes sys.argv[1]. However, when the path contains a Unicode characters (e.g. α), it gets crippled – it is replaced by ordinary question mark.

[issue22624] Bogus usage of floatclock in timemodule

2016-07-08 Thread STINNER Victor
STINNER Victor added the comment: Sorry but the Wii console is not supported. You have to maintain your fork/patch. Python 3 don't support platforms without clock(). -- resolution: -> wont fix status: open -> closed ___ Python tracker

[issue27468] Erroneous memory behaviour for objects created in another thread

2016-07-08 Thread Adria Garriga
New submission from Adria Garriga: I create several objects in the main thread, and then spawn several threads that "take ownership" of one object each. Within that thread, the objects' attributes' values are not consistent. The bug only happens sometimes. from threading import Thread import

[issue27466] [Copy from github user macartur] time2netscape missing comma

2016-07-08 Thread Robby Daigle
Robby Daigle added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27468] Erroneous memory behaviour for objects created in another thread

2016-07-08 Thread Adria Garriga
Changes by Adria Garriga : Removed file: http://bugs.python.org/file43663/test.py ___ Python tracker ___

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-07-08 Thread Oren Milman
Oren Milman added the comment: I am sorry, but I can't see why micro-benchmarking is needed here, as my patches only remove code that does nothing, while they don't add any new code. The assembly the compiler generates (on my PC) for 'Py_SIZE(v) = negative ? -ndigits : ndigits;' in

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-07-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file43662/patchedCPythonTestOutput_ver2.txt ___ Python tracker ___

[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2016-07-08 Thread Марк Коренберг
Марк Коренберг added the comment: Also, it should be marked explicitly, if cross-type lookup is safe. I mean code like that: some_net = ipaddress.ip_network(some_input1) some_addr = ipaddress.ip_address(some_input2) return some_addr in some_net Is it safe to write such code? Docs

[issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs

2016-07-08 Thread Марк Коренберг
Марк Коренберг added the comment: see also issue20446 -- nosy: +mmarkk ___ Python tracker ___ ___

[issue20446] ipaddress: hash similarities for ipv4 and ipv6

2016-07-08 Thread Марк Коренберг
Марк Коренберг added the comment: See also issue20446 -- nosy: +mmarkk ___ Python tracker ___ ___

[issue20446] ipaddress: hash similarities for ipv4 and ipv6

2016-07-08 Thread Марк Коренберг
Марк Коренберг added the comment: Sorry. See also issue27269 -- ___ Python tracker ___ ___ Python-bugs-list

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Stefan Krah added the comment: Good point about Misc/NEWS: I just regenerated the patch mindlessly to check the "diff --git" situation :) Actually, Xavier, it's often better to leave out the NEWS section in the bug tracker patches and just add it before pushing. Perhaps Rietveld choked on the

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread STINNER Victor
STINNER Victor added the comment: issue27442-3.patch: be careful, the new item in Misc/NEWS is not at the top of its section. Moreover, I still consider that the unit test is risky and not really needed (just remove it). Good job, there is now a [review] button :-) --

[issue27464] Document that SplitResult & friends are namedtuples

2016-07-08 Thread SilentGhost
Changes by SilentGhost : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> needs patch versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Stefan Krah added the comment: I did "hg pull -u" before re-generating the diff. Other than that, sometimes newer mercurial versions behave better (I have 2.8.2). -- ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-08 Thread Stefan Krah
Changes by Stefan Krah : Added file: http://bugs.python.org/file43660/issue27442-3.patch ___ Python tracker ___

[issue27467] distutils.config API different between <=3.5.1 and 3.5.2

2016-07-08 Thread Berker Peksag
Berker Peksag added the comment: I was thinking to document issue 20120 in Misc/NEWS. It turns out I was looking at the wrong commit and it was already documented in eae59b6bf133. -- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed

[issue27467] distutils.config API different between <=3.5.1 and 3.5.2

2016-07-08 Thread Xiang Zhang
Xiang Zhang added the comment: Berker, what doc needs to be changed? Although RawConfigParser is legacy but that does not mean it's deprecated, right? We can still use it although the doc suggests us use ConfigParser. -- ___ Python tracker

[issue11027] Implement sectionxform in configparser

2016-07-08 Thread Berker Peksag
Berker Peksag added the comment: Issue 26537 is a duplicate of this one but it has an up-to-date and more complete patch so I'm going to close this one. -- nosy: +berker.peksag resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> ConfigParser

[issue27467] distutils.config API different between <=3.5.1 and 3.5.2

2016-07-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. Yes, the RawConfigParser change was intentional and it was discussed in issue 20120. I'm marking this as a documentation issue. -- assignee: -> docs@python components: +Documentation nosy: +berker.peksag, docs@python stage: ->

[issue27467] distutils.config API different between <=3.5.1 and 3.5.2

2016-07-08 Thread Xiang Zhang
Xiang Zhang added the comment: I think it's intentional. You can see issue20120. -- nosy: +xiang.zhang ___ Python tracker ___