[issue33989] ms.key_compare is not initialized in all paths of list_sort_impl()

2019-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +11996 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33989] ms.key_compare is not initialized in all paths of list_sort_impl()

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ebc793d6acb9650b9f497808e059805892031d74 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-33989: Ensure that ms.key_compare is always initialized in list_sort_impl(). (GH-8710)

[issue26787] test_distutils fails when configured --with-lto

2019-02-20 Thread INADA Naoki
INADA Naoki added the comment: Fixed in bpo-35257 -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nice! This is an example of good microoptimization. The performance gain is tiny (although measurable), but the cost is virtually zero: it does not increase code complexity and does not have side effects. -- resolution: -> fixed stage: patch

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ef1b88bf57aae93893d55f1b9c9639dbe9cc7786 by Serhiy Storchaka (Sergey Fedoseev) in branch 'master': bpo-36062: Minor speed-up for list slicing and copying. (GH-11967)

[issue36060] Document how collections.ChainMap() determines iteration order

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +11995 stage: -> patch review ___ Python tracker ___ ___

[issue31904] Python should support VxWorks RTOS

2019-02-20 Thread Peixing Xin
Change by Peixing Xin : -- pull_requests: +11994 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35822] _queue _queuemodule.c is missing inside the Setup file

2019-02-20 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +11993 stage: -> patch review ___ Python tracker ___ ___

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : list_slice() is used by PyList_GetSlice(), list_subscript() and for list copying. In list_subscript() slice indices are already normalized with PySlice_AdjustIndices(), so slice normalization currently performed in list_slice() is only needed for

[issue29278] Python 3.6 build fails with parallel make

2019-02-20 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2019-02-20 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can not just add .decode('cp437') to arcname. 1. This will fail if the ZIP archive contains file names encoded with UTF-8. They are already unicode and contains non-ascii characters. For decode() they will be implicit encoded to str, that will fail.

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-20 Thread Davin Potts
Davin Potts added the comment: The simpler API is now implemented in GH-11816 as discussed previously. Notably: > * We go with this simpler API: SharedMemory(name=None, create=False, size=0) > * 'size' is ignored when create=False > * create=True acts like O_CREX and create=False only

[issue36059] Update docs for OrderedDict to reflect that regular dicts are ordered

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36059] Update docs for OrderedDict to reflect that regular dicts are ordered

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +11992 stage: -> patch review ___ Python tracker ___ ___

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-20 Thread Eryk Sun
Eryk Sun added the comment: In Windows, the error for a path reparse (e.g. symlink or junction) that can't be resolved is ERROR_CANT_RESOLVE_FILENAME. Another common error is ERROR_INVALID_REPARSE_DATA. This can occur if the reparse data is malformed or if the target device is invalid for

[issue35812] Don't log an exception from the main coroutine in asyncio.run()

2019-02-20 Thread Carlos Damázio
Carlos Damázio added the comment: Hey, Andrew. I'd like to work on the issue, if anyone else hasn't done it yet. -- nosy: +Carlos Damázio ___ Python tracker ___

[issue35995] logging.handlers.SMTPHandler

2019-02-20 Thread lidayan
lidayan <840286...@qq.com> added the comment: 1. When specify the secure flag to the SMTPHandler, means start TLS connection. 2. if SMTP Server not support plaintext mode, but firstly in plaintext mode it is a error -- ___ Python tracker

[issue35995] logging.handlers.SMTPHandler

2019-02-20 Thread lidayan
lidayan <840286...@qq.com> added the comment: And I have changed the code, please help to review, thanks > 在 2019年2月21日,10:08,李大炎 <840286...@qq.com> 写道: > > OK, I got it. > > >> 在 2019年2月14日,16:46,Stéphane Wirtel 写道: >> >> >> Stéphane Wirtel added the comment: >> >> You have a timeout,

[issue20687] Change in expectedFailure breaks testtools

2019-02-20 Thread Cheryl Sabella
Cheryl Sabella added the comment: Larry suggested closing this as wontfix 5 years ago. Since testtools added code for this test and there hasn't been any other changes since, I'll close per his suggestion. -- nosy: +cheryl.sabella resolution: -> wont fix stage: -> resolved

[issue33065] IDLE debugger: failure stepping through module loading

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: A StackOverflow use got the same _ModuleLock message. https://stackoverflow.com/questions/54785596/debugger-in-python-freezes-over-own-built-modules -- ___ Python tracker

[issue31136] raw strings cannot end with a backslash character r'\'

2019-02-20 Thread Graham Wideman
Graham Wideman added the comment: Demonstration: print("x" + r' \' ' + "x") produces x \' x Where is this behavior _ever_ useful? Or if there is some use case for this, how frequent is it compared to the frequency of users expecting either that backslash does nothing special, or that it

[issue31136] raw strings cannot end with a backslash character r'\'

2019-02-20 Thread Graham Wideman
Graham Wideman added the comment: Let us be clear here that this is NOT a case where the backslash escapes the subsequent quote. If it WAS such a case, then the sequence \' would leave only the quote in the output string. But it doesn't; it leaves the complete 2-character \' in the output

[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-20 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11991 stage: -> patch review ___ Python tracker ___ ___

[issue35995] logging.handlers.SMTPHandler

2019-02-20 Thread lidayan
lidayan <840286...@qq.com> added the comment: OK, I got it. > 在 2019年2月14日,16:46,Stéphane Wirtel 写道: > > > Stéphane Wirtel added the comment: > > You have a timeout, maybe you have an issue with your SMTP server. But in > this case, it's not an issue with Python. > > -- > nosy:

[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-20 Thread Shane Lee
New submission from Shane Lee : Python 2.7.15 (probably affects newer versions as well) Given an archive with any number of files inside that have non-ascii characters in their filename `zipfile` will crash when extracting them to the file system. ``` Traceback (most recent call last):

[issue22865] Document how to make pty.spawn not copy data

2019-02-20 Thread Cheryl Sabella
Cheryl Sabella added the comment: @RadicalZephyr, are you interested in making a GitHub pull request with the recommended the documentation change? -- nosy: +cheryl.sabella versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5, Python 3.6

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2019-02-20 Thread py.user
py.user added the comment: @Cheryl Sabella, I guess Manjusaka has done it already and this looks fine. -- ___ Python tracker ___

[issue22707] Idle: changed options should take effect immediately

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Turning extensions into features #27099 fixed many (all?) unnecessary delays but a few things should be checked, and the help texts reviewed. -- versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 ___ Python

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-20 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +11990 stage: -> patch review ___ Python tracker ___ ___

[issue22629] Idle: update htest.py and htests

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: As far as I can tell, the entire diff in @htest-34-2.diff was pushed. My comment about 'up to first line of grep' was correct alphabetically but confusing because files with a '# htest #' section were not completely alphabetical in the file. I need to

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2019-02-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- pull_requests: +11989 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22705] Idle extension configuration: add option-help option

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27099 (converting built-in extensions to features) made this less important. But it is still relevant to actual extensions. There is a dummy extension, zzdummy, for testing. -- stage: needs patch -> patch review versions: +Python 3.8 -Python 2.7,

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Emmanuel, feel free to review the PR and make suggestions. -- ___ Python tracker ___ ___

[issue36060] Document how collections.ChainMap() determines iteration order

2019-02-20 Thread Raymond Hettinger
New submission from Raymond Hettinger : Am working on a PR for this now. Prior to regular dicts becoming ordered, the was no expectation for ChainMap() to have any particular order. Now that such an expectation might exist, I need to document what ChainMap() does and perhaps why it does it.

[issue22706] Idle extension configuration and key bindings

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27099 (converting built-in extensions to features) made this less important. But it is still relevant to actual extensions. There is a dummy extension, zzdummy, for testing. -- stage: needs patch -> patch review versions: +Python 3.8 -Python 2.7,

[issue36059] Update docs for OrderedDict to reflect that regular dicts are ordered

2019-02-20 Thread Raymond Hettinger
New submission from Raymond Hettinger : Am working on a PR for this now. The goals are to clarify the distinction between OrderedDict and regular dict, to remove outdated examples that no longer are the best way to solve a problem, and to move, and to add examples where OrderedDict will

[issue22704] Review extension enable options

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #27099 converted extensions to features always enabled for when they apply to. -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Emmanuel Arias
Emmanuel Arias added the comment: > Sorry, I've already assigned this to myself. Ah!! sorry sorry! -- ___ Python tracker ___ ___

[issue14929] IDLE crashes on *Edit / Find in files ...* command

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Opened #36058 for followup. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed superseder: -> Improve file decoding before re.search versions: -Python 3.5 ___ Python tracker

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +11988 stage: -> patch review ___ Python tracker ___ ___

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I will take it :-) Sorry, I've already assigned this to myself. -- ___ Python tracker ___

[issue36058] Improve file decoding before re.search

2019-02-20 Thread Terry J. Reedy
New submission from Terry J. Reedy : Spin-off from #14929, which fixed crash. From msg161754: "The default extension is .py. The default encoding for .py files is utf-8. I think that is the default for what Idle writes. So I think this should be the default encoding (explicitly given) at

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Emmanuel Arias
Change by Emmanuel Arias : -- components: +Documentation ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hi! I will take it :-) -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-20 Thread Raymond Hettinger
New submission from Raymond Hettinger : When dicts became ordered, counters became ordered as well. Update the docs and tests to reflect that fact. -- assignee: rhettinger components: Tests messages: 336156 nosy: rhettinger priority: normal severity: normal status: open title: Add

[issue13659] Add a help() viewer for IDLE's Shell.

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #1529353 added squeezer, making this alternative unnecessary. Once squeezed, output can be opened in a text viewer. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed superseder: -> Squeezer - squeeze large output

[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2019-02-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #34313 reports problems with multiprocessing when using at least some versions of tkinter on some versions of macOS. -- versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker

[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 14baf06febb9194dd76f694ec359ce94708ed861 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960) (GH-11961)

[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +11987 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread miss-islington
miss-islington added the comment: New changeset 9b0c681e2d7e708a07e34d9c08e4424bdd4f5ebc by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)

[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +11986 stage: -> patch review ___ Python tracker ___ ___

[issue36046] support dropping privileges when running subprocesses

2019-02-20 Thread Alexey Izbyshev
Change by Alexey Izbyshev : -- nosy: +izbyshev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36056] importlib does not support pathlib

2019-02-20 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> not a bug type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-20 Thread Brett Cannon
Brett Cannon added the comment: And I don't know what a good solution would be. :) I.e. should some other exception be raised? Should it be ignored? I just don't know personally. -- ___ Python tracker

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-20 Thread Brett Cannon
Brett Cannon added the comment: I consider this an enhancement since you do have a loop in your symlinks and so having it not exactly work isn't totally shocking. But that doesn't mean that if someone can come up with a reasonable solution to fixing this annoyance it woudn't be accepted or

[issue36054] Way to detect CPU count inside docker container

2019-02-20 Thread Keir Lawson
Keir Lawson added the comment: I believe this is related to this ticket: https://bugs.python.org/issue26692 Looking at Java's implementation it seems like they are checking if cgroups are enabled via /proc/self/cgroup and then if it is parsing the cgroup information out of the filesystem.

[issue36054] Way to detect CPU count inside docker container

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ok, I didn't see your test with openjdk:10, sorry -- ___ Python tracker ___ ___ Python-bugs-list

[issue29757] The loop in utility `socket.create_connection()` swallows previous errors

2019-02-20 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36029] Use consistent case for HTTP header fields

2019-02-20 Thread Brett Cannon
Brett Cannon added the comment: As stated on the PR, changing the code isn't going to be worth it, but updating the docs would be nice. -- ___ Python tracker ___

[issue36054] Way to detect CPU count inside docker container

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: so, I have also tested with the last docker image of golang. > docker run --rm --cpus 1 -it golang /bin/bash here is the code of golang: package main import "fmt" import "runtime" func main() { cores := runtime.NumCPU() fmt.Printf("This

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2019-02-20 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35840] Control flow inconsistency on closed asyncio stream

2019-02-20 Thread Emmanuel Arias
Emmanuel Arias added the comment: I think that this issue is just for Windows right? I add Windows to required a Windows' dev. -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi @rhettinger and @serhiy Really sorry, I did not see that I have re-opened the issue. -- ___ Python tracker ___

[issue36056] importlib does not support pathlib

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I close this issue, it's not a bug. -- nosy: +matrixise status: open -> closed ___ Python tracker ___

[issue36030] add internal API function to create tuple without items array initialization

2019-02-20 Thread Sergey Fedoseev
Sergey Fedoseev added the comment: Here's benchmarks for PyTuple_FromArray() PR: $ python -m perf timeit -s "l = [None]*0; tuple_ = tuple" "tuple_(l)" --duplicate=100 --compare-to=../cpython-master/venv/bin/python /home/sergey/tmp/cpython-master/venv/bin/python: . 50.5

[issue36056] importlib does not support pathlib

2019-02-20 Thread Dylan Lloyd
Dylan Lloyd added the comment: Whoops, yes, that of course makes sense. My mistake. Thanks! -- resolution: not a bug -> status: closed -> open type: enhancement -> ___ Python tracker

[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2019-02-20 Thread Diego Rojas
Change by Diego Rojas : -- components: +Extension Modules -Library (Lib), Unicode type: enhancement -> behavior versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.8 ___ Python tracker

[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-20 Thread Steve Dower
Steve Dower added the comment: Start by just deleting the definitions in pyerrors.h, and see where the build fails. Then either switch those to use PyOS_snprintf (best), or add the #ifndef checks in the source files (not header files) that need them. Be aware that we shouldn't backport the

[issue36056] importlib does not support pathlib

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Berker. Since the argument of importlib.import_module() is not a path, pathlib.Path is not valid here. It is uncommon in Python to check the type of arguments explicitly. pathlib.Path is not more special than list or tkinter.Button.

[issue36056] importlib does not support pathlib

2019-02-20 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +remi.lapeyre status: pending -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36056] importlib does not support pathlib

2019-02-20 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, but importlib.import_module() doesn't accept a path of a Python module: https://docs.python.org/3/library/importlib.html#importlib.import_module So, the correct way to use the API is: import importlib

[issue36056] importlib does not support pathlib

2019-02-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is also present in 3.7 and 3.8. I would look at it and propose a patch tomorrow. -- nosy: +remi.lapeyre versions: +Python 3.7, Python 3.8 ___ Python tracker

[issue36056] importlib does not support pathlib

2019-02-20 Thread Dylan Lloyd
New submission from Dylan Lloyd : ``` ❯ python -c 'import pathlib; import importlib; importlib.import_module(pathlib.Path("poc.py"))' Traceback (most recent call last): File "", line 1, in File "~/.conda/envs/py3.6/lib/python3.6/importlib/__init__.py", line 117, in import_module if

[issue36046] support dropping privileges when running subprocesses

2019-02-20 Thread SilentGhost
Change by SilentGhost : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Mark Dickinson
Mark Dickinson added the comment: This isn't a bug: floating-point arithmetic is by its nature approximate, and two sequences of operations that would mathematically give the same result need not give the same result with floating-point. I'd recommend a read of this portion of the tutorial,

[issue35828] test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error

2019-02-20 Thread Michael Felt
Michael Felt added the comment: Also - this looks like a core dump was 'seen', but later removed. Warning -- files was modified by test_multiprocessing_forkserver Before: [] After: ['core'] What can I change so that ot does not cleanup the core file? --

[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35828] test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error

2019-02-20 Thread Michael Felt
Michael Felt added the comment: Another message that surprises me is: Warning -- multiprocessing.process._dangling was modified by test_multiprocessing_spawn Before: <_weakrefset.WeakSet object at 0x3076e810> After: <_weakrefset.WeakSet object at 0x3076e390> Normally speaking the

[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Marcelo Marotta
New submission from Marcelo Marotta : Steps to reproduce the error >>> import math >>> 1/math.log(math.pow(30,0.5),2) == 2/math.log(30,2) True >>> 1/math.log(math.pow(9,0.5),2) == 2/math.log(9,2) True >>> 1/math.log(math.pow(15,0.5),2) == 2/math.log(15,2) True >>> 1/math.log(math.pow(8,0.5),2)

[issue35828] test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error

2019-02-20 Thread Michael Felt
Michael Felt added the comment: I am still trying to get further with this, but I won't get far enough without some help on how to best dig deeper. For one, it should be leaving a core dump, but it never seems to leave the core dump in the working directory. I know it is doing core dump

[issue36027] Support negative exponents in pow() where a modulus is specified.

2019-02-20 Thread Berry Schoenmakers
Berry Schoenmakers added the comment: In pure Python this seems to be the better option to compute inverses: def modinv(a, m): # assuming m > 0 b = m s, s1 = 1, 0 while b: a, (q, b) = b, divmod(a, b) s, s1 = s1, s - q * s1 if a != 1: raise

[issue36012] Investigate slow writes to class variables

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue34464] There are inconsitencies in the treatment of True, False, None, and __debug__ keywords in the docs

2019-02-20 Thread R. David Murray
Change by R. David Murray : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36012] Investigate slow writes to class variables

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset d8b9e1fc2e45d2bc3f4a9737c375f2adb8a8c7de by Raymond Hettinger (Stefan Behnel) in branch 'master': bpo-36012: Avoid linear slot search for non-dunder methods (GH-11907)

[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: > It has not yet been decided whether to expose the content > of the queue in its repr at all. There is no public API for > accessing the content of the queue without removing items > from the queue, and I think it is intentional. I agree with Serhiy.

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2019-02-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: > I am not sure what to with the int constructor. Should it try __index__ > before __int__? Or just make __index__ without __int__ setting the nb_int > slot as was proposed by Nick in issue33039? Shouldn't it try only __int__ since this will default to

[issue36054] Way to detect CPU count inside docker container

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I would like to work on this issue. -- nosy: +matrixise ___ Python tracker ___ ___

[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you treat the "queue" attribute as a part the public API, just use repr(q.queue) instead of repr(q). -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36052] Assignment operator allows to assign to __debug__

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Thank you Pablo, if I see you at PyCon, maybe we could drink a good beer ;-) -- ___ Python tracker ___

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-20 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I totally agree with Serhiy -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi @rhettinger Thank you for the review of this issue. -- resolution: rejected -> stage: resolved -> patch review status: closed -> open ___ Python tracker

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't like complicating the code and adding a performance penalty to support such uncommon case. The documentation for __class_getitem__ precisely describes the current behavior: "when defined in the class body, this method is implicitly a class

[issue36039] Replace append loops with list comprehensions

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with all the other -1 comments and will mark this a closed. FWIW, we generally discourage sweeping across the library with minor rewrites. Guido articulated a principle of "holistic refactoring" where we make code improvements while working on

[issue36052] Assignment operator allows to assign to __debug__

2019-02-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: When I started working on this I did not notice the extra comments here. I will close my PR so Stéphane can do the PR. -- nosy: +pablogsal ___ Python tracker

[issue36052] Assignment operator allows to assign to __debug__

2019-02-20 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- pull_requests: +11985 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35956] Sort documentation could be improved for complex sorting

2019-02-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Zahash Z] (Zahash Z)] > If you look at the queue.PriorityQueue class, there is > self.queue = [ ]. We really don't want to expose the internals here. They are subject to change and access to them is guarded by locks. > It has not yet been decided

  1   2   >