[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2019-07-26 Thread Lou Perazzoli

Lou Perazzoli  added the comment:

Thanks for the reply. I’ll make it simpler 

Regards
Lou

> On Jul 26, 2019, at 9:26 PM, Terry J. Reedy  wrote:
> 
> 
> Terry J. Reedy  added the comment:
> 
> It stopped at 1309 for me too, running with IDLE, then added 4999 and the 
> quit button, which did not work.  If you can, try to make the code simpler.  
> Here is one guide.
> https://stackoverflow.com/help/minimal-reproducible-example
> 
> However, limitations in tcl/tk are out of our control.  So we may close this 
> as 3rd party.  Python also has undocumented limitations, which we close as 
> "won't fix".
> 
> --
> nosy: +serhiy.storchaka, terry.reedy
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37691] Let math.dist() accept coordinates as sequences

2019-07-26 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +14744
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14975

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37691] Let math.dist() accept coordinates as sequences

2019-07-26 Thread Raymond Hettinger


New submission from Raymond Hettinger :

I did some user testing with Python 3.8 and found that math.dist() was a little 
restrictive in only accepting coordinates as tuples.  Mostly it worked out fine 
except but was a little inconvenient with generalized unpacking:

   label, *coordinates = cursor.fetchone()  # coordinates is a list

Also, it would be nice to allow numpy arrays as arguments.

--
assignee: rhettinger
components: Library (Lib)
messages: 348541
nosy: mark.dickinson, rhettinger, tim.peters
priority: normal
severity: normal
status: open
title: Let math.dist() accept coordinates as sequences
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37673] Tkinter won't create 5000 check boxes, stops at 1309.

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

It stopped at 1309 for me too, running with IDLE, then added 4999 and the quit 
button, which did not work.  If you can, try to make the code simpler.  Here is 
one guide.
https://stackoverflow.com/help/minimal-reproducible-example

However, limitations in tcl/tk are out of our control.  So we may close this as 
3rd party.  Python also has undocumented limitations, which we close as "won't 
fix".

--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset f6ab188323444fe0dd916ed3860cc5c8806caa16 by Miss Islington (bot) 
in branch '3.8':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/f6ab188323444fe0dd916ed3860cc5c8806caa16


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9e7697b3c55e0bd8663cf0641d4718e853af2d9c by Miss Islington (bot) 
in branch '3.7':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/9e7697b3c55e0bd8663cf0641d4718e853af2d9c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14743
pull_request: https://github.com/python/cpython/pull/14974

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14742
pull_request: https://github.com/python/cpython/pull/14973

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1 by Terry Jan Reedy (Tal 
Einat) in branch 'master':
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
https://github.com/python/cpython/commit/46ebd4a6a22431ce9676546d2bbe5a6dcd1cc1c1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-26 Thread mental


mental  added the comment:

> The root of the error is that struct.pack_into starts by memsetting the 
> underlying memory area with NULL bytes before filling the data with memcpy.

I've had a fix spinning for about a day now, it introduced a 
`multiprocessing.Lock` and it was simply wrapped around any struct packing and 
unpacking calls.

I've been reluctant to submit anything due to a suspicious resource warning I 
kept seeing about leaked shared_memory objects appearing spuriously and I 
wanted to rule out the possibility that other tests were causing a side effect.

Also I wanted to hear an expert from the noisy list share their thoughts.

> I'm not sure this should be done internally

I agree, even with my patch not reproducing the issue I didn't like placing a 
lock around various components in the class.

> +1 For a documentation addition.

If there are no objections, I'll submit a PR with a doc update :)

@Pierre mind if I cc' you for a review?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread David Edelsohn


David Edelsohn  added the comment:

Runtime linking allows a dynamically loaded library to interpose symbols. The 
classic example is allowing a program or dynamic library to overload C++ 
operator new. A library or program overrides the symbol by name.

Python does not require this. Python does not need to allow an extension module 
to override a function in Python.

If one needs to add AIX ld -G and runtime linking, 99% of the time one is 
covering up a problem.

The downside of -G is that it forces all global functions to be called through 
the AIX glink code (equivalent to SVR4 PLT) and not inlined.  This allows every 
global function call to be overriden, but forces every call to go through a 
function pointer. This is expensive.

Calling functions through the "PLT" requires that the function pointers for 
each global function be placed in the AIX TOC (equivalent to SVR4 GOT).  If the 
program or shared library is large enough, this can overflow the "GOT", which 
then requires even more expensive fixup code.

The mistaken use of this option leads down a path with bad performance and 
potentially requiring more and more effort to recover from problems introduced 
by the choice.

I don't know exactly the symptoms that you observed, but one possibility is 
that the shared object you are building is not being linked against all of the 
dependent libraries.

Separate from runtime linking, SVR4 allows unresolved symbols when a shared 
library is created and used to export all global symbols by default (before the 
efforts on symbol visibility). A simplistic way of describing this is that a 
process into which an executable and shared libraries are loaded sort of has 
this soup of all global symbols floating around and available to the runtime 
loader.  When a new shared library is loaded, the dynamic linker can resolve 
the symbols from any definitions available in the process.  Allowing the 
unresolved symbols at shared library link time is a promise that the symbols 
will be provided by someone at runtime. At runtime, all of the symbol needs and 
definitions are thrown in the air and hopefully match up correctly when first 
referenced at runtime.

AIX requires that all shared objects be fully resolved at link-edit time.  It 
requires that the shared object refer to all dependent libraries at link time, 
even if those libraries also will be present and provided by other shared 
libraries or executable at runtime.

In other words, on AIX, one must link all C++ shared objects against the C++ 
standard library, even if the main executable is linked against the library.

So, again, one possible explanation for the error of missing symbols is that 
one or more dependent libraries are missing from the link command building the 
shared object and that omission coincidentally happens to work on SVR4/Linux 
because of its semantics, but it doesn't work in the more strict environment of 
AIX.

This type of error should not be solved through runtime linking to borrow the 
missing symbols from the running process, which is a very expensive solution.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-26 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I'll take a crack at adding support for Path('.').name == '.'.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11953] Missing WSA* error codes

2019-07-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11602] python-config code should be in sysconfig

2019-07-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33439] python-config.py should be part of the stdlib

2019-07-26 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
nosy: +nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 06e8fc95d138775e942c18c8e47e72cdcc32f95c by Miss Islington (bot) 
in branch '3.8':
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
https://github.com/python/cpython/commit/06e8fc95d138775e942c18c8e47e72cdcc32f95c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 4b6421c61e9335253ea7004f2878317b88096c30 by Miss Islington (bot) 
in branch '3.7':
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
https://github.com/python/cpython/commit/4b6421c61e9335253ea7004f2878317b88096c30


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 91e49575095ca16d1b67dd8822deeb7885e421da by Steve Dower (Derek 
Keeler) in branch 'master':
bpo-32910: Remove implementation detail in venv documentation. (GH-14968)
https://github.com/python/cpython/commit/91e49575095ca16d1b67dd8822deeb7885e421da


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14741
pull_request: https://github.com/python/cpython/pull/14972

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14740
pull_request: https://github.com/python/cpython/pull/14971

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-26 Thread Brett Cannon


Brett Cannon  added the comment:

Anyone up for doing a PR that makes Path('.').name == '.'? It would be good to 
see if that would break the stdlib as a proxy as to how many people might be 
relying on these semantics. My hope is nothing breaks in which case we can make 
the change in 3.9 and notify people in What's New of the new, consistent 
semantics.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35712] Make NotImplemented unusable in boolean context

2019-07-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Moving to 3.9 target, per Serhiy's request. PR has been rebased against master, 
including updating the What's New info to be in the 3.9 version, not 3.8.

--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov

Kirill Balunov  added the comment:

I am reading "equivalence" too strictly (like "as a substitute"), because this 
is part of the documentation :) and I agree that in ordinary speech I would use 
it rather in the sense of “similar”.

In order to make sure, that everyone agrees only on that this requires only a 
documentation change? Because as for me, I think that it will better for 
`os.path.isdir` to raise `ValueError` or `DeprecationWarning` - `False` on 
empty string is not well defined behavior. But I'm fine to be alone with the 
last one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31652] make install fails: no module _ctypes

2019-07-26 Thread Thomas Dybdahl Ahle


Thomas Dybdahl Ahle  added the comment:

Installing libffi-dev worked for me.

--
nosy: +thomasahle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15987] Provide a way to compare AST nodes for equality recursively

2019-07-26 Thread Flavian Hautbois


Change by Flavian Hautbois :


--
keywords: +patch
pull_requests: +14739
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/14970

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37684] list.extend docs inaccurate

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

Upon further consideration, I think the code example suggestion I made using 
the interpreter could be in a separate PR or issue and doesn't have to replace 
the the current "Equivalent to ..." portion. I'll open a separate PR for that 
(which isn't attached to this issue). Apologies if that at all derailed this 
conversation, as it might not be directly relevant (even if it's within the 
same section).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 886e66d111b6b865e582d8cc7974d5c0b398da99 by Steve Dower in branch 
'3.8':
bpo-35524: Update Windows installer image in docs (GH-14966)
https://github.com/python/cpython/commit/886e66d111b6b865e582d8cc7974d5c0b398da99


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Eric N. Vander Weele


Eric N. Vander Weele  added the comment:

> This is horrible and completely wrong.

I'm not an expert in AIX and xlc, by any means.  I would greatly appreciate 
your help to better understand so I can see the problem in the way you are to 
figure the best approach I can take.

My primary motivation was to simplify/homogenize the mechanism by which Python 
C/C++ extensions are built.  For background, I have Python applications and 
libraries that need to run on Linux, Solaris, and AIX.  One of the challenges 
we ran into was how and when symbol resolution occurs, which is fundamentally 
different in AIX.

> Python does not require dynamic linking.

I understand Python does not require dynamic linking.  However, the problem I 
am running into is how this should work/behave for Python C/C++ extensions, 
which are imported (loaded) at runtime of a Python application.  Maybe this is 
where I have a fundamental misunderstanding, but it led me to believe that in 
AIX this should behave similarly to SVR4/Linux.  When scouring how Python 
interplays with AIX for building Python C/C++ extensions, this problem piqued 
my interest.

When conducting my self-research, I came across 
http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf, which 
helped me in understanding the differences between dynamic loading run-time 
linking.  Thus, I went down the path of run-time linking with the '-G' flag, 
which appeared similar to what was done in Python for other operating systems.

> This simply is masking a symptom in a naive and incorrect manner.

This is leading up to my misunderstanding of what I was observing during my 
initial investigation of what was going on.

I'll need to revisit the symptom being observed, but I vaguely recall missing 
symbols when building Python C/C++ extensions when the interpreter is 
configured with '--enable-shared'.  Let me go back, undo the patch I have, and 
recreate the symptom/issue that was observed.

> Use of runtime linking causes many internal changes to the behavior of AIX 
> applications, severely affecting performance and potentially causing overflow 
> of data structures.

I'm really curious about this one.  What internal changes, performance 
concerns, and overflow of data structures could occur?  Luckily, I have 
observed nor experienced anything egregiously negative, thus far.  
Understanding these concerns will help bolster my understanding.

> I absolutely will not allow Python to go down this path and introduce this 
> type of mistake.

No worries.  I'm trying to solve a problem and appeared to have gone down an 
incorrect path.  Being able to better understand what the desired expectation 
is for Python and associated C/C++ extensions, will help guide me to focus 
where the misunderstanding is and to redirect focus on where the problem is 
that needs to be addressed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14738
pull_request: https://github.com/python/cpython/pull/14969

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset 9d9893a1c85e07f7369c848acb0aed3b8fe6c3af by Steve Dower in branch 
'master':
bpo-35524: Update Windows installer image in docs (GH-14966)
https://github.com/python/cpython/commit/9d9893a1c85e07f7369c848acb0aed3b8fe6c3af


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37685] Fix equality checks for some types

2019-07-26 Thread Vedran Čačić

Vedran Čačić  added the comment:

Thanks for the clarification. Yes, now I see how it really works, but I saw 
some comment about not wanting to backport it to 3.7, because it changes the 
semantics. Now that I understand the implementation, it seems to me that it 
really doesn't change the semantics, except in some weird cases like the 
objects "accidentally" having the sought attributes. But nevermind, I'm fine 
with that -- I'm just saying that's the reason I thought the change is much 
greater than it really is.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

> I don't know. "whence" is the official name of the argument in the POSIX API

> Perhaps "from_what" is assumed to be more understandable by the average 
> reader?

>From looking at the blame on GitHub, it looks like the use of the "from_what" 
>argument in the tutorial has been there for more than 12 years, since the last 
>commit was a massive move of the doc tree.  The documentation for the IO 
>module was added exactly 12 years (which included the usage of the *whence* 
>argument rather than *from_what*) ago by birkenfield. Based on that 
>information, I think the most likely answer is that the argument used to be 
>*from_what* in a much older version of Python. To conform to the posix 
>standard, it was changed to *whence*, but the tutorial was never updated.

If it was simply never updated, I think that it would be better to change it to 
*whence*. The difference would be more likely to confuse new users of the 
language, if they were to start with the tutorial and later refer to the IO 
module documentation. 

Also the tutorial provides a fairly in-depth explanation of the purpose of the 
argument within seek(), so I don't think using "from_what" as the name makes 
its purpose any more clear to the users.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

Clarification: By "latest commit" should be "oldest commit" with regards to the 
oldest commit in GitHub's history of the section of the "inputouput" tutorial 
that used the *from_what* argument for seek().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread David Edelsohn


David Edelsohn  added the comment:

Absolutely, positively no.  This is horrible and completely wrong.

Applications on AIX should not be compiled to allow dynamic linking to make 
them operate more like SVR4/Linux.  Python does not require dynamic linking. 
This simply is masking a symptom in a naive and incorrect manner. Use of 
runtime linking causes many internal changes to the behavior of AIX 
applications, severely affecting performance and potentially causing overflow 
of data structures.

We currently are going through the process of removing this brain damage from 
CMake.  I absolutely will not allow Python to go down this path and introduce 
this type of mistake.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used

2019-07-26 Thread Derek Keeler


Change by Derek Keeler :


--
keywords: +patch
pull_requests: +14737
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14968

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35667] activate for venv containing apostrophe doesn't work in powershell

2019-07-26 Thread Derek Keeler


Change by Derek Keeler :


--
keywords: +patch
pull_requests: +14736
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14967

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37685] Fix equality checks for some types

2019-07-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Serhiy: Is there a reason not to use the functools.total_ordering decorator on 
TimerHandle, so you can get rid of __le__/__ge__/__gt__ rather than fixing them 
individually? I notice at least one behavioral difference (total_ordering's 
le/ge methods use ==/!= for the fallback comparison, where TimerHandle 
explicitly calls __eq__) which this would eliminate, along with reducing the 
code to maintain.

Specifically, the total_ordering fallbacks work if the provided operator (e.g. 
__lt__) works and either side provides a functional __eq__/__ne__, as 
appropriate (even if the other side *can't* provide the complementary 
inequality operator, e.g. __gt__). TimerHandle's behavior differs; it's all or 
nothing (so if __lt__ works, but __eq__ fails, then the success of __lt__ 
doesn't matter, the other side has to do everything).

I'm not saying total_ordering is necessarily correct (it does seem a bit odd 
that A <= B can return True based on a mix of results, one from A.__lt__, one 
from B.__eq__), but constantly reimplementing these fallback operations has 
been a source of subtle bugs so often, that I'd rather depend on a single 
common implementation, and debate tweaks to it there, rather than having it 
reimplemented slightly differently in a million different places.

I don't think import times for functools should be a problem; looks like at 
least four asyncio submodules import it, including asyncio.format_helpers 
(which asyncio.events takes a direct dependency on), so if you're using 
asyncio.events, you're already importing functools anyway.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37354] Write PowerShell Activate.ps1 to be static so it can be signed

2019-07-26 Thread Derek Keeler


Change by Derek Keeler :


--
keywords: +patch
pull_requests: +14735
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14967

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37685] Fix equality checks for some types

2019-07-26 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

@p-ganssle: Yup. If both sides return NotImplemented, __eq__ and __ne__ return 
a result based on an identity comparison; all other rich comparisons raise 
TypeError in that case. Code is here: 
https://github.com/python/cpython/blob/3.7/Objects/object.c#L679

As you said, NotImplemented is never actually returned from syntax based 
comparisons; you only see it if you explicitly call __eq__ (and related __XX__ 
rich comparison methods) directly (usually because you're implementing one 
method in terms of another).

AFAICT, about the only time you should ever be returning False rather than 
NotImplemented is when the other operand is an instance of the same class as 
you (or a subclass), allowing you to say with certainty that you know how to do 
the comparison (Python already handles the edge case of subclasses for you, by 
calling the comparison method on the subclass first, even if it's on the right 
hand side). In any other case, you return NotImplemented, and let the other 
side determine if they know how to do the comparison.

--
nosy: +josh.r

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +David.Edelsohn

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37685] Fix equality checks for some types

2019-07-26 Thread Paul Ganssle


Paul Ganssle  added the comment:

@veky I can't be sure, but I think you may not understand what returning 
`NotImplemented` does - this makes comparisons *more* versatile, not less.

The way it works is that when Python does, for example, x == y, it will first 
call x.__eq__(y) and check the return value of that. If that's True or False, 
it will return the value, but if it's NotImplemented, it will call y.__eq__(x) 
and return that value, unless the value is NotImplemented. If both comparisons 
return NotImplemented, it falls back on the default implementation for __eq__, 
which I think is "x is y". For __lt__ it's different fallback behavior, but the 
same general idea.

Most of these changes are going from a situation where __lt__ or __eq__ was 
raising an exception or returning False for comparisons where the operation is 
not defined. This makes the distinction between "I don't know how to compare 
myself to that object" and "I know how to compare myself to that object and I 
am not equal to it".

--
nosy: +p-ganssle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18748] io.IOBase destructor silence I/O error on close() by default

2019-07-26 Thread Yhojann Aguilera


Yhojann Aguilera  added the comment:

I hope that when an error occurs, python tells me what the problem is. The 
abort core error is a problem at a lower level than python because python is 
not able to recognize or handle the error.

The main problem is that I exceeded the maximum number of process threads 
supported by the kernel.

What I hope is that python throws an exception when it exceeds this limit or 
when it cannot access the pointer in memory of the process thread.

The problem is not if the script is right or wrong, but that Python is not able 
to recognize and handle the problem. A generic message saying that an error 
occurred without indicating where and how it occurred is a python bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37685] Fix equality checks for some types

2019-07-26 Thread Vedran Čačić

Vedran Čačić  added the comment:

Wat?? Are we heading towards the world where 3.2 == 'something' is 
NotImplemented? I understand `__lt__`, of course, but in my opinion Python has 
always defined equality comparisons between different types. I think this is a 
huge regression.

--
nosy: +veky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

I made a fake 3.8.0 installer and made the screenshot, so we'll only backport 
it to 3.8. I think 3.7 is fine with what it has.

--
versions: +Python 3.8, Python 3.9 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35524] using/windows launcher image might be deprecated

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +14734
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14966

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37312] Remove deprecated _dummy_thread and dummy_threading modules

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

FTR, Antoine originally removed in b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd and 
added back (but deprecated) a few days later in 
b43c4caf81b10e5c7ebaeb3a712c6db584f60bbd. [1]  That happened in September 2017 
for Python 3.7.


[1] https://bugs.python.org/issue31370#msg302476

--
nosy: +eric.snow, pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +Michael.Felt, pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Eric N. Vander Weele


New submission from Eric N. Vander Weele :

Have the approach of building shared libraries on the AIX operating
system be similar to that of a System V system.  The primary benefit of
this change is the elimination of custom AIX paths and reducing the
changes at `./configure` to affect just the `LDSHARED` environment
variable.

For background context, AIX sees shared libraries as fully linked and
resolved, where symbol references are resolved at link-time and cannot
be rebound at load-time.  System V resolves all global symbols by the
run-time linker.  Thus, conventional shared libraries in AIX cannot have
undefined symbols, while System V can.

However, AIX does allow for run-time linking in allowing symbols to be
undefined until load-time.

Therefore, this change affects how linking of shared libraries are
performed on AIX to behave similarly to that of System V.

Given that symbols are now going to be allowed to be undefined for AIX,
all the code paths for generating exported symbols and the related
wrapper scripts go away.

The real magic is in the `-G` flag for `LDSHARED`.  Effectively, `-G`
is equivalent to specifying the following:

* -berok: Suppress errors even if there are unresolved symbols
* -brtl: Enable run-time linking
* -bnortllib: Do not include a reference to the run-time linker
* -bnosymbolic: Assigns 'nosymbolic' attribute to most symbols (i.e.,
can be rebound)
* -bnoautoexp: Prevent auto exportation of any symbols
* -bM:SRE: Set the module type to reusable (i.e., require a private copy
   of the data area for each process).

I have been using this patch for Python 3.7, 3.6, and 2.7 (with appropriate 
backporting adaptations) without issue for being able to build and use Python 
C/C++ extensions on AIX for about 6 months now.  Given that we haven't had any 
issues, I felt it was appropriate to see if this would be accepted upstream.

--
components: Build, Extension Modules
files: aix-extension-simplify.patch
keywords: patch
messages: 348511
nosy: ericvw
priority: normal
severity: normal
status: open
title: Simplify linking of shared libraries on the AIX OS
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48508/aix-extension-simplify.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37690] Simplify linking of shared libraries on the AIX OS

2019-07-26 Thread Eric N. Vander Weele


Change by Eric N. Vander Weele :


--
pull_requests: +14732
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14965

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset ea0f7aa47c5d2e58dc99314508172f0523e144c6 by Miss Islington (bot) 
in branch '3.7':
bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)
https://github.com/python/cpython/commit/ea0f7aa47c5d2e58dc99314508172f0523e144c6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset 0225d58cc8b786caec12f45e9245f90497610a2d by Miss Islington (bot) 
in branch '3.7':
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
https://github.com/python/cpython/commit/0225d58cc8b786caec12f45e9245f90497610a2d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14731
pull_request: https://github.com/python/cpython/pull/14964

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14730
pull_request: https://github.com/python/cpython/pull/14963

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Ned Deily

Ned Deily  added the comment:

Yeah, we should update 3.7, too, so people don’t keep getting the upgrade 
warning.

--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34011] Default preference not given to venv DLL's

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

This code has been significantly rewritten since this bug, and I believe it's 
no longer an issue.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37287] picke cannot dump Exception subclasses with different super() args

2019-07-26 Thread Fabian Raab


Fabian Raab  added the comment:

It seems to that this problem is affecting __new__ methods independent of 
exceptions:

>>> class NewBreaker:
... def __new__(cls, arg):
... return super().__new__(cls)
...
>>> nb = NewBreaker(42)
>>> import pickle
>>> dumped = pickle.dumps(nb)
>>> pickle.loads(dumped)
Traceback (most recent call last):
File "", line 1, in 
TypeError: __new__() missing 1 required positional argument: 'arg'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

This appears to be completely resolved now, but if it's not, please ping with 
the details and we'll reopen.

--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37689] Add Path.is_relative_to()

2019-07-26 Thread hai shi


hai shi  added the comment:

antoine, let me try it;)

--
nosy: +shihai1991

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36529] Python from WindowsStore: can't install package using "-m pip"

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Resolved by issue37672 (because I didn't find this issue when I was looking for 
it, so I created a new one)

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Switch Windows Store package to use pip.ini for user mode

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Hey Ned, would you like a bundled pip update for 3.7? We haven't gone that far 
back.

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


miss-islington  added the comment:


New changeset c5033901263d64a533ee47a84c6d286a223540c9 by Miss Islington (bot) 
in branch '3.8':
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
https://github.com/python/cpython/commit/c5033901263d64a533ee47a84c6d286a223540c9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37684] list.extend docs inaccurate

2019-07-26 Thread wim glenn


wim glenn  added the comment:

Raymond,

I understand that consecutive appends could potentially trigger multiple 
resizes behind the scenes, and so it's not really showing that extend is more 
like a bulk update as you mentioned. That's a good point!

However I think it's a more important consideration to make sure the equivalent 
actually gives a correct *result*. Can you suggest an alternative code snippet 
to use which is correct, or perhaps soften the language claiming that the code 
is equivalent?

For what it's worth, the stdtypes.html docs writes that extend is "for the most 
part the same as" the slice assignment:

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:


New changeset b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34 by Steve Dower in branch 
'master':
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
https://github.com/python/cpython/commit/b1eb20e68e30c8ab128f9d63d622f0a8b49dcf34


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14729
pull_request: https://github.com/python/cpython/pull/14961

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37689] Add Path.is_relative_to()

2019-07-26 Thread Antoine Pitrou


New submission from Antoine Pitrou :

Right now, to know whether a Path is relative to another one, you have to call 
Path.relative_to(), catch ValueError, and act in consequence.

It would be nice to have a Path.is_relative_to() that does the equivalent for 
you and returns True/False.

This is probably a good easy issue for a beginner contributor.

--
components: Library (Lib)
keywords: easy
messages: 348498
nosy: pitrou, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Add Path.is_relative_to()
type: enhancement
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37496] Support annotations in signature strings.

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

+1 on using a string for Parameter.annotation and Signature.return_annotation.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

If "equivalent" is deceiving, perhaps replace it with "similary" or "roughly 
equivalent".  Feel free to post a PR with your preferred wording.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Brett Cannon


Brett Cannon  added the comment:

I think you're reading "equivalence" too strictly here to mean "exactly the 
same semantics". In this instance it means "for similar functionality, the 
equivalent method is ..." (admittedly this might be a quirk of the use of the 
word "equivalent" in North American English).

But I can see why you would interpret it the way you do. Please feel free to 
propose a PR to clarify the phrasing.

--
nosy: +brett.cannon
type: behavior -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

Hmm, looks like this was already fixed by Serhiy (for bpo-35454) the day before 
I opened this issue. :)

3.8/master: GH-11077 8905fcc85a6fc3ac394bc89b0bbf40897e9497a6
3.7: GH-11105 62674f3a36ec55f86a5f20ee028a37fbd549bd6c
3.6: GH-11106 8855d9339858683c9b4fcd50b02a7bca526d4726

That's what I get for not keeping my local clone up-to-date.

--
nosy: +serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +14728
pull_request: https://github.com/python/cpython/pull/14960

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-26 Thread Eric Snow


Eric Snow  added the comment:

Sorry, @Batuhan.  We appreciate your effort and would be glad to see more 
contributions from you.  I hope you at least learned something positive while 
working on this. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37664] Update bundled pip and setuptools

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Actually, we're already ignoring this message, but now it includes "WARNING: " 
at the start and doesn't match the existing regex. So we can just continue to 
ignore it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

> The current right margin is 1 pixel. Let's try making it 2.

See PR GH-14959.  I added 2 pixels of horizontal padding to the line numbers 
text widget, and it certainly does look much nicer.  Thanks for the suggestion, 
Kyle!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31370] Remove support for threads-less builds

2019-07-26 Thread Kaeptm Blaubaer


Kaeptm Blaubaer  added the comment:

Unfortunately, this also leads to less good LTO if you use a single static 
executable, similar to what Tools/freeze produces but including libpython 
itself. I'm currently trying to make LLVM do that, but since I can't build 
without threads, it'd be extremely hard to tell it that it can remove all 
threading related things (like TLS) and inline them. This means I'll have to 
patch CPython on my own to remove thread support, but unfortunately this also 
means I can't guarantee that it continues to work, as well as that it makes it 
a lot more likely that my build won't support many third-party libraries.

--
nosy: +kb1000

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +14727
pull_request: https://github.com/python/cpython/pull/14959

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37679] test_with_pip fails on FreeBSD 10 bot

2019-07-26 Thread Steve Dower


Steve Dower  added the comment:

Could you please nosy yourself on the other issue and help us address it then?

The only change was upgrading pip, and the error is just a new warning message, 
but unless someone knows how bad it is then we'll "fix" it by ignoring the 
warning.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37628] IDLE: Fix Font sample (config dialog) geometry

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

See proposed fix in PR GH-14958.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37628] IDLE: Fix Font sample (config dialog) geometry

2019-07-26 Thread Tal Einat


Change by Tal Einat :


--
keywords: +patch
pull_requests: +14726
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14958

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-26 Thread Pierre Glaser


Pierre Glaser  added the comment:

The root of the error is that struct.pack_into starts by memsetting the 
underlying memory area with NULL bytes before filling the data with memcpy. If 
ShareableList._get_packing_format is called between the two operations (through 
a concurrent __getitem__ call from another process), struct.unpack_from will 
return an empty tuple which is the direct cause of the error you're seeing.

In the general case though, memcpy is not atomic so even without the memset 
call before, results of struct.unpack_from may be invalid in a concurrent 
setting.

shared_memory is a low level python module. Precautions should be made when 
handling concurrently the shared_memory objects using synchronization 
primitives for example. I'm not sure this should be done internally in the 
SharedMemory class -- especially, we don't want to slow down concurrent READ 
access. +1 For a documentation addition.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37538] Refactor zipfile to ease subclassing and enhancement

2019-07-26 Thread Daniel Hillier


Change by Daniel Hillier :


--
keywords: +patch
pull_requests: +14725
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14957

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37682] random.sample should support iterators

2019-07-26 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thomas, thank you for the suggestion but I think we should decline.  The API 
for sample() is consistent with choice(), choices() and shuffle().  For the 
most part the sequence based API has worked out well.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I don't know. "whence" is the official name of the argument in the POSIX API:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html

Perhaps "from_what" is assumed to be more understandable by the average reader?

Also, os.lseek() uses "how":
https://docs.python.org/3/library/os.html#os.lseek

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36279] os.wait3() leaks some uninitialized stack when no processes exist

2019-07-26 Thread David Wilson


David Wilson  added the comment:

The original diff is attached here (per the old process) so others can find it, 
and the PR+fork are closed, as carrying a fork in my GitHub for 4 months has 
non-zero cost. I'm presently more interested in having a clean GH account than 
carrying around the baggage of forgotten old patches

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
Added file: 
https://bugs.python.org/file48507/c805d2764e6a0ee4d22a338c5f4fef6154df8687.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37409] relative import without parent succeeds with builtins.__import__

2019-07-26 Thread Ben Lewis


Change by Ben Lewis :


--
pull_requests: +14724
pull_request: https://github.com/python/cpython/pull/14956

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37679] test_with_pip fails on FreeBSD 10 bot

2019-07-26 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

Since this is likely a regression from issue 37664, which is still open, and 
also contains the report, I'd close this issue in favour of the former. Having 
regression reports in separate issues for still open in new/separate issues 
tends to results in them not being addressed in a timely manner.

If it turns out this is not related to the commits from issue 37664, this can 
be re-opened.

Having said that, these bots have been stable and green for a substantial 
amount of time, so in almost all cases (upgrades to the bots not withstanding), 
new regressions/failures are almost certainly newly introduced

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov


Kirill Balunov  added the comment:

I understand the reasons, I only say that it does not correspond to my 
perception of their equivalence, because:

os.path.isdir('') != os.path.isdir('.')

while:

Path('').is_dir() == Path('.').is_dir()

and I can confirm that some libraries rely on os.path.isdir('') -> False 
behavior.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37676] cmath.phase array support

2019-07-26 Thread Mark Dickinson


Mark Dickinson  added the comment:

I think you want numpy.angle 
(https://docs.scipy.org/doc/numpy/reference/generated/numpy.angle.html).

NumPy is a third-party library, so it doesn't make sense to have the math or 
cmath functions be aware of NumPy arrays; none of the other math or cmath 
functions work on arrays. Generally for this sort of thing you want to look for 
a solution in NumPy or SciPy.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The current right margin is 1 pixel. Let's try making it 2.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37635] Using constant for whence arg in seek()

2019-07-26 Thread Kyle Stanley


Kyle Stanley  added the comment:

Upon further consideration, I think that it would be best to leave the code 
examples as is in the "inputoutput" tutorial, but it still be worth mentioning 
that the constants exist as alternatives. This is due to adding the additional 
step of "import io" in order to be able to access the constants. The tutorial 
code examples should probably aim to not add additional extra lines that are 
not needed.

While I was working on a PR for updating the tutorial, I noticed that the 
second argument's name for seek() was  *from_what* instead of *whence*. Was 
this an older name for the argument that is now outdated or am I missing 
something?

Doc/tutorial: 
https://github.com/python/cpython/blob/master/Doc/tutorial/inputoutput.rst#methods-of-file-objects

Doc/library: https://docs.python.org/3/library/io.html#io.IOBase.seek

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is because Path() == Path('') == Path('.').

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37628] IDLE: Fix Font sample (config dialog) geometry

2019-07-26 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

And maybe a horizontal scroll.  In any case, line wrap should be off.  Feel 
free to whip up a minimal change PR that we can merge before Monday.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov


Kirill Balunov  added the comment:

Forgot to write the result for Path variant:

>>> Path(dummy).is_dir()
 True

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37688] The results from os.path.isdir(...) an Path(...).is_dir() are not equivalent for empty path strings.

2019-07-26 Thread Kirill Balunov


New submission from Kirill Balunov :

In the documentation it is said that os.path.isdir(...) an 
Path(...).is_dir()are equivalent substitutes.
https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module

But they give different result for empty path strings:
>>> import os
>>> from pathlib import Path
>>> dummy = "" 
>>> os.path.isdir(dummy)
 False

Obviously it's not an equivalence, so either this should be noted in the 
documentation or corrected in the code.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 348475
nosy: docs@python, godaygo
priority: normal
severity: normal
status: open
title: The results from os.path.isdir(...) an Path(...).is_dir() are not 
equivalent for empty path strings.
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37682] random.sample should support iterators

2019-07-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> ISTM that if a generator produces so much data that it is infeasible to fit 
> in memory, then it will also take a long time to loop over it and generate a 
> random value for each entry.

Good point!

$ ./python -m timeit -s 'from random import sample as s' 's(range(10**6), 50)'
1 loops, best of 5: 25.6 usec per loop
$ ./python -m timeit -s 'from random import sample as s' 's(list(range(10**6)), 
50)'
10 loops, best of 5: 31.5 msec per loop
$ ./python -m timeit -s 'from random import reservoir_sample as s' 
's(range(10**6), 50)'
1 loop, best of 5: 328 msec per loop

$ ./python -m timeit -s 'from random import sample as s' 's(range(10**8), 50)'
1 loops, best of 5: 26.9 usec per loop
$ ./python -m timeit -s 'from random import sample as s' 's(list(range(10**8)), 
50)'
1 loop, best of 5: 3.41 sec per loop
$ ./python -m timeit -s 'from random import reservoir_sample as s' 
's(range(10**8), 50)'
1 loop, best of 5: 36.5 sec per loop

It is possible that a generator produces not so much data, but every item takes 
much memory so the total size does not fit in memory. But I suppose that the 
generation time of larger items will be proportionally larger, so 
reservoir_sample() will be just as slow.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37340] remove free_list for bound method objects

2019-07-26 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

Correction: Terry commented on that issue (#37628) earlier today; Raymond 
Hettinger originally reported it a about a week ago.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17535] IDLE editor line numbers

2019-07-26 Thread Tal Einat


Tal Einat  added the comment:

Thanks for trying this and giving such useful feedback, Kyle!

Interestingly, Terry just opened an issue about exactly what you mention 
regarding the font configuration window; see issue #37628.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >