[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: No thanks. These aren't really important opcodes. While there may be a modest speed improvement for the same reasons as the previous patch (avoiding unnecessary work), the main reason to do these two patches is because you had suggested it and because it

[issue28637] Python startup performance regression

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks to Wolfgang. This is his idea, I just faster wrote the patch. -- ___ Python tracker ___

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please measure the performance effect of these changes? -- ___ Python tracker ___

[issue28587] list.index documentation missing start and stop arguments

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: This patch looks very good and I especially like the example. One nit. It may be insufficient to say that the start/end arguments are interpreted the same as the slice notation. While that clear indicates the range being searched, it is silent on whether

[issue28672] Explain in the "Data Model" document why arguments to __init__ are ok when __new__ is not defined

2016-11-11 Thread João Sebastião de Oliveira Bueno
New submission from João Sebastião de Oliveira Bueno: There is an specific Python behavior on object instantiation that is "expected" but not explicit, even for avanced users: When a custom class defines `__init__` with extra parameters, but do not overrides `__new__`, it simply works. But if

[issue28614] Slice limit documentation could be misinterpreted in Python 2.

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I am inclined to think that this should be closed. I concur. The problem with the nitpick and word-smithing is that over-explaining tends to make the docs harder to read and understand by getting in the way of the basic message. Given that this

[issue28032] --with-lto builds segfault in many situations

2016-11-11 Thread Kubilay Kocak
Kubilay Kocak added the comment: I also invoke PEP20 (explicit > implicit) in favour of renaming the option :] -- ___ Python tracker ___

[issue28032] --with-lto builds segfault in many situations

2016-11-11 Thread Kubilay Kocak
Kubilay Kocak added the comment: Could we please: a) Rename 'optimizations' to 'pgo' or 'profiled' b) Use enable/disable instead of with/without. The former is used for toggling program features, the latter is used for external dependencies [1][2][3] Yes Python's configure / autofoo isn't the

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> serhiy.storchaka Added file: http://bugs.python.org/file45455/concat_deref.diff ___ Python tracker

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file45454/delete_deref.diff ___ Python tracker ___

[issue28637] Python startup performance regression

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, thanks for your work. By isolating the few easily rewritten lines in site.py, you saved us from endless contortions trying to avoid using our own batteries. -- nosy: +rhettinger ___ Python tracker

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Andrey Fedorov
Andrey Fedorov added the comment: To clarify, this is how I would expect these two functions to work together "out of the box" patches = { 'requests_get': 'requests.get', ... } root_mock = mock.Mock() for name, path in patches.items(): m = mock.patch(path, auto_spec=True)

Re: Python String Handling

2016-11-11 Thread Steve D'Aprano
On Sat, 12 Nov 2016 09:29 am, subhabangal...@gmail.com wrote: > I have a string > "Hello my name is Richard" > > I have a list of words as, > ['Hello/Hi','my','name','is','Richard/P'] > > I want to identify the match of 'Hello' and 'Richard' > in list, and replace them with 'Hello/Hi" and

[issue28632] configparser does not close files in read

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Given that the open is context managed with open(filename, encoding=encoding) as fp: self._read(fp, filename) how could fp not be closed? -- nosy: +terry.reedy ___ Python tracker

[issue28614] Slice limit documentation could be misinterpreted in Python 2.

2016-11-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- Removed message: http://bugs.python.org/msg280626 ___ Python tracker ___

[issue28614] Slice limit documentation could be misinterpreted in Python 2.

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: n < (j-i)/k is a straightforward translation of i + n*k < j, and vice verse, where / is rational division. It is incorrect to integerize the result and the doc does not say to do so. In Python 3, there is no ambiguity, and the doc is *not* incorrect, and

[issue28617] Why isn't "in" called a comparison operation?

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: "Two more operations with the same syntactic priority, in and not in, are supported ..." could be changed to The containment tests in and not in have the same priority as comparisons and are supported ..." -- nosy: +terry.reedy stage: -> commit

[issue28615] Document clarification: Section 5.4 Complex Number

2016-11-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue28615] Document clarification: Section 5.4 Complex Number

2016-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8d12cb7d0fd by Terry Jan Reedy in branch '2.7': Issue #28615: Backport imaginary/complex number text from 3.x. https://hg.python.org/cpython/rev/f8d12cb7d0fd -- nosy: +python-dev ___ Python tracker

Re: Promoting your own library

2016-11-11 Thread Ben Finney
mirko bonasorte writes: > what is the most appropriate way for a developer to promote his own > Python library? The general answer is: Publish it with full metadata on PyPI. That's where the Python community looks to find third-party modules, so that's the place to put it.

[issue28644] Document recent changes in typing.py

2016-11-11 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28615] Document clarification: Section 5.4 Complex Number

2016-11-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: needs patch -> commit review ___ Python tracker ___

[issue28615] Document clarification: Section 5.4 Complex Number

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't like the term 'imaginary number' but the usage is standard, and python does not have 'complex literals' (I checked 2.7 chapter 2 on number literals). So I will apply this. -- assignee: docs@python -> terry.reedy nosy: +terry.reedy

[issue28644] Document recent changes in typing.py

2016-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5bf2ea0d3830 by Guido van Rossum in branch '3.5': Issue 28644: Document recent changes in typing.py (Ivan L) https://hg.python.org/cpython/rev/5bf2ea0d3830 New changeset 72a2c90abdec by Guido van Rossum in branch '3.6': Issue 28644: Document recent

[issue28614] Slice limit documentation could be interpreted in Python 2.

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: n < (j-i)/k is a straightforward translation of i + n*k < j, and vice verse, where / is rational division. It is incorrect to integerize the result and the doc does not say to do so. In Python 3, there is no ambiguity, and the doc is *not* incorrect, and

[issue28671] SSL server requesting client certificates should send CA list

2016-11-11 Thread Kevin Chen
New submission from Kevin Chen: When a Python HTTPS server requests client certificates, it should send a CA list so the client knows which certificates are acceptable. It looks like right now Python calls SSL_CTX_load_verify_locations, so once the client certificate is sent, Python can

Re: Python does not start

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 9:38 PM, wrote: > It says that ’py-3.5-32-m’ is not recognized as an internal or external > command, operable program or batch file. There's supposed to be a space after "py". Let's add the .exe extension to make this clearer: py.exe -3.5-32

Re: Python String Handling

2016-11-11 Thread Thomas Nyberg
On 11/11/2016 05:29 PM, subhabangal...@gmail.com wrote: I have a string "Hello my name is Richard" I want to identify the match of 'Hello' and 'Richard' in list, and replace them with 'Hello/Hi" and 'Richard/P' respectively. The result should look like, "Hello/Hi my name is Richard/P". Simple

Python String Handling

2016-11-11 Thread subhabangalore
I have a string "Hello my name is Richard" I have a list of words as, ['Hello/Hi','my','name','is','Richard/P'] I want to identify the match of 'Hello' and 'Richard' in list, and replace them with 'Hello/Hi" and 'Richard/P' respectively. The result should look like, "Hello/Hi my name is

[issue28658] IDLE: catch user cfg file error and improve error message

2016-11-11 Thread Andrew Kontokanis
Andrew Kontokanis added the comment: Thank you very much. The actual problem was that on copy paste it made an alias and not a real copy of the file that you mentioned. So It really helped me to solve the problem. -- ___ Python tracker

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Andrey Fedorov
Andrey Fedorov added the comment: There's some vagueness on how this is implemented, but I would prefer manager.attach_mock to also work with whatever the return value of patch() is. On Fri, Nov 11, 2016 at 12:08 PM, Syed Suhail Ahmed wrote: > > Syed Suhail Ahmed added

Re: Python does not start

2016-11-11 Thread Terry Reedy
On 11/11/2016 3:59 PM, eryk sun wrote: On Fri, Nov 11, 2016 at 8:36 PM, Jelena Tavcar wrote: when I click on the icon "IDLE (Python 3.5 32-bit)" nothing happens. It Does python itself work? If so, which micro version. It is in the startup line that begins 'Python

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-11 Thread Michael Witten
Michael Witten added the comment: I've attached as `pep-235-on-posix.patch' a copy of `pep-235-on-posix.export', in order to see whether that helps the system recognize the content as a patch. I'm loath to rename the original upload, because I'm not able to edit my original comment to reflect

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Carl Meyer
Carl Meyer added the comment: Speaking of this hypothetical C version, what's the current policy on shipping stdlib C code that can't be emulated in pure Python? (I'm thinking of e.g. PyPy). -- ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Carl Meyer
Carl Meyer added the comment: Thanks, Danny. Uploaded a version of the patch that adds thread-safety (with a test). Unlike in your lib, I didn't make it a separate version of the decorator; since the lock is not checked on cached access, its slight overhead on the initial computation is

[issue21973] IDLE: catch user cfg file error, better error message, continue

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #28658 in favor of this. For that issue, the exception was a UnicodeDecodeError instead of a configparser.Error. Both should be caught. Ingrid, sorry I never got back to this. A few months ago, Serhiy wrote a warning function for the

[issue28670] PEP 235: Implement on every POSIX system, and clean up the C code for `import'

2016-11-11 Thread Michael Witten
New submission from Michael Witten: The attached file, `pep-235-on-posix.export', contains 3 patches; the file includes the intended commit messages and authorship information. To apply these patches, save the file to: /path/to/pep-235-on-posix.export and then run the following from within

[issue27542] Segfault in gcmodule.c:360 visit_decref

2016-11-11 Thread Lee Garrett
Lee Garrett added the comment: In case someone reaches this bug report via search engine: apt-get remove python-cffi-backend fixed this problem for me. -- nosy: +lgarrett ___ Python tracker

RE: Python does not start

2016-11-11 Thread Daniele Bucciero
Did you check your Windows Event Viewer? Did you notice something wrong in Application Events? Regards Daniele Bucciero -Original Message- From: Python-list [mailto:python-list-bounces+daniele.bucciero=outlook@python.org] On Behalf Of Jelena Tavcar Sent: venerdì 11 novembre 2016

Re: Python does not start

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 8:36 PM, Jelena Tavcar wrote: > > when I click on the icon "IDLE (Python 3.5 32-bit)" nothing happens. It > used to work and at some point it just didn't react. Try running IDLE from a command prompt by entering the following command: py

[issue28658] IDLE: catch user cfg file error and improve error message

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is effectively a duplicate of #21973. In both issues, an error in the file causes an exception that is not caught, but should be. -- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> Idle should not

Fwd: Python does not start

2016-11-11 Thread Jelena Tavcar
Dear Sirs, when I click on the icon "IDLE (Python 3.5 32-bit)" nothing happens. It used to work and at some point it just didn't react. I have reinstalled the program several times and no improvement. I have also tried to run it as administrator, and installed other version too, but neither of

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Daniel Greenfeld
Daniel Greenfeld added the comment: I'm delighted to see a patch submitted, but I'm concerned that it isn't thread safe. This was implemented in the cached-property package I maintain: * https://github.com/pydanny/cached-property/issues/6 * https://github.com/pydanny/cached-property/pull/9 *

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Carl Meyer
Carl Meyer added the comment: (We wouldn't be able to match the set/delete behavior in a slots-supporting fallback implemented in Python.) -- ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Carl Meyer
Carl Meyer added the comment: Uploaded a patch updated per Nick's comment. Not opposed to waiting to see if someone is motivated to implement a version in C that supports __slots__, but if that doesn't happen by the Python 3.7 feature deadline, I don't think it should block this proven

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Carl Meyer
Changes by Carl Meyer : Added file: http://bugs.python.org/file45450/cached_property.diff ___ Python tracker ___

[issue26924] android: test_concurrent_futures fails

2016-11-11 Thread Davin Potts
Changes by Davin Potts : -- nosy: +davin ___ Python tracker ___ ___

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-11 Thread Davin Potts
Changes by Davin Potts : -- nosy: +davin ___ Python tracker ___ ___

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-11 Thread STINNER Victor
STINNER Victor added the comment: > - scimark_sparse_mat_mult: 8.71 ms +- 0.19 ms -> 9.28 ms +- 0.12 ms: 1.07x > slower Same issue on this benchmark: * average on one year: 8.8 ms * peak at rev 59b91b4e9506: 9.3 ms * run after rev 59b91b4e9506: 9.0 ms The benchmark is unstable, but the

[issue28618] Decorate hot functions using __attribute__((hot)) to optimize Python

2016-11-11 Thread STINNER Victor
STINNER Victor added the comment: > - json_loads: 71.4 us +- 0.8 us -> 72.9 us +- 1.4 us: 1.02x slower Hum, sadly this benchmark is still unstable after my change 59b91b4e9506 ("Mark hot functions using __attribute__((hot))", oops, I wanted to write Mark, not Make :-/). This benchmark is

Promoting your own library

2016-11-11 Thread mirko bonasorte
Hi all, what is the most appropriate way for a developer to promote his own Python library? I mean, apart from deploying it in Pypi and making the source code available in a SCV repository... Thanks. Mirko -- https://mail.python.org/mailman/listinfo/python-list

[issue28669] Math Library Dos Attack

2016-11-11 Thread STINNER Victor
STINNER Victor added the comment: > Very very very long and the server unreachable all path. If a server wants to allow users to run arbitrary code, a sandbox protecting the server must be used: limit CPU usage, limit total duration (time), etc. "while 1: pass" is another simple snippet to

[issue28669] Math Library Dos Attack

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think this should be marked as "not a bug" as closed. -- nosy: +rhettinger ___ Python tracker ___

[issue28658] IDLE: catch user cfg file error and improve error message

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: The exception message says that your problem is a bad byte in one of the config files. The most likely culprit is the one you edited, which I presume is ~/.idlerc/config-highlight.cfg. "Invalid start byte' suggests that it tried to decode as utf-8, but you

Re: update certain key-value pairs of a dict from another dict

2016-11-11 Thread Tim Chase
On 2016-11-11 13:29, Peter Otten wrote: > The same using update(), with a generator expression that avoids > the intermediate dict: > > >>> dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} > >>> dict1.update((k, dict2[k]) for k in desired & dict1.keys() & > dict2.keys()) Huh. Handy to file that new

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-11 Thread James Lu
Changes by James Lu : -- nosy: +James Lu ___ Python tracker ___ ___ Python-bugs-list

Re: Why keys method does not work with MutableMapping?

2016-11-11 Thread Rob Gaddi
triccare triccare wrote: > Greetings, > > Apologies if this has shown up twice; I jumped the gun sending before > confirming registration. > > I have a class that completely implements MutableMapping, meaning that all > the abstract methods are implemented. However, the keys method no longer >

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please no need to rush. We have 1.5 years to do this right. I believe supporting __slots__ is very important. But this is not easy task. Seems this requires C implementation. We should also design the behavior in case of setting or deleting cached

Why keys method does not work with MutableMapping?

2016-11-11 Thread triccare triccare
Greetings, Apologies if this has shown up twice; I jumped the gun sending before confirming registration. I have a class that completely implements MutableMapping, meaning that all the abstract methods are implemented. However, the keys method no longer returns the keys, but simply a repr of the

[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Done. I plan to test by downloading and installing the release candidate. If you can first test now, that would be great. -- ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Carl Meyer
Carl Meyer added the comment: Makes sense, Nick, thanks. The current error message for that situation is pretty cryptic indeed. I'll update the patch with your suggestion. Do you think a documentation note about slots is also warranted? -- ___

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: So from what I have understood, manager.attach_mock must raise an Exception when it is called with a wrong attribute, since the patch is called with autospec=True and you cannot call a mock with non existing attributes.Is that correct? --

[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2776720f549c by Terry Jan Reedy in branch '2.7': Issue #27854: Include idlelib/help.html in 2.7 Windows installer. https://hg.python.org/cpython/rev/2776720f549c -- nosy: +python-dev ___ Python tracker

[issue21145] Add the @cached_property decorator

2016-11-11 Thread Nick Coghlan
Nick Coghlan added the comment: Carl's patch looks good to me, but my one request in relation to the __slots__ situation would be to give it a custom error message better indicating that lazy initialization of pre-assigned instance slots isn't supported. Currently that case just lets the

Why keys method does not work with MutableMapping?

2016-11-11 Thread triccare triccare
I have a class that completely implements MutableMapping, meaning that all the abstract methods are implemented. However, the keys method no longer returns the keys, but simply a repr of the instance. Example is below. Same is true for the items method. It would seem that, if all the abstract

[issue28669] Math Library Dos Attack

2016-11-11 Thread Honor
Honor added the comment: I will take a video on this subject. Then I will say the end result. Thanks a lot. On Fri, Nov 11, 2016 at 7:27 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Thanks. The solution here is "Don't do that, then." That is,

[issue28658] MacOsX idle don't run

2016-11-11 Thread Ned Deily
Changes by Ned Deily : -- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy ___ Python tracker ___

[issue28669] Math Library Dos Attack

2016-11-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks. The solution here is "Don't do that, then." That is, don't allow this code to execute on your server in the first place. At a guess, you've got a multithreaded server that's executing the given code on one thread, while continuing to listen for

[issue26929] android: test_strptime fails

2016-11-11 Thread Xavier de Gaye
Xavier de Gaye added the comment: New patch following Serhiy comments. -- Added file: http://bugs.python.org/file45449/exclude_ymd_2.patch ___ Python tracker

[issue28664] test_bz2 fails with BrokenPipeError when bunzip2 is missing

2016-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The decorator doesn't need arguments. I would make it similar to skip_unless_symlink. -- nosy: +serhiy.storchaka ___ Python tracker

[issue28669] Math Library Dos Attack

2016-11-11 Thread Honor
Honor added the comment: Very very very long and the server unreachable all path. On Fri, Nov 11, 2016 at 7:08 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Please can you give more details about why you consider this a problem? > > Yes, some

[issue28669] Math Library Dos Attack

2016-11-11 Thread Mark Dickinson
Mark Dickinson added the comment: Please can you give more details about why you consider this a problem? Yes, some computations take a long time. I fail to see why this is an issue. -- nosy: +mark.dickinson ___ Python tracker

[issue28669] Math Library Dos Attack

2016-11-11 Thread Honor
New submission from Honor: Hello EveryOne, Payload : 12**62**6 Test script: import math math.log10(12**62**6) Program is looping. I tested apache server and flask web framework. Result: Frozen in frost. Cpu usage : %90-99 , system runs but server shutdowns. Author : Onur TAŞLIOĞLU

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Ethan Furman
On 11/11/2016 03:24 AM, eryk sun wrote: On Fri, Nov 11, 2016 at 10:46 AM, Thorsten Kampe wrote: My goal is to verify that other shells/interpreters on Windows work the same way as Python when running an application or creating a sub- process. Cmd does not. What's else there? I have Bash here

[issue28668] instanciation of multiprocessing.Queue raises ImportError in test_logging

2016-11-11 Thread Xavier de Gaye
New submission from Xavier de Gaye: Occurs on Android that has a broken shared semaphore implementation (issue 26924). Patch attached. One of the backtraces: == ERROR: test_handle_called_with_mp_queue

[issue28664] test_bz2 fails with BrokenPipeError when bunzip2 is missing

2016-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 648cd8450f4f by Serhiy Storchaka in branch '3.5': Issue #28664: test_bz2 now works on non-Windows platforms without bunzip2 https://hg.python.org/cpython/rev/648cd8450f4f New changeset 9184f7f11b30 by Serhiy Storchaka in branch '3.6': Issue #28664:

[issue28644] Document recent changes in typing.py

2016-11-11 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : Added file: http://bugs.python.org/file45447/recent-typing-docs-v6.diff ___ Python tracker ___

[issue28644] Document recent changes in typing.py

2016-11-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Guido, here is the new patch with your corrections. I have some questions in Rietveld, but those are about mypy, you could apply the patch now. -- Added file: http://bugs.python.org/file45446/recent-typing-docs-v5.diff

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You forgot to merge and created new head. -- ___ Python tracker ___ ___

[issue28661] Fix code example in Python 3.5 telnetlib documentation

2016-11-11 Thread R. David Murray
R. David Murray added the comment: Hmm. I'm surprised that OSX would be different. I didn't actually experiment to confirm it on linux, either. I could be taken as a "teaching opportunity" to talk about exact match vs read_eager, in a comment before or after the example, if someone wants to

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ec45e7d2194 by Serhiy Storchaka in branch 'default': Merge from 3.6 (issue #28665). https://hg.python.org/cpython/rev/7ec45e7d2194 -- ___ Python tracker

[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-11-11 Thread Steve Dower
Steve Dower added the comment: I think so. I don't remember if anything else is needed to make it work. Were you able to test it? Or I'll give it a quick go on the build machine once you've committed. -- ___ Python tracker

[issue28664] test_bz2 fails with BrokenPipeError when bunzip2 is missing

2016-11-11 Thread Xavier de Gaye
Xavier de Gaye added the comment: Much better indeed :) With this patch, the test runs fine on Android. I left some minor comments on rietveld. -- ___ Python tracker

[issue28667] FD_SETSIZE is unsigned on FreeBSD

2016-11-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Seems FreeBSD is the only platforms with unsigned FD_SETSIZE. On NetBSD, Linux, and OpenBSD it is defined as just int. [1] This causes compiler warnings on FreeBSD. [2] Modules/selectmodule.c:72: warning: comparison between signed and unsigned

[issue24329] __qualname__ and __slots__

2016-11-11 Thread Xiang Zhang
Xiang Zhang added the comment: v3 updates the test cases. -- Added file: http://bugs.python.org/file45444/slots_special_v3.patch ___ Python tracker ___

[issue23839] Clear caches after every test

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for the review Raymond. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset d78d45436753 by Raymond Hettinger in branch '3.6': Issue #28665: Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF giving a 40% speedup. https://hg.python.org/cpython/rev/d78d45436753 -- nosy: +python-dev

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the quick review. I'll look at the other two cases when I get a chance. -- assignee: serhiy.storchaka -> rhettinger priority: normal -> low ___ Python tracker

Re: update certain key-value pairs of a dict from another dict

2016-11-11 Thread Peter Otten
Tim Chase wrote: > On 2016-11-11 11:17, Daiyue Weng wrote: >> dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} >> dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'} >> >> I am wondering how to update dict1 using dict2 that >> >> only keys 'A' and 'B' of dict1 are udpated. It will result in >> >> dict1 = {'A':

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. This saves function call and INCREF/DECREF pair. What about DELETE_DEREF? PyCell_Set() also is used in unicode_concatenate(). -- ___ Python tracker

[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Some tests create directories with disabled writing or even reading and listing. If them fail test.support.rmtree() can't remove such directories. This cause failures in other tests. Proposed patch makes test.support.rmtree() able to remove such

[issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

2016-11-11 Thread Raymond Hettinger
New submission from Raymond Hettinger: The STORE_FAST, LOAD_FAST, and LOAD_DEREF opcodes all use fast macros for variable access. This patch harmonizes STORE_DEREF to follow the same pattern. Both the C code and the generated assembly look nicer. Gives an approx 40% speed-up (using both

[issue19398] test_trace fails with -S

2016-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

Reporting a Bug

2016-11-11 Thread Vidyalakshmi Rao
Hi, System Specification: 2.7.7 |Anaconda custom (64-bit)| (default, Jun 11 2014, 10:40:02) [MSC v.1500 64 bit (AMD64)] *Issue: Spyder hangs in instances while iterating over a list containing rows with nothing in it.* for eachinfo in range(len(textlist)): #remove non-ASCII characters

Re: update certain key-value pairs of a dict from another dict

2016-11-11 Thread Tim Chase
On 2016-11-11 11:17, Daiyue Weng wrote: > dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} > dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'} > > I am wondering how to update dict1 using dict2 that > > only keys 'A' and 'B' of dict1 are udpated. It will result in > > dict1 = {'A': 'aa', 'B': 'bb', 'C': 'c'}

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 11:30 AM, Gisle Vanem via Python-list wrote: > Thorsten Kampe wrote: > >> My goal is to verify that other shells/interpreters on Windows work >> the same way as Python when running an application or creating a sub- >> process. Cmd does not. What's

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread Gisle Vanem via Python-list
Thorsten Kampe wrote: > My goal is to verify that other shells/interpreters on Windows work > the same way as Python when running an application or creating a sub- > process. Cmd does not. What's else there? I have Bash here but that's > a Cygwin executable. And Cygwin Python does not work like

Re: Windows: subprocess won't run different Python interpreter

2016-11-11 Thread eryk sun
On Fri, Nov 11, 2016 at 10:46 AM, Thorsten Kampe wrote: > * eryk sun (Fri, 11 Nov 2016 09:55:23 +) >> >> If it works like cmd.exe, then it does its own search using %Path% >> and %PathExt%. For example: >> >> C:\>cmd /c "set "PATH=" & cmd" >> 'cmd' is not

update certain key-value pairs of a dict from another dict

2016-11-11 Thread Daiyue Weng
Hi, I have two dicts, e.g. dict1 = {'A': 'a', 'B': 'b', 'C': 'c'} dict2 = {'A': 'aa', 'B': 'bb', 'C': 'cc'} I am wondering how to update dict1 using dict2 that only keys 'A' and 'B' of dict1 are udpated. It will result in dict1 = {'A': 'aa', 'B': 'bb', 'C': 'c'} cheers --

  1   2   >