[issue30934] Document how to run coverage for repository idlelib files.

2017-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: That would be good; I might need to know someday;-). -- ___ Python tracker ___

[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, go ahead next with name changes and use of modern features such as sets and comprehensions. Please discuss 'general changes before coding. When we added Linux Modern keys a year ago, I combined two functions into IdleConf.current_colors_and_keys. I

[issue30934] Document how to run coverage for repository idlelib files.

2017-07-14 Thread Louie Lu
Louie Lu added the comment: After merging this one, I can provide the version of Linux and MacOS. -- ___ Python tracker ___

[issue30874] unittest execute tests twice in some conditions

2017-07-14 Thread Louie Lu
Louie Lu added the comment: On my MacOS with python 3.5.2 get this result: ➜ unittest-1 git:(master) ✗ python3 setup.py test running test running egg_info writing dependency_links to Test_1.egg-info/dependency_links.txt writing top-level names to Test_1.egg-info/top_level.txt writing

[issue30935] document the new behavior of get_event_loop() in Python 3.6

2017-07-14 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> needs patch versions: +Python 3.7 ___ Python tracker ___

[issue30842] pyenv activate for bash and tcsh

2017-07-14 Thread Arnon Sela
Arnon Sela added the comment: Thank you so much for considering this. Both windows and linux based systems provides mechanisms to be dynamic and relative to the path. I wish there would be a way to add such behavior to Python development manifesto and to check in pypi that packages are aligned

[issue27755] Retire DynOptionMenu with a ttk Combobox

2017-07-14 Thread Justin Foo
Justin Foo added the comment: Thanks for analysing further, Terry. My original goal was a drop-in replacement for an aspect of IDLE I found quite annoying (on Windows). Unfortunately, my limited playing with tkinter didn't inspire me to go beyond this. --

[issue30934] Document how to run coverage for repository idlelib files.

2017-07-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- pull_requests: +2775 ___ Python tracker ___ ___

[issue30935] document the new behavior of get_event_loop() in Python 3.6

2017-07-14 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- components: +asyncio nosy: +yselivanov ___ Python tracker ___

[issue30935] document the new behavior of get_event_loop() in Python 3.6

2017-07-14 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- title: document the new behavior of get_event_loop() Python 3.6 -> document the new behavior of get_event_loop() in Python 3.6 ___ Python tracker

[issue30935] document the new behavior of get_event_loop() Python 3.6

2017-07-14 Thread Chris Jerdonek
New submission from Chris Jerdonek: Currently, the Python asyncio.get_event_loop() docs don't say that get_event_loop() returns the currently running event loop when it is called from a coroutine: https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.get_event_loop

[issue30934] Document how to run coverage for repository idlelib files.

2017-07-14 Thread Terry J. Reedy
New submission from Terry J. Reedy: I have been using coverage for a few years. Now that I am (again) not the only one writing IDLE tests (others did 3 and 4 years ago), I should document what I do and in particular the policy decision -- test with 'branch=True' -- and the IDLE-specific

[issue30916] Pre-build OpenSSL and Tcl/Tk for Windows

2017-07-14 Thread Steve Dower
Steve Dower added the comment: Zach opted out of reviewing right now, so I went ahead and pushed my builds to the GitHub repos so that AppVeyor can run. It built and ran fine (which I'm not surprised about), but it was only 1-2 minutes faster on AppVeyor (which I _am_ surprised about).

[issue30842] pyenv activate for bash and tcsh

2017-07-14 Thread Vinay Sajip
Vinay Sajip added the comment: This seems reasonable, but scripts written to venvs by e.g. pip hard-code the path to the venv, and this is a stumbling block to relocatability. There is no reason to use the activate scripts except under interactive use - a script installed in a venv should be

[issue30874] unittest execute tests twice in some conditions

2017-07-14 Thread ale5000
ale5000 added the comment: I have setup a simpler one here: https://github.com/ale5000-git/test/tree/master/unittest-1 Just run manually "setup.py test" and you will se the bug. -- ___ Python tracker

[issue30660] Lossless Optimization of PNG files

2017-07-14 Thread Tiago Filipe Silva
Tiago Filipe Silva added the comment: Sorry for the late reply. I had to deal with stuff. serhiy.storchaka: > What tools did you use, optipng, advpng, pngcrush, pngnq, pngquant, or other? > How much space is saved? I had half a crate of whiskey that day so I'm going to say optipng and

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Gareth, Dimitar, you may want to take a look at https://github.com/python/cpython/pull/2708 -- stage: needs patch -> patch review ___ Python tracker

[issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly

2017-07-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- components: +Library (Lib) -Build resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue30918] Unable to launch IDLE in windows 7

2017-07-14 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE type: crash -> behavior ___ Python tracker ___

[issue30918] Unable to launch IDLE in windows 7

2017-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is a duplicate of #8231. But before I close this, when you do > set in the console (command prompt), what HOME* variables are set and is USERPROFILE? In python, what does >>> from os.path import expanduser >>> expanduser('~') show? -- nosy:

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-14 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-14 Thread Gareth Rees
Gareth Rees added the comment: Patch looks good to me. The test cases are not very systematic (why only int, double, and long long?), but that's not the fault of the patch and shouldn't prevent its being applied. -- nosy: +g...@garethrees.org ___

[issue30933] Python not IEEE 754 float compliant for various zero operations

2017-07-14 Thread Mark Dickinson
Mark Dickinson added the comment: (-0) ** 0.5 is a power operation, not a square root operation. As such, the relevant part of IEEE 754-2008 is section 9.2.1, "Special values", which says: > pow (±0, y) is +0 for finite y > 0 and not an odd integer For the other cases, in general the

[issue30933] Python not IEEE 754 float compliant for various zero operations

2017-07-14 Thread R. David Murray
R. David Murray added the comment: If I remember correctly, the exceptions adhere to the standard because it gives the option of "signaling" in those cases (but in any case it is the behavior we want). 0.5 is a float, so x**.5 is not the square root. >>> math.sqrt(-0.0) -0.0 I'm

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- pull_requests: +2774 ___ Python tracker ___ ___

[issue28053] parameterize what serialization is used in multiprocessing

2017-07-14 Thread Will S
Will S added the comment: Documentation would be appreciated. I have a project that uses BaseManager, Client, and Listener to create some servers and clients. I would like to update the project to work with Python 3 and would prefer to update the clients and the servers separately (i.e.

[issue30933] Python not IEEE 754 float compliant for various zero operations

2017-07-14 Thread Bobblehead
Changes by Bobblehead : -- title: Python not IEEE 754 float compliant for various zero results -> Python not IEEE 754 float compliant for various zero operations ___ Python tracker

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: The original changeset in Richard's repository is https://hg.python.org/sandbox/sbt/rev/6c8554a7d068. Unless Richard answers otherwise, I think it's likely the performance degradation was an oversight. Given the code we're talking about is POSIX-specific,

[issue30933] Python not IEEE 754 float compliant for various zero results

2017-07-14 Thread Bobblehead
New submission from Bobblehead: >>> (-0)**.5 0.0 Should return -0.0 "Except that squareRoot(−0) shall be −0", IEEE 754-2008, Section 5.4.1 >>> 1/(-0.0) Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero >>> 1/(0.0) Traceback (most recent call

[issue30874] unittest execute tests twice in some conditions

2017-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: What invocation conditions? If this only happens with Travis, then this may be a Travis issue. If it only happens with Travis coverage runs, then it might be intentional, or a coverage issue. -- nosy: +ezio.melotti, michael.foord, rbcollins,

[issue23674] super() documentation isn't very clear

2017-07-14 Thread Malcolm Smith
Malcolm Smith added the comment: I agree that the first two paragraphs are confusing. It's clearly not true to say "The search order is same as that used by getattr() except that the type itself is skipped", because as noted above, everything *earlier* than the type in the MRO is also

[issue30932] Identity comparison ("is") fails for floats in Python3 but works in Python2

2017-07-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug. Whether Python allocates one, or two, float objects for a particular floating point value is dependent on the implementation and not a language guarantee. The language does not promise that two floats with the value 7.3 will be the same

[issue30932] Identity comparison ("is") fails for floats in Python3 but works in Python2

2017-07-14 Thread ethn
New submission from ethn: The identity comparison fails in floats in Python3. >>> -7.3 is -7.3 False While in Python2 >>> -7.3 is -7.3 True -- components: Interpreter Core messages: 298363 nosy: ethn priority: normal severity: normal status: open title: Identity comparison ("is")

[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Nir Soffer
Nir Soffer added the comment: Can you provide a minimal reproducer, or best add a failing test? -- nosy: +Nir Soffer ___ Python tracker ___

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: If you have more annotations to add now, go ahead and I will review. -- ___ Python tracker ___

[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Jaume
Changes by Jaume : -- pull_requests: +2771 ___ Python tracker ___ ___

[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Jaume
Changes by Jaume : -- type: -> resource usage versions: +Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue30907] speed up comparisons to self for built-in containers

2017-07-14 Thread Tim Peters
Tim Peters added the comment: Ya, prior to now ;-) there's generally been some cost-benefit thought given to these things. Strings and ints are immutable and some values of each are uniquely interned, so the case of identity is more than just plausible. It happens often. I'd guess that the

[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Jaume
New submission from Jaume: If a socket is closed and polled here https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L183 the flag returned will be select.POLLNVAL (note that this can happen despite dispatcher.close() being called). This wouldn't

[issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously

2017-07-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Is the main goal to just make Popen.__init__ non-blocking? If not, #1191964 aims at providing non-blocking reads/writes (including on Windows). -- nosy: +giampaolo.rodola ___ Python tracker

[issue30907] speed up comparisons to self for built-in containers

2017-07-14 Thread Mark Dickinson
Mark Dickinson added the comment: > On other hand, this optimization already is implemented for integers, > strings, bytes and slices. Probably for good reasons, though, that don't necessarily apply to general containers / other objects. I can see the possible value for strings and bytes,

[issue22810] tkinter: "alloc: invalid block:" after askopenfilename

2017-07-14 Thread Matthias Kievernagel
Changes by Matthias Kievernagel : -- nosy: +mkiever ___ Python tracker ___ ___

[issue30930] Element wise multiplication issue

2017-07-14 Thread Mark Dickinson
Mark Dickinson added the comment: This is really a question for a NumPy mailing list, not for the Python bug tracker. But the answer is that you're doing computations using 32-bit integers, and those computations overflow, leading to the odd results you're seeing. It looks as though your

[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-14 Thread Cheryl Sabella
Cheryl Sabella added the comment: Did you want me to do other PRs for this? I had intended that one to be the first and I would complete more information on a subsequent PR, but you've added a lot of info. -- ___ Python tracker

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Gareth Rees
Gareth Rees added the comment: I propose: 1. Ask Richard Oudkerk why in changeset 3b82e0d83bf9 the temporary file is zero-filled and not truncated. Perhaps there's some file system where this is necessary? (I tested HFS+ which doesn't support sparse files, and zero-filling seems not to be

[issue30930] Element wise multiplication issue

2017-07-14 Thread Ivan Marroquin
New submission from Ivan Marroquin: Hi all, I am using an anaconda 4.3.18 64 bits installation on windows 7. the version of python is 3.6.1 and numpy version is 1.12.1 In Python, I have this element wise multiplication: import numpy as np #read the input data from an ascii file into the

[issue29766] --with-lto still implied by --enable-optimizations in Python 2.7

2017-07-14 Thread Hanno Schlichting
Changes by Hanno Schlichting : -- pull_requests: +2770 ___ Python tracker ___ ___

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Dimitar Tasev
Dimitar Tasev added the comment: Thank you, that is indeed the solution I ended up with, along with a large explanation of why it was necessary. Do you think that it's worth updating the `multiprocessing` documentation to make users aware of that behaviour? --

[issue30842] pyenv activate for bash and tcsh

2017-07-14 Thread Arnon Sela
Arnon Sela added the comment: Additional information: This suggestion will make pyenv much better. To emphasize the need, there are many places that due to security you cannot build virtualenv. Rather you have to push a virtualenv with your python code. Often enough, you also don't have

[issue11771] hashlib object cannot be pickled

2017-07-14 Thread Andrey Kislyuk
Andrey Kislyuk added the comment: For anyone else looking for a solution to this, I wrote a library: https://github.com/kislyuk/rehash -- nosy: +Andrey.Kislyuk ___ Python tracker

[issue30929] AttributeErrors after import in multithreaded environment

2017-07-14 Thread Evgeny Boytsov
New submission from Evgeny Boytsov: Hello everybody! We are using Python 3.4 running at CentOS 7 x64 and experiencing some problems with simulatenous import of modules from different threads of execution. The attached archive contains simple example, which demonstrates the issue. There is

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Gareth Rees
Gareth Rees added the comment: I see now that the default start method is 'fork' (except on Windows), so calling set_start_method is unnecessary. Note that you don't have to edit multiprocessing/heap.py, you can "monkey-patch" it in the program that needs the anonymous mapping: from

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-07-14 Thread Nick Coghlan
Nick Coghlan added the comment: Nice :) With the legacy code cleanups merged, I'd say the next step would be to update the PEP with the simplified API and the explanation for why the removed functions are no longer needed (i.e. we're making native TSS support a hard dependency for 3.7+).

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Dimitar Tasev
Dimitar Tasev added the comment: I have looked into your advice of changing multiprocessing.heap.Arena.__init__, I have removed the code that allocated the file and reverted to the old behaviour. I have done some brief runs and it seems to bring back the old behaviour which is allocating the

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Gareth Rees
Gareth Rees added the comment: Nonetheless this is bound to be a nasty performance for many people doing big data processing with NumPy/SciPy/Pandas and multiprocessing and moving from 2 to 3, so even if it can't be fixed, the documentation ought to warn about the problem and explain how to

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Gareth Rees
Gareth Rees added the comment: If you need the 2.7 behaviour (anonymous mappings) in 3.5 then you can still do it, with some effort. I think the approach that requires the smallest amount of work would be to ensure that subprocesses are started using fork(), by calling

[issue30919] Shared Array Memory Allocation Regression

2017-07-14 Thread Dimitar Tasev
Dimitar Tasev added the comment: If I understand correctly, there is no way to force the old behaviour in Python 3.5, i.e. to use an anonymous memory mapping in multiprocessing.heap.Arena so that the memory can be shared between the processes instead of writing to a shared file? The data

[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2017-07-14 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Hi, I attempted Nick's proposal and removed unused codes from TLS implementation (bpo-30279, bpo-30832). This change looks good to me (PR 1362). As the result, I think ready to be more slim API because the own implementation for TLS was removed. Therefore,