[issue36387] Refactor getenvironment() in _winapi.c

2019-03-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.8 -Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue36346] Prepare for removing the legacy Unicode C API

2019-03-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Refactor getenvironment() in _winapi.c ___ Python tracker ___ ___ Python-bugs-list ma

[issue36387] Refactor getenvironment() in _winapi.c

2019-03-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Function getenvironment() in Modules/_winapi.c is used for converting the environment mapping to the wchar_t string for passing to CreateProcessW(). It performs the following steps: * Allocate a Py_UCS4 buffer and copy all keys and values, converting the

[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-03-20 Thread Cameron Simpson
Cameron Simpson added the comment: I've withdrawn the PR; I hadn't run the full test suite and there are things to fix. - Cameron -- ___ Python tracker ___ __

[issue28514] Python (IDLE?) freezes on file save on Windows

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-

[issue18316] Idle 2.7: update to simplify cross-version patches

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue27372] Test_idle should stop changing locale

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue33950] IDLE htest: remove spec for deleted tabbedpages.py

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue36323] IDLE: always display full grep path

2019-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. I somehow never marked it for IDLE. Using groupby components, I discovered another +-10 and marked them and included in my list. -- ___ Python tracker ___

[issue36385] Add ``elif`` sentence on to avoid multiple ``if``

2019-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch. -- nosy: +rhettinger resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36385] Add ``elif`` sentence on to avoid multiple ``if``

2019-03-20 Thread miss-islington
miss-islington added the comment: New changeset ed5e29cba500c2336aacdb7c77953f1064235b72 by Miss Islington (bot) (Emmanuel Arias) in branch 'master': bpo-36385: Add ``elif`` sentence on to avoid multiple ``if`` (GH-12478) https://github.com/python/cpython/commit/ed5e29cba500c2336aacdb7c77953f

[issue36312] Invalid flag for some code page decoders

2019-03-20 Thread miss-islington
miss-islington added the comment: New changeset 74829b7323642739cdc439c2c88d406daf92075b by Miss Islington (bot) in branch '3.7': bpo-36312: Fix decoders for some code pages. (GH-12369) https://github.com/python/cpython/commit/74829b7323642739cdc439c2c88d406daf92075b -- nosy: +miss-

[issue36386] segfault on PyUnicode_DecodeFSDefaultAndSize for uninitialized Py

2019-03-20 Thread anthony shaw
New submission from anthony shaw : If for whatever reason, Py_Initialize() has not been run or failed to run, any call to Py_CompileStringFlags will call PyUnicode_DecodeFSDefault and the reference to interp will be NULL. There is currently no null reference check in PyUnicode_DecodeFSDefault

[issue14934] generator objects can clear their weakrefs before being resurrected

2019-03-20 Thread Windson Yang
Windson Yang added the comment: The fixed looks easy, we call `PyObject_CallFinalizerFromDealloc` before PyObject_ClearWeakRefs. But I can't come up with the use case for testing when generator resurrects from `PyObject_CallFinalizer`. Any ideas? -- _

[issue36385] Add ``elif`` sentence on to avoid multiple ``if``

2019-03-20 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +12430 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue36385] Add ``elif`` sentence on to avoid multiple ``if``

2019-03-20 Thread Emmanuel Arias
New submission from Emmanuel Arias : Currently, when arguments on Parser/asdl_c.py are parsed ìf sentence is used. This PR(https://github.com/python/cpython/pull/12478) Propose to use elif to avoid multiple evaluting of the ifs. -- messages: 338519 nosy: eamanu priority: normal severity

[issue36355] Remove documentation and internal use of the *RESTRICTED constants for PyMemberDef's flags field

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: Sorry, that should have been "it gives the impression they do something when reading the *source code*" -- ___ Python tracker ___ __

[issue36355] Remove documentation and internal use of the *RESTRICTED constants for PyMemberDef's flags field

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: Yes, they're set. They're never *read* anywhere. My suggestion was to stop setting them (because it gives the impression they do something when reading the docs, when in fact they do nothing), and remove them from the docs. -- __

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: Hum, after reading again my previous, I'm not sure that my intent was clear. I'm fine with Stefan rejecting the optimization. He is the maintainer of decimal. I just wanted to comment what he said ;-) -- ___ Pytho

[issue36256] parser module fails on legal input

2019-03-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +12429 stage: -> patch review ___ Python tracker ___ ___ Pytho

[issue36085] Enable better DLL resolution

2019-03-20 Thread Steve Dower
Steve Dower added the comment: I think we'll be keeping Win7 with the KB. However, we've discovered in the PR that changing the default DLL lookup may cause Python to crash when accessing HKEY_PERFORMANCE_DATA (which fails to delay-load a DLL). This occurs because accessing that key enumerat

[issue36384] ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal

2019-03-20 Thread Joel Croteau
New submission from Joel Croteau : I understand to a certain extent the logic in not allowing IPv4 octets that might ambiguously be octal, but in practice, it just seems like it creates additional parsing hassle needlessly. I have never in many years of working on many networked systems seen

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: > Also, the performance improvements are in argument parsing, but not when you > have numerical code like a * b, where a and b are already decimals. If the function call takes around 100 ns, the benefit of FASTCALL and the new more efficient function to par

[issue7936] sys.argv contains only scriptname

2019-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing this because there is no identifiable issue with the current installers. Initial issues were reported fixed. The most recent issue reported by Alecz was that installing 2.7 after 3.4 caused python files to be opened by 2.7. This is what shoul

[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2019-03-20 Thread Christoph Reiter
Change by Christoph Reiter : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue36324] Inverse cumulative normal distribution function

2019-03-20 Thread miss-islington
miss-islington added the comment: New changeset 2afb59861827a23c1b50e44022bb77291351c2f1 by Miss Islington (bot) (Raymond Hettinger) in branch 'master': bpo-36324: NormalDist() add more tests and update comments (GH-12476) https://github.com/python/cpython/commit/2afb59861827a23c1b50e44022bb7

[issue31753] Unnecessary closure in ast.literal_eval

2019-03-20 Thread Aaron Hall
Aaron Hall added the comment: No need to keep this open, I agree with the core developers this shouldn't be changed. -- status: open -> closed ___ Python tracker ___

[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2019-03-20 Thread Aaron Hall
Change by Aaron Hall : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36324] Inverse cumulative normal distribution function

2019-03-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +12428 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2019-03-20 Thread Cheryl Sabella
Cheryl Sabella added the comment: Since there's a `self.menudict` in the editor, I wonder if this was intended for that. The `self.menudict` is used in `ApplyKeyBindings`, which is called when the key bindings change in configdialog. So, if the mac OS menu isn't added to `self.menudict`, d

[issue36285] Integer overflow in array.array.remove()

2019-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset aa3ecb80416958eb6fe8cc1b0dfbbfdfbcccead1 by Serhiy Storchaka (sth) in branch 'master': bpo-36285: Fix integer overflow in the array module. (GH-12317) https://github.com/python/cpython/commit/aa3ecb80416958eb6fe8cc1b0dfbbfdfbcccead1

[issue36312] Invalid flag for some code page decoders

2019-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c1e2c288f41cdc1c6e6e09d9a5277a58232ceb03 by Serhiy Storchaka in branch 'master': bpo-36312: Fix decoders for some code pages. (GH-12369) https://github.com/python/cpython/commit/c1e2c288f41cdc1c6e6e09d9a5277a58232ceb03 -- __

[issue36312] Invalid flag for some code page decoders

2019-03-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +12427 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30869] IDLE: Don't touch .idlerc when testing.

2019-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed PR 2614 in response to Victor's comments, in particular his preference that tests not even read .idlerc. Since we do not want tests to depend on the contents, there is no need to even read the contents. (And the exception of testing write-read rou

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the promised semantics of saturating arithmetic require that _keep_positive be run on entire the entire counter: >>> c1 = Counter(a=-3, b=4) >>> +c1 Counter({'b': 4}) >>> from collections import Counter >>> c1 = Counter(a=-3, b=4

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Stefan Krah
Change by Stefan Krah : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: Ok, got it. I think __ipow__ should be a ternaryfunc, like so: diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 403f3caaee..914d076b5c 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -7032,7 +7032,7 @@ static slotdef slotdefs[] = {

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Zuzu_Typ
Zuzu_Typ added the comment: This isn't about the CPython Interpreter, it's about the C-API, the APIT for writing c-extensions for Python. I know it works in CPython. -- ___ Python tracker _

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: Like Josh I don't quite understand the problem description. This for example works: >>> class C(int): ... def __ipow__(self, other, mod=None): ... return pow(self, other, mod) ... >>> >>> x = C(10) >>> x 10 >>> x **= 3 >>> x 1000 -- nosy: +

[issue35866] concurrent.futures deadlock

2019-03-20 Thread Hugh Redelmeier
Hugh Redelmeier added the comment: @jwilk: thanks for creating cf-deadlock.py I can replicate the test program hang on Fedora 29 with python3-3.7.2-4.fc29.x86_64 The test program hasn't yet hung on Fedora 29 with older packages, in particular python3-3.7.1-4.fc29.x86_64 My interest is due

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Zuzu_Typ
Zuzu_Typ added the comment: Even though __ipow__ might be documented to take a third argument, if you build an inplace_pow function using the C-API, you can only pass one argument to it. You can see that in the attached screenshot. The example class shown in the screenshot can be found here:

[issue14944] Setup & Usage documentation for pydoc, IDLE, & 2to3

2019-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: idle.html, derived from idle.rst, is now the IDLE help file. pip also has pip3 command; perhaps ensurepip should be mentioned. -- versions: +Python 3.8 -Python 3.6 ___ Python tracker

[issue36370] Check for PyErr_Occurred() after PyImport_GetModule().

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: Actually I just see that this behavior of PyImport_GetModule() is documented: "Return the already imported module with the given name. If the module has not been imported yet then returns NULL but does not set an error. Returns NULL and sets an error if the loo

[issue31329] Add idlelib module entry to doc

2019-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: See also #14944, about the Using doc. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36370] Check for PyErr_Occurred() after PyImport_GetModule().

2019-03-20 Thread Brett Cannon
Brett Cannon added the comment: Pulling in Eric and Nick as they have played w/ the C API more recently. -- nosy: +eric.snow, ncoghlan ___ Python tracker ___ _

[issue36342] test_venv failure when executed by test_multiprocessing and the platform lacks a functional sem_open()

2019-03-20 Thread Brett Cannon
Brett Cannon added the comment: I guess my confusion comes from the fact that test_venv in isolation is a totally fine test suite, it just fails when test_multiprocessing runs it due to something multiprocessing-related. I've tried tweaking the title to reflect the fact that it's a test_venv

[issue36383] In Windows 10 virtual environments distutils.sysconfig.get_python_inc() reports base Python include directory

2019-03-20 Thread Mark Campanelli
New submission from Mark Campanelli : On Windows 10 64bit, using virtualenv in Python 2.7.15 or venv in Python 3.7.2, calling distutils.sysconfig.get_python_inc() returns the path to the include directory for the (respective) Python base installation instead of the include directory installed

[issue21647] Idle unittests: make gui, mock switching easier.

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ _

[issue21588] Idle: make editor title bar user configurable

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +IDLE versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___

[issue31329] Add idlelib module entry to doc

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE versions: +Python 3.8 -Python 3.6 ___ Python tracker ___ _

[issue21696] Idle: test configuration files

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- components: +IDLE versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___ ___

[issue33964] IDLE maxosc.overrideRootMenu: remove unused menudict

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE versions: -Python 3.6 ___ Python tracker ___ ___ Python-b

[issue35467] IDLE: unrequested pasting into Shell after restart

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue35675] IDLE: Refactor config_key module.

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue21625] Make help() beginner helpful when no PAGER or LESS variable

2019-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I recently opened Python in a Mac Terminal (bash) window, tried help(ob), and being a beginner in this situation, had the same terrible frustrating experience. I am leaving this open to implement David Murray's suggestion and changed the title accordingly.

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't want to complexify the normal case. Please don't go down the path of turning something simple into a mess. Because counters are just a dict subclass, users are free to make updates in any way they want. -- __

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi what do you think of a patch to this effect that would speed up operations without changing the current semantics? diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index cff75a48d6..fe5d5b2dca 100644 --- a/Lib/collections/__init__.py ++

[issue36370] Check for PyErr_Occurred() after PyImport_GetModule().

2019-03-20 Thread Stefan Krah
Change by Stefan Krah : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue36370] Check for PyErr_Occurred() after PyImport_GetModule().

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: The issue is that PyImport_GetModule() can legitimately NULL (not found) but also NULL after an error occurred in PyDict_GetItemWithError(). So one (quick and dirty) approach that fixes this abort() is: diff --git a/Python/import.c b/Python/import.c index bf3a99

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-03-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry - I meant make a *PR* out of it :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-03-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch sounds good on the principle, but can you make a patch out of it? -- ___ Python tracker ___ __

[issue36382] socket.getfqdn() returns domain "mshome.net"

2019-03-20 Thread Markus
Markus added the comment: I found the IP of mshome.net in an Ethernet adapter "vEthernet" It seems that this adapter stems from Hyper-V. It therefore seems that socket.getfqdn() reported the wrong network adapter once. Because I cannot reproduce this, I leave this issue closed. --

[issue21960] Better path handling in Idle find in files

2019-03-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: As Josh pointed out, this is how counters are documented and tested to work, so it is an unchangeable decision (i.e. it would break code that relying on the saturating arithmetic feature). Accordingly, I'm marking this as closed, not a bug. On the plus

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue35564] [DOC] Sphinx 2.0 will require master_doc variable set in conf.py

2019-03-20 Thread Ned Deily
Ned Deily added the comment: New changeset 4508bc37dd80c71adfaa0925a67c438389817076 by Ned Deily (Julien Palard) in branch '3.6': [3.6] bpo-35564: add master_doc='contents' to conf.py (GH-11290). (GH-12461) https://github.com/python/cpython/commit/4508bc37dd80c71adfaa0925a67c438389817076 --

[issue36301] Add _Py_PreInitialize() function

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: In term of API, we get something like: _PyInitError err; _PyPreConfig preconfig = _PyPreConfig_INIT; preconfig.utf8_mode = 1; preconfig.allocator = "malloc"; _PyInitError err = _Py_PreInitializeFromPreConfig(&preconfig); if (_Py_INIT_

[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: Whoops, I tested the wrong branch, getting a proper abort() now. :) -- ___ Python tracker ___ ___ Py

[issue36382] socket.getfqdn() returns domain "mshome.net"

2019-03-20 Thread Markus
Markus added the comment: Dear Steve, in fact not a Python bug at all. I used 2 commands: ipconfig /release ipconfig /renew and rebootet. This fixed the issue, for now. Also, I found this domain in c:\Windows\System32\drivers\etc\hosts.ics Unclear who created that entry. Documenting

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: object.__ipow__ is documented to take an optional third argument (though there is no way to pass it aside from explicitly calling __ipow__ directly since there is no syntax support for three-arg pow, in place or otherwise), so it's not some incompatibility w

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: > Let's close this long living issue. Thanks INADA-san for fixing last issues and for creating the deprecation issue! -- ___ Python tracker _

[issue36381] Deprecate "#" argument format without PY_SSIZE_T_CLEAN

2019-03-20 Thread STINNER Victor
Change by STINNER Victor : -- title: Preapre for mandatory PY_SSIZE_T_CLEAN -> Deprecate "#" argument format without PY_SSIZE_T_CLEAN ___ Python tracker ___ __

[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: The tests pass here on Linux with 3.8 (cc60cdd9c4) and a very low sys.setrecursionlimit(150). The fail properly with RecursionError at sys.setrecursionlimit(125). So I guess we'd need a gdb stack trace from OS X in case there's a CPython issue that is OS X sp

[issue36382] socket.getfqdn() returns domain "mshome.net"

2019-03-20 Thread Steve Dower
Steve Dower added the comment: We just return the result of GetComputerNameEx [1] here - we don't use WMI at all (and given the complexities, we are not going to start). Are you able to provide any more information? In particular, if the documentation for GetComputerNameEx (below) helps you

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: @Nikita: Your examples aren't unexpected at all, per the documented behavior: >Several mathematical operations are provided for combining Counter objects to >produce multisets (counters that have counts greater than zero). Addition and >subtraction combine c

[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: It can still be an issue in CPython, like in #14537. -- ___ Python tracker ___ ___ Python-bugs-list

[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: This occurs when handling a recursion error uses more than 50 extra nested function calls: if (tstate->overflowed) { if (tstate->recursion_depth > recursion_limit + 50) { /* Overflowing while handling an overflow. Give up. */ Py_F

[issue36381] Preapre for mandatory PY_SSIZE_T_CLEAN

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: > * 3.8: PendingDeprecationWarning ... Or maybe use directly DeprecationWarning? :-) https://discuss.python.org/t/pendingdeprecationwarning-is-really-useful/1038 -- ___ Python tracker

[issue20309] Not all method descriptors are callable

2019-03-20 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: See also PEP 579 (issue 11) and the thread https://mail.python.org/pipermail/python-ideas/2018-June/051572.html -- nosy: +jdemeyer ___ Python tracker __

[issue36382] socket.getfqdn() returns domain "mshome.net"

2019-03-20 Thread Markus
New submission from Markus : In a corporate network, `wmic computersystem get domain` returns the correct domain. On some clients, the Python query "socket.getfqdn()" returns the wrong domain, namely "mshome.net" >>> import socket >>> socket.getfqdn() '*.mshome.net' I have only found on

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I would defer to Raymond at this point and would prefer keeping current __iadd__ behavior and . See also issue23509 that discussed about C implementation of _keep_positive and some other optimizations. > Counter(a=-1) + Counter(a=-2) produces empt

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Nikita Smetanin
Nikita Smetanin added the comment: @xtreak I agree, also, this behavior is stated in documentation, but it's quite inconsistent in many ways, like in the following examples: Counter(a=-1) + Counter(a=-2) produces empty Counter() instead of Counter(a=-2) which is unexpected, but Counter(a=-1)

[issue36370] "Fatal Python error: Cannot recover from stack overflow" from SymPy tests

2019-03-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: FWIW I just tried both f8e46e9e741f253803e9b8be03287e5dd16abd4d and f8e46e9e741f253803e9b8be03287e5dd16abd4d with the reproducer given and none of them segfault. I don't think there is a bug in the Python interpreter, there is some ways to trigger this error w

[issue36323] IDLE: always display full grep path

2019-03-20 Thread Cheryl Sabella
Cheryl Sabella added the comment: See also #21960. I'm going to close that one in favor of this issue. -- ___ Python tracker ___ _

[issue21960] Better path handling in Idle find in files

2019-03-20 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> IDLE: always display full grep path ___ Python tracker ___

[issue36381] Preapre for mandatory PY_SSIZE_T_CLEAN

2019-03-20 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +12426 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2019-03-20 Thread Inada Naoki
Inada Naoki added the comment: > Would it be possible to emit a deprecation warning, maybe at runtime, when > PY_SSIZE_T_CLEAN is not defined? I created bpo-36381 for it. Let's close this long living issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> clo

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @xtreak __init__ delegates work to update() which has the same behavior: Python 3.7.2 (default, Feb 12 2019, 08:15:36) [Clang 10.0.0 (clang-1000.11.45.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from collections import

[issue36381] Preapre for mandatory PY_SSIZE_T_CLEAN

2019-03-20 Thread Inada Naoki
New submission from Inada Naoki : Raise warning for # use without PY_SSIZE_T_CLEAN. * 3.8: PendingDeprecationWarning * 3.9: DeprecationWarning * 3.10 (or 4.0): Remove PY_SSIZE_T_CLEAN and use Py_ssize_t always -- components: Extension Modules messages: 338466 nosy: inada.naoki, serhiy.

[issue36342] test_venv failure when the platform lacks a functional sem_open()

2019-03-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: It is a test_venv issue related to bpo-32126 and also related to the other issues listed in bpo-32126. Changing the title as it is ambiguous indeed. check_output() in test_venv.py does not print the full stack trace as it is done by test_asyncio in bpo-3212

[issue8677] Modules needing PY_SSIZE_T_CLEAN

2019-03-20 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +12425 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > It also unclear if there's even a need to check for non-positives with > _keep_positive in ops like __iadd__, __iand__ and __ior__ (except __isub__) > as it expects Counters which are always positive. Counter accepts dictionaries and keyword argu

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread SilentGhost
Change by SilentGhost : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue36366] Patcher stop method should be idempotent

2019-03-20 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- keywords: +patch pull_requests: +12424 stage: -> patch review ___ Python tracker ___ ___ Py

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: Thanks, but it is still not going to happen. Look at the increased code size in e.g. blake2s_impl.c.h. I want to know what is going on in the code. Also, the performance improvements are in argument parsing, but not when you have numerical code like a * b, wher

[issue36380] collections.Counter in-place operators are unexpectedly slow

2019-03-20 Thread Никита Сметанин
New submission from Никита Сметанин : All of collections.Counter in-place operators: +=, -=, |= and &= are obviously expected to have time complexity O(b) as in the following example: a = Counter(...) # e.g 1M elements b = Counter(...) # e.g. 10 elements a += b But in fact, all of them are h

[issue36367] tokenizer.c memory leak in case of realloc failure

2019-03-20 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 2.7, Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

  1   2   >