[issue41730] Show deprecation warnings for tkinter.tix

2020-09-12 Thread wyz23x2


wyz23x2  added the comment:

Ping...

--

___
Python tracker 

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



[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-12 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

Also, forgot to add

The app crashes pretty quickly for me, to reproduce the error all I have to do 
is run the colormixer demo and move any of the bars up and down a couple of 
times.

--

___
Python tracker 

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



[issue41758] turtledemo.colormixer crashes with a stack overflow

2020-09-12 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

pyenv is a python version management tool. But this issue has nothing to do 
with it.
I ran the same thing on python 3.8.5 (both 32 and 64bit) and the same error 
occured

C:\Users\tusha\AppData\Local\Programs\Python\Python38-32>python.exe
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z


C:\Users\tusha\AppData\Local\Programs\Python\Python38-32>python.exe -m 
turtledemo.colormixer
EVENTLOOP
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x2534 (most recent call first):
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
251 in __new__
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
1826 in sety
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtledemo\colormixer.py",
 line 29 in shift
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
655 in eventfun
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py",
 line 1883 in __call__
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py",
 line 1305 in update
  File 
"C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 
562 in _update
  # ...


PS C:\Users\tusha> py
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
PS C:\Users\tusha> py -m turtledemo.colormixer
EVENTLOOP
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x23f4 (most recent call first):
  File "C:\Python385-64\lib\turtle.py", line 251 in __new__
  File "C:\Python385-64\lib\turtle.py", line 1826 in sety
  File "C:\Python385-64\lib\turtledemo\colormixer.py", line 29 in shift
  File "C:\Python385-64\lib\turtle.py", line 655 in eventfun
  File "C:\Python385-64\lib\tkinter\__init__.py", line 1883 in __call__
  File "C:\Python385-64\lib\tkinter\__init__.py", line 1305 in update
  File "C:\Python385-64\lib\turtle.py", line 562 in _update
  # ...


I'm running Windows 10 2004 build 19041.508

--

___
Python tracker 

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



[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If you want to pursue, you might try python-list to find other users.  I am not 
sure if this change really qualifies for python-ideas.

--

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Sreedevi: the Windows tag is meant for issues that involve Windows behavior 
that is different from other OSes; the IDLE tag is meant for issues that 
involve the behavior of IDLE, as distinct from other ways of running Python 
code.  They should not be used just because you ran code from IDLE on Windows.

There are two aspects to mutating while iteration: correctness and speed.  For 
beginners, the general advice "Don't do it" is not bad.  However:
  
Removing items from a list *works* when iterating in reverse if removal is done 
by index (del mylist[i] rather than value (mylist.remove(value)).  But it turns 
an inherently O(n:=len(list)) operation into a slow O(n*n) operation.  

The usually recommended alternative is to make a new list of things not 
deleted.  But one can do this in-place by writing the new list on top of the 
old by using a explicit second index to move items just once.

I reopened to add to the programming FAQ Sequences (Tuples/Lists) section
How do you remove multiple items from a list?
after the current
How do you remove duplicates from a list?

--
nosy: +terry.reedy
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue41773] Clarify handling of infinity and nan in random.choices

2020-09-12 Thread Ram Rachum


Ram Rachum  added the comment:

I disagree, especially the bit about slowing down the function, since you're 
checking the total, not every element. Like the check for negative numbers that 
you do on line 493. But it's your call.

--

___
Python tracker 

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



[issue41765] tkinter: XFCE task switcher shows 'Tk' instead of Window title

2020-09-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The Xfce task switcher appears to be showing the tk widget '_class' option.  
When tkinter create a tk widget, it by default sets the 'class' option to the 
tkinter class name.  This is 'Tk' and 'Toplevel' respectively for the visible 
windows in the example code and for IDLE. (IDLE withdraws the original root Tk 
window.) Why Xfce shows the '-class' rather than the title is an issue between 
tcl/tx, Xfce, and maybe the OS, but should not involve tkinter.  We are not 
going to change how it sets the 'class' option.  So I am closing this.

I opened issue 41775 for changing the IDLE Shell window title.

--
resolution:  -> not a bug
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



[issue41775] IDLE: change Shell window title

2020-09-12 Thread Terry J. Reedy


New submission from Terry J. Reedy :

The IDLE Shell window title is set with pyshell line 836
shell_title = "Python " + python_version() + " Shell"
The python_version() part was added in March 2013 by the first patch for issue 
17390: https://hg.python.org/cpython/rev/74d9a9507019.

In issue 41765, Mark Summerfield suggested in a side-comment that the title 
should be 'IDLE'.

E. Paine agreed that it should be changed, suggesting that it contributes to 
the fact that "there are lots people when first starting who think the IDLE 
shell *is the* Python shell".  I have noticed this fact on Stackoverflow, where 
about half the questions tagged 'python-idle' have nothing to do with IDLE.  (I 
regularly remove such mistaken tags.)  I have wondered why and how to better 
counter this.  For one thing, it results in users blaming IDLE for Python 
behavior, such as not running buggy code.  I never noticed before that IDLE 
promotes the confusion a bit in the shell title.

Issues such as #37903 (move prompt to shell sidebar, which I am planning to 
review soon) and #37892 (separate input area) will differentiate the IDLE Shell 
from the standard REPL even more.

Paine suggested 'IDLE  Shell'.  I don't want to suggest that IDLE is 
independently versioned, and prefer 'IDLE Shell ()'.  The 
parenthesized version is used for editor windows (and was also added by 
#17390).  On Windows, mousing over a taskbar icon initially shows about 10-14 
variable-width letters of the title.  Is 'Shell' or '3.x.y' more important to 
be ensured of visibility?

Other suggestions and comments?

[If IDLE becomes a tabbed-window application, the window title would be 'IDLE 
(version)' and the shell would be on a 'Shell' tab.]

--
assignee: terry.reedy
components: IDLE
messages: 376819
nosy: cheryl.sabella, epaine, taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: change Shell window title
type: enhancement
versions: Python 3.10, 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



[issue39232] asyncio crashes when tearing down the proactor event loop

2020-09-12 Thread Caleb Hattingh


Change by Caleb Hattingh :


--
nosy: +cjrh

___
Python tracker 

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



[issue41746] Add optional type information to asdl_seq objects

2020-09-12 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue41770] Import module doesn't updated

2020-09-12 Thread chen-y0y0


chen-y0y0  added the comment:

--REOPEN--
>>> # I try:
>>> import xxx
>>> del sys.modules['xxx']
>>> # But:
Traceback (most recent call last):
  File "", line 1, in 
del sys.modules['xxx']
NameError: name 'sys' is not found
>>> # I try to import sys.
>>> import sys
>>> del sys.modules['xxx']
>>> import xxx
>>> xxx.b
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'xxx' has no attribute 'b'

--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

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



[issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch

2020-09-12 Thread Bug Reporter


Bug Reporter  added the comment:

Can test_ssl script determine which TLS versions are enabled in a particular 
Linux distribution and run tests only for enabled versions?

--

___
Python tracker 

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



[issue41773] Clarify handling of infinity and nan in random.choices

2020-09-12 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

In general NaNs wreak havoc on any function that uses comparisons:

>>> max(10, nan)
10
>>> max(nan, 10)
nan

It isn't the responsibility of the functions to test for NaNs.  Likewise, it 
would not make sense to document the NaN behavior in every function that uses a 
comparison.  That would clutter the docs and it puts the responsibility in the 
wrong place.

It is the NaN itself that is responsible for the behavior you're seeing.  It is 
up to the NaN documentation to discuss its effects on downstream code.  For 
example, sorting isn't consistent when NaNs are present:

>>> sorted([10, nan, 5])
[10, nan, 5]
>>> sorted([5, nan, 10])
[   5, nan, 10]

Also, a NaN is just one of many possible objects that create weird downstream 
effects.  For examples, sets have a partial ordering and would also create odd 
results with sorted(), bisect(), max(), min(), etc.

The situation with Infinity is similar.  It is a special object that has the 
unusual property that inf+1==inf, so bisection of cumulative sums will give the 
rightmost infinity.

Consider a population 'ABC' and weights of [5, 7, 2].  We have

Element   Weight   Cumulative Weight  Range (half-open interval)
---   --   -  --
  A 5  5  0.0  <= X < 5.0
  B 7  12 5.0  <= X < 12.0
  C 2  14 12.0 <= X < 14.0
  --
   14

The selector X comes from:  random() * 14.0 which gives a range of: 0.0 <= X < 
14.0.

Now consider a population 'ABC' and weights of [5, 0, 2].  We have

Element   Weight   Cumulative Weight  Range (half-open interval)
---   --   -  --
  A 5  5  0.0  <= X < 5.0
  B 0  5  5.0  <= X < 5.0
  C 2  7  5.0  <= X < 7.0
  --
7

If X is 5.0, we have to choose C because B has a zero selection probabliity.  
So have to pick the rightmost (bottommost) range that has 5.0, giving the C.

Now, replace B's weight with float('Inf'):

Element   Weight   Cumulative Weight  Range (half-open interval)
---   --   -  --
  A 5  5  0.0  <= X < 5.0
  BInf Inf5.0  <= X < Inf
  C 2  InfInf  <= X < Inf
  --
   Inf

Since Inf+2 is Inf and Inf==Inf, the latter two ranges are undifferentiated.  
The selector itself in always Inf because "X = random() * inf" always gives 
inf.  Using the previous rule, we have to choose the rightmost Inf which is C.  
This is in fact what choices() does:

>>> choices('ABC', [5, float('Inf'), 2])
['C']

It isn't an error.  That is the same behavior that bisect() has when searching 
for a infinite value (or any other object that universally compares larger than 
anything except itself):

>>> bisect([10, 20, inf], inf)
3
>>> bisect([10, 20, 30], inf)
3

When searching for infinity, you always get the rightmost insertion point even 
if the cuts points are finite.  Accordingly, it makes sense that if one of the 
weights is infinite, then the total infinite, and the selector is infinite, so 
you always get the rightmost value.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-12 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21277
pull_request: https://github.com/python/cpython/pull/2

___
Python tracker 

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



[issue31369] re.RegexFlag is not included in __all__, makes type inference less useful

2020-09-12 Thread Ethan Furman


Ethan Furman  added the comment:

Guido, do you have an opinion on adding `RegexFlag` to the `re` module's 
`__all__` and documenting it?

There is also some discussion on making these types of int-to-Enum conversions 
use a `module.name` repr instead of `class.name`:

used to be:

>>> re.I


is now:

>>> re.I
re.IGNORECASE

I of course have no idea if that matters to typing one way or the other.

--

___
Python tracker 

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



[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2020-09-12 Thread Ethan Furman


Ethan Furman  added the comment:

Antony,

My apologies for the delay.

What I would like to see is a real example of how you would use this new 
feature if it were implemented.  I'm guessing it would look something like:

class MyEnum(Enum):

locals.update(*some magic here*)

def a_method(self):
...

Am I right?  If yes, what does *some magic here* look like?  If no, what would 
your code actually look like?

--

___
Python tracker 

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



[issue32218] add __iter__ to enum.Flag members

2020-09-12 Thread Ethan Furman


Change by Ethan Furman :


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

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-09-12 Thread mohamed koubaa


Change by mohamed koubaa :


--
pull_requests: +21275
pull_request: https://github.com/python/cpython/pull/0

___
Python tracker 

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



[issue41772] Zipfile.testzip considers wrong password as correct

2020-09-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

I believe what testzip is doing is validating the structural integrity of the 
file, which appears can be tested without decrypting the contents.

Although it is odd that if you don't call setpassword, even with the wrong 
password, testzip will raise a RuntimeError.

See https://en.wikipedia.org/wiki/Zip_(file_format)#Encryption for a few scant 
details.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41773] Clarify handling of infinity and nan in random.choices

2020-09-12 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Sorry, I don't see the point in cluttering the documentation or over-specifying 
the function for these non-sensensical toy experiments.  AFAICT, no actual 
problem exists in practice.  

Also, we don't want to slow down the function by running scans for infinities 
or NaNs.  That would make the function worse for all users and better for 
almost no one.

--
resolution:  -> not a bug
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



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2020-09-12 Thread igs


igs  added the comment:

As mentioned above standard Apache does not accept the extra characters anymore 
and produces '500 internal error'. So the normal behaviour of this module makes 
things worse in most cases instead of being helpful.

--
nosy: +igs

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Paul Moore


Paul Moore  added the comment:

Yeah, apologies - I saw the email notification, but Eric removed me from the 
nosy list (quite reasonably) and I didn't notice there had been extra 
discussion :-(

If someone wants to re-open the issue, feel free.

--

___
Python tracker 

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



[issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments

2020-09-12 Thread Julian Berman


Julian Berman  added the comment:

Totally fair! Sorry, was just making sure the label change wasn't intended to 
say it *wasn't* enough to warrant a design change :) (which I agree should be 
discussed with folks who do use that functionality, of which I only recently 
had to).

--

___
Python tracker 

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



[issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them

2020-09-12 Thread hai shi


Change by hai shi :


--
pull_requests: +21274
pull_request: https://github.com/python/cpython/pull/22219

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I think Eric left the issue open because he was hoping to update the FAQs 
and/or docs with information about this issue.

I will leave it to someone else to decide whether or not to reopen it.

--

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Paul Moore


Paul Moore  added the comment:

There is a bug in your program. You should not mutate the list while looping 
over it.

--
nosy: +paul.moore

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Paul Moore


Change by Paul Moore :


--
resolution:  -> not a bug
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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

You say:

"output should be empty list"

but that's not actually correct. You intend the output to be the empty list, 
but if you think carefully about what happens during iteration, you should see 
that the behaviour is correct.

To make it easier to see what is happening, let's use different values:

L = [20, 21, 22]


On the first iteration, the interpreter looks at position 0, which is 20. You 
remove 20 from the list, which shrinks the list down to:

L = [21, 22]

Now it is 21 in position 0. But that iteration of the loop is finished, so the 
interpreter looks at position 1, which is 22. You remove 22 from the list, 
giving:

L = [21]

and the interpreter looks at position 2, which does not exist, so the loop 
finishes.


>>> L = [20, 21, 22]
>>> for i in L:
... L.remove(i)
... print('i', i, 'L is now:', L)
... 
i 20 L is now: [21, 22]
i 22 L is now: [21]
>>> L
[21]


So the interpreter did exactly what you told it to do. The problem is that what 
you told it to do is not what you wanted it to do.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

Removing Windows and IDLE devs from nosy list, since this isn't related to 
either of those areas.

--
nosy:  -paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Documentation -IDLE, Windows

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

You should not mutate a list while iterating over it.

See, for example 
https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list

I couldn't find a place where this is mentioned in the python list docs. If 
it's not there, we should add something to the programming FAQ.

--
nosy: +eric.smith

___
Python tracker 

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



[issue41774] While removing element from list using for and remove(), which has same items output is not right

2020-09-12 Thread Sreedevi


New submission from Sreedevi :

Define a list which has all same elements.
While removing the same element from list using for loop and by using remove() 
method, output should be empty list, but the output we get is one element is 
unremoved

--
assignee: terry.reedy
components: IDLE, Windows
files: listrepxxx.py
messages: 376803
nosy: paul.moore, sreedevi.ha, steve.dower, terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: While removing element from list using for and remove(), which has same 
items output is not right
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file49454/listrepxxx.py

___
Python tracker 

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



[issue41773] Clarify handling of infinity and nan in random.choices

2020-09-12 Thread Ram Rachum


New submission from Ram Rachum :

I was recently tripped up by a bug caused by passing infinite weights to 
random.choices. I toyed around with that function, and it seemed that when it's 
given weights that include infinity or NaN, it selects a specific element, 
always without being random. That's regardless of whether multiple items have 
infinity weights. It chooses a different specific item if the infinity is 
negative. The specific item isn't always the one that has the infinite weight.

I don't know whether that's the intended behavior for some reason, or whether 
it's even possible to define a logical behavior for infinite weights. If it's 
not possible, then maybe this function should raise an errors when given 
weights that include infinity or nan.

I see that the documentation states that the weights must be non-negative; 
maybe we should have a check for that too.

--
components: Library (Lib)
messages: 376802
nosy: cool-RR
priority: normal
severity: normal
status: open
title: Clarify handling of infinity and nan in random.choices
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue41773] Clarify handling of infinity and nan in random.choices

2020-09-12 Thread Ram Rachum


Change by Ram Rachum :


--
nosy: +rhettinger

___
Python tracker 

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



[issue41765] tkinter: XFCE task switcher shows 'Tk' instead of Window title

2020-09-12 Thread E. Paine


E. Paine  added the comment:

Thank you for reporting this issue. I wanted to start by pointing out a finer 
detail: the XFCE program title on the task switcher (the thing you're reporting 
and I don't have a clue how to describe) is not the same as the default window 
title (the program title is "Tk" and the default window title is "tk").

Going further, we can show this is not a tkinter issue by running wish and 
changing the window title (`wm title . {Test App}`). The result is the program 
title as "Wish" and the subtitle as "Test App". In short, tkinter sits on-top 
Tcl/Tk and it is quite probable that Tk is the program XFCE *saw* as reponsible 
for the window. I think its unlikely you could change this without modifying 
and compiling your own version of Tk (someone please do correct me if I'm 
wrong).

Again, thank you for reporting this issue, though I think it should be closed.

> the taskbar entry is 'Python 3.6.9 Shell' (ought really to be 'IDLE')

I agree the current title is probably not ideal (there are lots people when 
first starting who think the IDLE shell *is the* Python shell) though I think 
we still need the version and word "shell" in it (e.g. "IDLE 3.6.9 Shell"). I 
personally don't see it as too big an issue, but have nosied Terry in case he 
wants to add something on this.

--
nosy: +epaine, gpolo, serhiy.storchaka, terry.reedy
title: XFCE task switcher shows 'Tk' insteadl of Window title -> tkinter: XFCE 
task switcher shows 'Tk' instead of Window title
versions: +Python 3.10, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thanks Norbert for the contribution!

--
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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 3a150c77c31da240f1b92cab9ec74f1fa701b869 by Miss Islington (bot) 
in branch '3.8':
bpo-41672: Fix type mismatches in imaplib docs (GH-22207) (#22218)
https://github.com/python/cpython/commit/3a150c77c31da240f1b92cab9ec74f1fa701b869


--

___
Python tracker 

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



[issue41744] NuGet python.props only works in python nuget, not other variants

2020-09-12 Thread Vaclav Slavik


Vaclav Slavik  added the comment:

Sorry for the omission (fixed now), and thanks for your patience!

--

___
Python tracker 

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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-12 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Terry.

--

___
Python tracker 

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



[issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows

2020-09-12 Thread neonene

neonene  added the comment:

I applied PR 21961 to master and comfirmed no crash.
I'll close this issue. Thanks for your quick reply.

--
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



[issue41731] test_cmd_line_script fails with verbosity level more than 1

2020-09-12 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
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



[issue23706] pathlib.Path.write_text should include a newline argument

2020-09-12 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +easy
stage:  -> needs patch
versions: +Python 3.10 -Python 3.5

___
Python tracker 

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



[issue41765] XFCE task switcher shows 'Tk' insteadl of Window title

2020-09-12 Thread Mark Summerfield


Mark Summerfield  added the comment:

Same applied to IDLE for Python 3.8

--

___
Python tracker 

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



[issue41765] XFCE task switcher shows 'Tk' insteadl of Window title

2020-09-12 Thread Mark Summerfield


Mark Summerfield  added the comment:

I just ran IDLE and it seems to have the same problem. Although the taskbar 
entry is 'Python 3.6.9 Shell' (ought really to be 'IDLE'), when context 
switching the switcher shows the correct icon but the title 'Toplevel'.

--

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread miss-islington


miss-islington  added the comment:


New changeset 98f6e67a3d6e57727177ec2fb5cb68ef9a468aca by Miss Islington (bot) 
in branch '3.9':
bpo-41672: Fix type mismatches in imaplib docs (GH-22207)
https://github.com/python/cpython/commit/98f6e67a3d6e57727177ec2fb5cb68ef9a468aca


--

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread Dong-hee Na


Change by Dong-hee Na :


--
versions:  -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21273
pull_request: https://github.com/python/cpython/pull/22218

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +21272
pull_request: https://github.com/python/cpython/pull/22217

___
Python tracker 

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



[issue41672] imaplib: wrong return type documented

2020-09-12 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset c75330605d4795850ec74fdc4d69aa5d92f76c00 by Norbert Cyran in 
branch 'master':
bpo-41672: Fix type mismatches in imaplib docs (GH-22207)
https://github.com/python/cpython/commit/c75330605d4795850ec74fdc4d69aa5d92f76c00


--

___
Python tracker 

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



[issue39651] Exceptions raised by EventLoop.call_soon_threadsafe

2020-09-12 Thread miss-islington


miss-islington  added the comment:


New changeset 7dfcc8e0795cce6a8cb42ae2a7f159a38da6b38a by Miss Islington (bot) 
in branch '3.9':
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
https://github.com/python/cpython/commit/7dfcc8e0795cce6a8cb42ae2a7f159a38da6b38a


--

___
Python tracker 

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



[issue39651] Exceptions raised by EventLoop.call_soon_threadsafe

2020-09-12 Thread miss-islington


miss-islington  added the comment:


New changeset 530d1105ed7b0aa5ef76e3116918fe39bc6a4823 by Miss Islington (bot) 
in branch '3.8':
bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197)
https://github.com/python/cpython/commit/530d1105ed7b0aa5ef76e3116918fe39bc6a4823


--

___
Python tracker 

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



[issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows

2020-09-12 Thread STINNER Victor


STINNER Victor  added the comment:

If it's another _ast regression, see bpo-41631: I proposed PR 21961 to fix it.

I failed to reproduce the issue on Linux with a debug build, on the development 
master branch:

./python -m venv env
env/bin/python -m pip install pyflakes flake8
env/bin/python -m pyflakes Lib/turtle.py 
env/bin/python -m flake8 Lib/turtle.py

--

___
Python tracker 

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



[issue41756] Do not always use exceptions to return result from coroutine

2020-09-12 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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