[issue18280] Documentation is too personalized

2020-07-27 Thread Michael Felt


Michael Felt  added the comment:

Thanks. afaik, double spacing is a 'feature' a programmer added to a
text processing language - of the WYSIWUG kind, because program's such
as troff/nroff
didn't need them. They, rather it, understood that a period followed by
a space indicated the end of a sentence.

On 26/07/2020 18:39, Serhiy Storchaka wrote:
> Serhiy Storchaka  added the comment:
>
> I think they are not required, but recommended.
>
> >From https://www.python.org/dev/peps/pep-0008/#comments:
>
>You should use two spaces after a sentence-ending period in multi- 
> sentence comments, except after the final sentence.
>
> >From https://www.python.org/dev/peps/pep-0012/#general:
>
>You must adhere to the Emacs convention of adding two spaces at the end of 
> every sentence.
>
> AFAIK in English typography the space after a sentence-ending period is 
> longer than spaces between words. In other European typographies they have 
> the same width.

I thought it was where type setters, classically, used the break between
the endings of a sentence - additional 'kerning' could be applied there.

Anyway - final question: does .rst reformat line-lingths, or does it
present everything literally - only adding ``embellishments``. I have
been thinking
it does both - and, yet another convention for sentence endings is to
always start a sentence on a new line (and two new-lines indicate
start of a paragraph.

However, for now - double-spaces will remain - and I hope to remember to
add my own :)

> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue40891] Use PEP 573 in functools

2020-07-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm dropping off the nosy list.  It's not something that I understand and can 
help with.  Adding Serhiy, he might be able to review this.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue18280] Documentation is too personalized

2020-07-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy:  -rhettinger

___
Python tracker 

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



[issue18280] Documentation is too personalized

2020-07-27 Thread Matej Cepl


Change by Matej Cepl :


--
nosy:  -mcepl

___
Python tracker 

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



[issue41345] Remote end closed connection without response

2020-07-27 Thread Michal Arbet

Michal Arbet  added the comment:

Hello,

Thank you very much for help, I created pull request for urllib3 ->
https://github.com/urllib3/urllib3/pull/1911
Can u just confirm that this could be fixed in urllib3 as it is in pull
request ? Have I fixed it by good way ?

Thanks.
Michal Arbet
( kevko )

pá 24. 7. 2020 v 20:29 odesílatel Guido van Rossum 
napsal:

>
> Guido van Rossum  added the comment:
>
> This surely is some application corner case. Closing.
>
> --
> nosy: +gvanrossum
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41406] BufferedReader causes Popen.communicate losing the remaining output.

2020-07-27 Thread Frost Ming


New submission from Frost Ming :

The following snippet behaves differently between Windows and POSIX.

import subprocess
import time


p = subprocess.Popen("ls -l", shell=True, stdout=subprocess.PIPE, 
stderr=subprocess.PIPE)

print(p.stdout.read(1))   # read 1 byte
print(p.communicate())# Returns empty output

It works fine on Windows and Python 2.x(communicate() returning the remaining 
output). So from the best guess it should be the expected behavior.

The reason behind this is that Popen.stdout is a BufferedReader. It stores all 
output in the buffer when calling read(). However, communicate() and the lower 
API _communicate() use a lower level method os.read() to get the output, which 
does not respect the underlying buffer. When an empty output is retrieved the 
file object is closed then.

First time to submit a bug report and pardon me if I am getting anything wrong.

--
components: 2to3 (2.x to 3.x conversion tool), IO, Library (Lib)
messages: 374366
nosy: Frost Ming, brett.cannon, vstinner
priority: normal
severity: normal
status: open
title: BufferedReader causes Popen.communicate losing the remaining output.
versions: Python 3.10, Python 3.7, 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



[issue41406] BufferedReader causes Popen.communicate losing the remaining output.

2020-07-27 Thread Frost Ming


Change by Frost Ming :


--
type:  -> behavior

___
Python tracker 

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



[issue34723] lower() on Turkish letter "İ" returns a 2-chars-long string

2020-07-27 Thread Philippe Ombredanne

Philippe Ombredanne  added the comment:

Şahin Kureta you wrote:
> I know it is not finalized and released yet but are you going to
> implement Version 14.0.0 of the Unicode Standard? 
> It finally solves the issue of Turkish lower/upper case 'I' and 'i'.

Thank you for the pointer!

I guess this spec could likely be under consideration for Python when it 
becomes final (but unlikely before?).

--

___
Python tracker 

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



[issue41349] Tk window not going full screen on 90° rotated screen on mac

2020-07-27 Thread E. Paine


E. Paine  added the comment:

I am unfortunately unable to reproduce the issue (with the method provided by 
Ronald), but the way to create a blank window (equivalent to `import tkinter; 
tkinter.Tk()`) is simply to run `wish` in a terminal without giving it any 
commands (using `exit` to escape the shell after the test).

--
nosy: +epaine

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-07-27 Thread Tony Reix


Tony Reix  added the comment:

On AIX 7.2, with libffi compiled with -O0 -g, I have:

1) Call to memchr thru memchr_args_hack
#0  0x091b0d60 in memchr () from /usr/lib/libc.a(shr_64.o)
#1  0x0900058487a0 in ffi_call_DARWIN () from 
/opt/freeware/lib/libffi.a(libffi.so.6)
#2  0x090005847eec in ffi_call (cif=0xfff, fn=0xca90, 
rvalue=0xfff, avalue=0xca80) at ../src/powerpc/ffi_darwin.c:31
#3  0x0900058f9900 in ?? ()
#4  0x0900058ebb6c in ?? ()
#5  0x09000109fc18 in _PyObject_MakeTpCall () from 
/opt/freeware/lib64/libpython3.8.so

r3 0xa3659e0720575940382841312
r4 0x64 100
r5 0x7  7
(gdb) x/s $r3
0xa3659e0:  "abcdef"

2) Call to memchr thru memchr_args_hack2
#0  0x091b0d60 in memchr () from /usr/lib/libc.a(shr_64.o)
#1  0x0900058487a0 in ffi_call_DARWIN () from 
/opt/freeware/lib/libffi.a(libffi.so.6)
#2  0x090005847eec in ffi_call (cif=0xfff, fn=0xca90, 
rvalue=0xfff, avalue=0xca80) at ../src/powerpc/ffi_darwin.c:31
#3  0x0900058f9900 in ?? ()
#4  0x0900058ebb6c in ?? ()
#5  0x09000109fc18 in _PyObject_MakeTpCall () from 
/opt/freeware/lib64/libpython3.8.so

r3 0xa3659e0720575940382841312
r4 0x64 100
r5 0x0  0

So, it looks like, when libffi is not compiled with -O but with -O0 -g, that in 
64bit ffi_call_DARWIN() is call in both cases (memchr_args_hack and 
memchr_args_hack2).
However, as seen previously, it was not the case with libffi built with -O .

Moreover, we have in source code:
  switch (cif->abi)
{
case FFI_AIX:
  ffi_call_AIX(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
   FFI_FN(ffi_prep_args));
  break;
case FFI_DARWIN:
  ffi_call_DARWIN(&ecif, -(long)cif->bytes, cif->flags, ecif.rvalue, fn,
  FFI_FN(ffi_prep_args), cif->rtype);

Why calling ffi_call_DARWIN instead of ffi_call_AIX ?

Hummm Will rebuild libffi and python both with gcc -O0 -g -gdwarf and look at 
details.

--

___
Python tracker 

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



[issue34723] lower() on Turkish letter "İ" returns a 2-chars-long string

2020-07-27 Thread Christian Heimes


Christian Heimes  added the comment:

We don't update the unicodedata database in patch releases because updates are 
backwards incompatible. Python 3.9 will ship with 13.0. Python 3.10 is going to 
ship with 14.0.

--

___
Python tracker 

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



[issue41407] Tricky behavior of builtin-function map

2020-07-27 Thread DarrenDanielDay


New submission from DarrenDanielDay :

# The following is a tricky example:

# This is an example function that possibly raises `StopIteration`.
# In some cases, this function may raise `StopIteration` in the first iteration.
def raise_stop_iteration(param):
if param == 10:
raise StopIteration
# Suppose this function will do some simple calculation
return -param

# Then when we use builtin-function `map` and for-loop:

print('example 1'.center(30, '='))
for item in map(raise_stop_iteration, range(5)):
print(item)
print('end of example 1'.center(30, '='))

# It works well. The output of example 1 is 0 to -4.
# But the following can be triky:

print('example 2'.center(30, '='))
for item in map(raise_stop_iteration, range(10, 20)):
print(item)
print('end of example 2'.center(30, '='))

# The output of exapmle 2 is just nothing,
# and no errors are reported,
# because `map` simply let the exception spread upward when executing 
`raise_stop_iteration(10)`.
# However, the exception type is StopIteration, so the for-loop catches it and 
breaks the loop,
# assuming this is the end of the loop.
# When the exception raised from buggy mapping function is exactly 
`StopIteration`, 
# for example, functions implemented with builtin-function `next`, 
# it can be confusing to find the real issue.

# I think it might be better improved in this way:

class my_map:
def __init__(self, mapping_function, *iterators):
self.mapping = mapping_function
self.iterators = iterators

def __iter__(self):
for parameter_tuple in zip(*self.iterators):
try:
yield self.mapping(*parameter_tuple)
except BaseException as e:
raise RuntimeError(*e.args) from e

# It works like the map in most cases:

print('example 3'.center(30, '='))
for item in my_map(raise_stop_iteration, range(5)):
print(item)
print('end of example 3'.center(30, '='))

# And then, the crash of the buggy mapping function will be reported:
print('example 4'.center(30, '='))
for item in my_map(raise_stop_iteration, range(10, 20)):
print(item)
print('end of example 4'.center(30, '='))

--
components: Library (Lib)
files: issue.py
messages: 374371
nosy: DarrenDanielDay
priority: normal
severity: normal
status: open
title: Tricky behavior of builtin-function map
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file49342/issue.py

___
Python tracker 

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



[issue41407] Tricky behavior of builtin-function map

2020-07-27 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Converting *all* exceptions into RuntimeError is certainly not a good idea, 
especially since you include KeyboardInterrupt and other non-errors.

I'm probably going to be on the losing side of this one (I lost the argument 
back when a similar issue was raised about comprehensions), but I argue that 
this is not a bug it is a useful feature.

Having the map function raise StopIteration is a good way for the map to halt 
the loop early, when it detects a special sentinel or condition. A few years 
ago the change to comprehensions broke my code so I changed to map, and now you 
want to break it again :-(

--
nosy: +steven.daprano

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Avinash Maddikonda


New submission from Avinash Maddikonda :

Add a `clamp` function to the `math` module which does something like this:  
  
```py
def clamp(value=0.5, minimum=0, maximum=1):
"""Clamps the *value* between the *minimum* and *maximum* and returns it..


"""

return max(minimum, min(value, maximum))
```
  
Because even `C++` has built-in clamp function (`std::clamp`) (which can be 
used using `#include `)

--
components: Library (Lib)
messages: 374373
nosy: SFM61319
priority: normal
severity: normal
status: open
title: Add a `clamp` function to the `math` module
type: enhancement
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



[issue41398] cgi module, parse_multipart fails

2020-07-27 Thread Magnus Johnsson


Magnus Johnsson  added the comment:

https://github.com/yohanboniface/falcon-multipart/issues/8

It would seem that the same issue pops up elsewhere. We do indeed set the 
content-type, as per the default examples for unity.

--

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-07-27 Thread Tony Reix


Tony Reix  added the comment:

After adding traces and after rebuilding Python and libffi with -O0 -g -gdwarf, 
it appears that, still in 64bit, the bug is still there, but that ffi_call_AIX 
is called now instead of ffi_call_DARWIN from ffi_call() routine of 
../src/powerpc/ffi_darwin.c (lines 915...).
???

# ./Pb.py
TONY: libffi: src/powerpc/ffi_darwin.c : FFI_AIX
TONY: libffi: cif->abi: 1  -(long)cif->bytes : -144  cif->flags : 8  
ecif.rvalue : fffd1f0  fn: 9001000a0082640  FFI_FN(ffi_prep_args) : 
9001000a0483be8
b'def'
TONY: libffi: src/powerpc/ffi_darwin.c : FFI_AIX
TONY: libffi: cif->abi: 1  -(long)cif->bytes : -144  cif->flags : 8  
ecif.rvalue : fffd220  fn: 9001000a0082640  FFI_FN(ffi_prep_args) : 
9001000a0483be8
b'def'
TONY: libffi: src/powerpc/ffi_darwin.c : FFI_AIX
TONY: libffi: cif->abi: 1  -(long)cif->bytes : -144  cif->flags : 8  
ecif.rvalue : fffd220  fn: 9001000a0082640  FFI_FN(ffi_prep_args) : 
9001000a0483be8
None

In 32bit with same build environment, a different code is run since the traces 
are not printed.

Thus, 32bit and 64bit are managed very differently.

--

___
Python tracker 

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



[issue18280] Documentation is too personalized

2020-07-27 Thread Michael Felt


Change by Michael Felt :


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

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be a duplicate of https://bugs.python.org/issue36788

--
nosy: +xtreak

___
Python tracker 

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



[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There are two errors in test_io, both are not related to AIX.

The first one is in test_fspath_support. It is exposed on non-UTF-8 locales. 
AIX by accident use ISO8859-1 locale by default.

The second one is in test_reader_writer_close_error_on_close and related to 
garbage collector. Seems it is only exposed when run this test separately.

--

___
Python tracker 

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



[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Akuli


New submission from Akuli :

The pop method of collections.deque can't be used like deque.pop(index), even 
though `del deque[index]` or deque.pop() without an argument works. This breaks 
the Liskov substitution principle because collections.abc.MutableMapping 
supports the .pop(index) usage. Is this intentional?

related typeshed issue: https://github.com/python/typeshed/issues/4364

--
components: Library (Lib)
messages: 374378
nosy: Akuli
priority: normal
severity: normal
status: open
title: deque.pop(index) is not supported

___
Python tracker 

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



[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Michael Felt

Michael Felt  added the comment:

Excellent!!

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]git pr 21640
remote: Enumerating objects: 50, done.
remote: Counting objects: 100% (50/50), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 58 (delta 46), reused 48 (delta 46), pack-reused 8
Unpacking objects: 100% (58/58), done.
>From https://github.com/python/cpython
 * [new ref] refs/pull/21640/head -> pr_21640

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]./python -m test
test_io
0:00:00 Run tests sequentially
0:00:00 [1/1] test_io
test_io passed in 1 min

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1 min
Tests result: SUCCESS

On 27/07/2020 16:16, Serhiy Storchaka wrote:
> Change by Serhiy Storchaka :
>
>
> --
> keywords: +patch
> pull_requests: +20781
> stage:  -> patch review
> pull_request: https://github.com/python/cpython/pull/21640
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

deque is not a subclass of MutableMapping, so the Liskov substitution principle 
is not related here.

deque is not registered as a virtual subclass of MutableMapping and it lacks a 
number of MutableMapping methods.

>>> import collections.abc
>>> issubclass(collections.deque, collections.abc.MutableMapping)
False
>>> sorted(set(dir(collections.abc.MutableMapping)) - 
>>> set(dir(collections.deque)))
['_MutableMapping__marker', '__abstractmethods__', '__module__', '__slots__', 
'_abc_impl', 'get', 'items', 'keys', 'popitem', 'setdefault', 'update', 
'values']

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Akuli


Akuli  added the comment:

I meant MutableSequence instead of MutableMapping. Oops.

--

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

>>> issubclass(collections.deque, collections.abc.MutableSequence)
True
>>> sorted(set(dir(collections.abc.MutableSequence)) - 
>>> set(dir(collections.deque)))
['__abstractmethods__', '__module__', '__slots__', '_abc_impl']

Well, it is a bug.

--
type:  -> behavior

___
Python tracker 

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



[issue41386] Popen.wait does not account for negative return codes

2020-07-27 Thread Eryk Sun


Eryk Sun  added the comment:

> in the windows API they seam to not know whether to use a ulong or a uint

This usage requires C `long int` to be the same size as `int` in 64-bit Windows.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Yuan


Yuan  added the comment:

Same status as slicing support from MutableSequence.

--
nosy: +Yuan

___
Python tracker 

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



[issue41410] Opening a file in binary mode makes a difference on all platforms in Python 3

2020-07-27 Thread Bob Kline


New submission from Bob Kline :

The documentation for tempfile.mkstemp() says "If text is specified, it 
indicates whether to open the file in binary mode (the default) or text mode. 
On some platforms, this makes no difference." That might have been true for 
Python 2.x, but in Python 3, there are no platforms for which the choice 
whether to open a file in binary mode makes no difference.

--
assignee: docs@python
components: Documentation
messages: 374385
nosy: bkline, docs@python
priority: normal
severity: normal
status: open
title: Opening a file in binary mode makes a difference on all platforms in 
Python 3
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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Shubham Kumar Jha


Shubham Kumar Jha  added the comment:

Hi, I want to start contributing to CPython. Can I take up this issue?

--
nosy: +ShubhamKJha

___
Python tracker 

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



[issue40841] Provide mimetypes.sniff API as stdlib

2020-07-27 Thread Dong-hee Na


Dong-hee Na  added the comment:

> This looks like a useful addition. I hope someone will take up the review!

Thank you guido!
I also think that this API is good to be added to the standard library and it 
would be very useful!

I hope that someone would like to interest in this issue ;)

--

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Avinash Maddikonda


Avinash Maddikonda  added the comment:

Oh, I didn't know that. But I was thinking of adding it to the math module and 
not as a built-in method. I mean, it is definitely more useful than copysign, 
right?

--

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-07-27 Thread Tony Reix


Tony Reix  added the comment:

Fedora32/x86_64 : Python v3.8.5 has been built.
Issue is still there, but different in debug or optimized mode.
Thus, change done in https://bugs.python.org/issue22273 did not fix this issue.

./Pb-3.8.5-debug.py :
#!/opt/freeware/src/packages/BUILD/Python-3.8.5/build/debug/python
...

i./Pb-3.8.5-optimized.py :
#!/opt/freeware/src/packages/BUILD/Python-3.8.5/build/optimized/python


BUILD=debug
export 
LD_LIBRARY_PATH=/opt/freeware/src/packages/BUILD/Python-3.8.5/build/debug:/usr/lib64:/usr/lib
export 
PYTHONPATH=/opt/freeware/src/packages/BUILD/Python-3.8.5/build/debug/Modules
./Pb-3.8.5-debug.py
b'def'
None
None

BUILD=optimized
export 
LD_LIBRARY_PATH=/opt/freeware/src/packages/BUILD/Python-3.8.5/build/optimized:/usr/lib64:/usr/lib
export 
PYTHONPATH=/opt/freeware/src/packages/BUILD/Python-3.8.5/build/optimized/Modules
+ ./Pb-3.8.5-optimized.py
b'def'
Pb-3.8.5.sh: line 6: 103569 Segmentation fault  (core dumped) 
./Pb-3.8.5-$BUILD.py

--

___
Python tracker 

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



[issue41394] Document '_' in interpreter in shell tutorial

2020-07-27 Thread Shubham Kumar Jha


Shubham Kumar Jha  added the comment:

The link provided by Karthikeyan Singaravelan doesn't mention that `_` would 
only get the not-None values. It is a part of interpreter and hence should be 
documented there. If no one is working on a patch, I would like to submit one.

--
nosy: +ShubhamKJha

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-07-27 Thread Tony Reix


Change by Tony Reix :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I will leave it to math module experts to keep it open or close it. There 
wasn't strong consensus on adding it math module either without a discussion in 
python-ideas https://bugs.python.org/msg358789.

--
nosy: +mark.dickinson, rhettinger, stutzbach

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-07-27 Thread Tony Reix


Tony Reix  added the comment:

Fedora32/x86_64 : Python v3.8.5 : optimized : uint type.

If, instead of using ulong type, the Pb.py program makes use of uint, the issue 
is different: see below.
This means that the issue depends on the length of the data.

BUILD=optimized
TYPE=int
export 
LD_LIBRARY_PATH=/opt/freeware/src/packages/BUILD/Python-3.8.5/build/optimized:/usr/lib64:/usr/lib
export 
PYTHONPATH=/opt/freeware/src/packages/BUILD/Python-3.8.5/build/optimized/Modules
./Pb-3.8.5-int-optimized.py
b'def'
None
None

# cat ./Pb-3.8.5-int-optimized.py
#!/opt/freeware/src/packages/BUILD/Python-3.8.5/build/optimized/python

# #!/opt/freeware/src/packages/BUILD/Python-3.8.5/python
#   #!/usr/bin/env python3

from ctypes import *

libc = CDLL('/usr/lib64/libc-2.31.so')

class MemchrArgsHack(Structure):
_fields_ = [("s", c_char_p), ("c", c_uint), ("n", c_uint)]

memchr_args_hack = MemchrArgsHack()
memchr_args_hack.s = b"abcdef"
memchr_args_hack.c = ord('d')
memchr_args_hack.n = 7

class MemchrArgsHack2(Structure):
_fields_ = [("s", c_char_p), ("c_n", c_uint * 2)]

memchr_args_hack2 = MemchrArgsHack2()
memchr_args_hack2.s = b"abcdef"
memchr_args_hack2.c_n[0] = ord('d')
memchr_args_hack2.c_n[1] = 7

print( CFUNCTYPE(c_char_p, c_char_p, c_uint, c_uint, c_void_p)(('memchr', 
libc))(b"abcdef", c_uint(ord('d')), c_uint(7), None))
print( CFUNCTYPE(c_char_p, MemchrArgsHack, c_void_p)(('memchr', 
libc))(memchr_args_hack, None))
print( CFUNCTYPE(c_char_p, MemchrArgsHack2, c_void_p)(('memchr', 
libc))(memchr_args_hack2, None))

--

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Avinash Maddikonda


Avinash Maddikonda  added the comment:

So should I delete/reject this now? Because I think it would be more useful 
than functions like copysign (I mean copysign can be written easily without 
confusion, but clamp is confusing sometimes as the max function takes minimum 
and the min of value and the maximum, and yet we have a copysign function but 
not a clamp built-in or a math module function).

(I'll delete/reject if you guys want me to, np)

--

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Ezio Melotti

Ezio Melotti  added the comment:

I was just just trying to link to someone the documentation for f-strings, but:
1) Searching "fstring" only returns two results about xdrlib[0];
2) Searching "f-string" returns many unrelated results[1];
3) The first (and closer) result (string -- Common string operations[2]) yields 
nothing while using ctrl+f with fstring, f-string, f', f";
4) at the top of that page there are two links in a "see also":
  * Text Sequence Type — str[3]: it mentions raw strings at the beginning, but 
also yields no results for fstring, f-string, f', f";
  * String Methods[4]: that is another section of the previous page (so ctrl+f 
doesn't find anything), but has a link to "Format String Syntax"[5];
5) The "Format String Syntax" page[5] has another link in the middle of a 
paragraph that points to "formatted string literals", that eventually brings us 
to the right page[6];
6) the "right page"[6] has a wall of text with a block of code containing the 
grammar, luckily followed by a few examples.

I think we should:
1) add index entries for "f-string" and "fstring" in the relevant sections of 
the docs, so that they appear in the search result;
2) in the Text Sequence Type — str[3] section, have a bullet list for 
f-strings, raw-strings, and possibly u-strings;
3) possibly use the term "f-string" in addition (or instead) of "formatted 
string literal", to make the pages more ctrl+f-friendly throughout the docs;
4) possibly have another more newbie-friendly section on f-string (compared to 
the lexical analysis page) in the tutorial, in the stdtypes page[7] (e.g. 
before the printf-style String Formatting" section[8]), or in the string 
page[2] (e.g. after the "Format String Syntax" section[10]);
5) possibly reorganize and consolidate the different sections about strings, 
string methods, str.format(), the format mini-language, f-strings, 
raw/unicode-strings, %-style formatting in a single page or two (a page for the 
docs and one for the grammar), since it seems to me that over the years these 
sections got a bit scattered around as they were being added.

If you think this is out of the scope of this issue, I can open a separate one.

[0]: https://docs.python.org/3/search.html?q=fstring
[1]: https://docs.python.org/3/search.html?q=f-string
[2]: https://docs.python.org/3/library/string.html
[3]: https://docs.python.org/3/library/stdtypes.html#textseq
[4]: https://docs.python.org/3/library/stdtypes.html#string-methods
[5]: https://docs.python.org/3/library/string.html#formatstrings
[6]: https://docs.python.org/3/reference/lexical_analysis.html#f-strings
[7]: https://docs.python.org/3/library/stdtypes.html
[8]: 
https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting

--
nosy: +ezio.melotti
type:  -> enhancement

___
Python tracker 

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



[issue38628] Issue with ctypes in AIX

2020-07-27 Thread David Edelsohn


David Edelsohn  added the comment:

Tony, Please see my reply from 2020-02-05.  This is a known "bug" in Python 
ctypes.  This is documented in Python ctypes.  This will not be fixed.  This 
cannot be fixed.

Python ctypes converts the array to a structure and creates an incorrect libffi 
descriptor.  The call to libffi creates a "fake" descriptor (description of the 
arguments) that doesn't match the actual data.  It cannot work.

This should be closed as "wont fix".

--

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Avinash Maddikonda


Avinash Maddikonda  added the comment:

Okay, I'm rejecting this issue. But please let me know/contribute if anyone is 
going to add a clamp function as a built-in method or a math module function.

--

___
Python tracker 

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



[issue41408] Add a `clamp` function to the `math` module

2020-07-27 Thread Avinash Maddikonda


Change by Avinash Maddikonda :


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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Those are really good observations and proposals, Ezio! I agree that it might 
be better to separate them into a new issue. Can you also review 
https://github.com/python/cpython/pull/21552 (the second PR here by 
amaajemyfren)? Maybe it would actually make a good candidate for part (4) of 
your proposed solutions.

@Ama Aje My Fren: please look at my review of 
https://github.com/python/cpython/pull/21509 and implement my suggestions, then 
we can merge that one and close *this* issue.

--

___
Python tracker 

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



[issue41411] Improve and consolidate f-strings docs

2020-07-27 Thread Ezio Melotti

New submission from Ezio Melotti :

[Creating a new issue from #41045]

I was just just trying to link to someone the documentation for f-strings, but:
1) Searching "fstring" only returns two results about xdrlib[0];
2) Searching "f-string" returns many unrelated results[1];
3) The first (and closer) result (string -- Common string operations[2]) yields 
nothing while using ctrl+f with fstring, f-string, f', f";
4) at the top of that page there are two links in a "see also":
  * Text Sequence Type — str[3]: it mentions raw strings at the beginning, but 
also yields no results for fstring, f-string, f', f";
  * String Methods[4]: that is another section of the previous page (so ctrl+f 
doesn't find anything), but has a link to "Format String Syntax"[5];
5) The "Format String Syntax" page[5] has another link in the middle of a 
paragraph that points to "formatted string literals", that eventually brings us 
to the right page[6];
6) the "right page"[6] has a wall of text with a block of code containing the 
grammar, luckily followed by a few examples.

I think we should:
1) add index entries for "f-string" and "fstring" in the relevant sections of 
the docs, so that they appear in the search result;
2) in the Text Sequence Type — str[3] section, have a bullet list for 
f-strings, raw-strings, and possibly u-strings;
3) possibly use the term "f-string" in addition (or instead) of "formatted 
string literal", to make the pages more ctrl+f-friendly throughout the docs;
4) possibly have another more newbie-friendly section on f-string (compared to 
the lexical analysis page) in the tutorial, in the stdtypes page[7] (e.g. 
before the printf-style String Formatting" section[8]), or in the string 
page[2] (e.g. after the "Format String Syntax" section[10]);
5) possibly reorganize and consolidate the different sections about strings, 
string methods, str.format(), the format mini-language, f-strings, 
raw/unicode-strings, %-style formatting in a single page or two (a page for the 
docs and one for the grammar), since it seems to me that over the years these 
sections got a bit scattered around as they were being added.

[0]: https://docs.python.org/3/search.html?q=fstring
[1]: https://docs.python.org/3/search.html?q=f-string
[2]: https://docs.python.org/3/library/string.html
[3]: https://docs.python.org/3/library/stdtypes.html#textseq
[4]: https://docs.python.org/3/library/stdtypes.html#string-methods
[5]: https://docs.python.org/3/library/string.html#formatstrings
[6]: https://docs.python.org/3/reference/lexical_analysis.html#f-strings
[7]: https://docs.python.org/3/library/stdtypes.html
[8]: 
https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting

--
assignee: docs@python
components: Documentation
messages: 374398
nosy: docs@python, eric.smith, ezio.melotti
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve and consolidate f-strings docs
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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Ezio Melotti


Ezio Melotti  added the comment:

> I agree that it might be better to separate them into a new issue.

I created #41411.

--

___
Python tracker 

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



[issue41411] Improve and consolidate f-strings docs

2020-07-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think this is an excellent idea. The main f-string docs being in a section 
titled "Lexical Analysis" never seemed very user-friendly.

--

___
Python tracker 

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



[issue24599] urllib URLopener().open https url returns 501 Not Implemented when https_proxy env var is http://

2020-07-27 Thread Stefano Mazzucco


Stefano Mazzucco  added the comment:

Closing as this bug refers to versions of Python that have been EOL'd.

--
resolution:  -> wont fix
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



[issue41406] BufferedReader causes Popen.communicate losing the remaining output.

2020-07-27 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue41411] Improve and consolidate f-strings docs

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

It's basically an accident that the only f-strings docs are in the language 
reference. Yes, they should be there, and the text there is pretty good *for 
the reference*, but there isn't much about them elsewhere outside of the 
tutorial, so everything links there. Maybe we need a section on them in the 
library part, of intermediate complexity between what's in the tutorial an 
what's in the reference. This could be on equal footing with the descriptions 
of % formatting and .format(), which seem to be quite extensive. We might also 
be able to share some text between .format() and f-strings, since the `!x` and 
`:...` parts are treated identically AFAICT. This would be another refactoring 
of some part of the docs.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-07-27 Thread Martin Borus


New submission from Martin Borus :

I just installed Python 3.9.0b5 using the provided beta installer 
python-3.9.0b5-amd64 on a Windows7, 64bit machine.

I did the installation without the Py Launcher update, into the folder 
"c:\python39"

The installer finished without problem.

Running "cmd.exe", navigating to "c:\python39" and then running python.exe 
results in an error message popup which tells me in
German system language that the "api-ms-win-core-path-l1-1-0.dll" is missing on 
the computer. I googled for it and it seems that this dll is not a part of 
Windows 7.

Message:


---
python.exe - Systemfehler
---
Das Programm kann nicht gestartet werden, da api-ms-win-core-path-l1-1-0.dll 
auf dem Computer fehlt. Installieren Sie das Programm erneut, um das Problem zu 
beheben. 
---
OK   
---

--
components: Windows
messages: 374403
nosy: Martin Borus, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: After installation on Windows7, 64bit Python 3.9.0b5 reports 
"api-ms-win-core-path-l1-1-0.dll" missing and doesn't start
type: resource usage
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



[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-07-27 Thread Martin Borus


Martin Borus  added the comment:

Changed "component" from "resource" to "crash" because it seems to fit better.

--
type: resource usage -> crash

___
Python tracker 

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



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-07-27 Thread Irv Kalb


Irv Kalb  added the comment:

Right.  I'm struggling with this bug every day.

Irv

> On Jul 23, 2020, at 9:09 AM, Ned Deily  wrote:
> 
> 
> Ned Deily  added the comment:
> 
> Ramon, I am not sure why you closed this issue. Perhaps it may no longer be a 
> problem for you, but it has not yet been resolved for users of the python.org 
> macOS installers.
> 
> --
> stage: resolved -> 
> status: closed -> open
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 67987acd5dc9776f55f4e139e2b3d9e7a6434d9f by Serhiy Storchaka in 
branch 'master':
bpo-41401: Fix test_fspath_support in test_io. (GH-21640)
https://github.com/python/cpython/commit/67987acd5dc9776f55f4e139e2b3d9e7a6434d9f


--

___
Python tracker 

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



[issue41413] At prompt for input(), pressing Command q kills IDLE

2020-07-27 Thread Irv Kalb


New submission from Irv Kalb :

This is probably related to earlier problems with running IDLE on MacOS 
Catalina:

Environment:

MacOS Catalina:  10.15.5
Python: 3.7.3
IDLE: 3.7.3

Steps to reproduce:

- Open IDLE, create a new file.  (Can reopen this file again for subsequent 
tests.)

- Code can consist of a single line:

dontCare = input('While this prompt for input is up, press Command q: ')

- Save and run

- When you see the prompt, press Command q to quit.

- See correct dialog box:  Your program is still running!  Do you want to kill 
it?

- Press OK.

Results:

- Python program quits.  Source file window closes. IDLE is left in an 
"unstable" state with only the IDLE menu option available.

At this point, any attempt to do anything with IDLE crashes IDLE, and shows a 
Mac system dialog box:

IDLE quit unexpectedly.  Click Reopen to open the application. Click Report to 
.


Note:  This is not a huge deal because I have to restart IDLE anyway because of 
a bug 38946, which does not allow me to allow me to double click on a Python 
file if IDLE is already running.  But I thought this new information might help 
track things down.



I have run in to this because I am correcting many student's homework files, 
where I ask them to build a loop where they ask the user for information, do 
some processing, and generate output with that information.  Then the loop goes 
around again and asks for input again.  I want to quit the application at that 
point, but I always end up crashing IDLE.

--
assignee: terry.reedy
components: IDLE, macOS
messages: 374407
nosy: IrvKalb, ned.deily, ronaldoussoren, terry.reedy
priority: normal
severity: normal
status: open
title: At prompt for input(), pressing Command q kills IDLE
type: crash
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



[issue41362] Regenerating parser table fails (windows)

2020-07-27 Thread Constant Marks


Constant Marks  added the comment:

Thanks for the help.  I got my modification working by modifying the 
python.gram file and running build.bat --regen.

--

___
Python tracker 

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



[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Automatic backport does not work due to changes in the test.support module. 
Victor, do you mind to backport PR 21640 to 3.9 and 3.8?

--
nosy: +vstinner

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 72cabb2aa636272e608285f5a6ba83b62be9be4e by Pablo Galindo in 
branch 'master':
bpo-40939: Use the new grammar for the grammar specification documentation 
(GH-19969)
https://github.com/python/cpython/commit/72cabb2aa636272e608285f5a6ba83b62be9be4e


--

___
Python tracker 

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



[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-07-27 Thread Eryk Sun


Eryk Sun  added the comment:

> running python.exe results in an error message popup which tells me ...
> that the "api-ms-win-core-path-l1-1-0.dll" is missing on the computer. 
> I googled for it and it seems that this dll is not a part of Windows 7.

Microsoft ended extended support for Windows 7 back in January of this year, so 
Python 3.9 does not support Windows 7, in accordance with PEP 11 [1]. I'd 
expect the installer to fail on unsupported versions of Windows.

[1]: https://www.python.org/dev/peps/pep-0011/#microsoft-windows

--
nosy: +eryksun

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-27 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +20782
pull_request: https://github.com/python/cpython/pull/21641

___
Python tracker 

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



[issue41413] At prompt for input(), pressing Command q kills IDLE

2020-07-27 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. Actually this behavior is not specific to running IDLE 
on macOS, it's also reproducible on Linux and on all current versions of IDLE.

--
components:  -macOS
nosy:  -ronaldoussoren
versions: +Python 3.10, 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



[issue40939] Remove the old parser

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

The old parser is completely gone from the 3.10 branch. Closing.

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



[issue39959] Bug on multiprocessing.shared_memory

2020-07-27 Thread Diogo Flores


Diogo Flores  added the comment:

I have tried a different approach using https://gitlab.com/tenzing/shared-array 
and I got it to perform well on Linux. 
Basically, the code above places all numpy arrays in /dev/shm which allows you 
to access and modify them from any number of processes without creating any 
copies; for deleting is equally simple - The code provides a SharedArray.list() 
to list all objects that itself placed in /dev/shm and so one can just iterate 
over the list and delete each element. (An easier approach is to use PathLib 
and just unlik all shared memory objects in /dev/shm)

I guess a solution based on Mat's code could be adapted to try and solve  the 
shared-memory problems.

I look forward for further discussion on the subject.

Diogo

--

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Hi, I want to start contributing to CPython. Can I take up this issue?

Sure, go ahead. Feel free to ping one of us in the PR for review

--
nosy: +pablogsal

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-27 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +20783
pull_request: https://github.com/python/cpython/pull/21642

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset e6b2d93f0c3891827f609ecac1ced21e1626ed0a by Guido van Rossum in 
branch '3.9':
[3.9] bpo-40939: Use the new grammar for the grammar specification 
documentation (GH-19969) (#21641)
https://github.com/python/cpython/commit/e6b2d93f0c3891827f609ecac1ced21e1626ed0a


--

___
Python tracker 

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



[issue40939] Remove the old parser

2020-07-27 Thread miss-islington


miss-islington  added the comment:


New changeset b3fbff7289176ba1a322e6899c3d4a04880ed5a7 by Lysandros Nikolaou in 
branch 'master':
bpo-40939: Remove even more references to the old parser (GH-21642)
https://github.com/python/cpython/commit/b3fbff7289176ba1a322e6899c3d4a04880ed5a7


--

___
Python tracker 

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



[issue41000] IDLE: only allow single instance

2020-07-27 Thread E. Paine


E. Paine  added the comment:

Is it worth me developing a PR for this issue, as it may be a suitable fix for 
#38946? (I am not guaranteeing any code, though, but I will try). If not, I 
will probably close this issue.

--

___
Python tracker 

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



[issue41059] Large number of Coverity reports for parser.c

2020-07-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

I tried reprodicing the coverity results using cppcheck (I don't have access to 
the coverity project, someone needs to approve :() and I got just a dozen of 
results:

❯ cppcheck Parser/parser.c --enable=style
Checking Parser/parser.c ...
Parser/parser.c:3280:22: style: Condition '_res==NULL' is always false 
[knownConditionTrueFalse]
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:3275:16: note: Assuming that condition 'a=_gather_33_rule(p)' 
is not redundant
(a = _gather_33_rule(p))  // ','.import_from_as_name+
   ^
Parser/parser.c:3279:20: note: Assignment '_res=a', assigned value is 0
_res = a;
   ^
Parser/parser.c:3280:22: note: Condition '_res==NULL' is always false
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:3365:22: style: Condition '_res==NULL' is always false 
[knownConditionTrueFalse]
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:3360:16: note: Assuming that condition 'a=_gather_36_rule(p)' 
is not redundant
(a = _gather_36_rule(p))  // ','.dotted_as_name+
   ^
Parser/parser.c:3364:20: note: Assignment '_res=a', assigned value is 0
_res = a;
   ^
Parser/parser.c:3365:22: note: Condition '_res==NULL' is always false
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:6072:22: style: Condition '_res==NULL' is always false 
[knownConditionTrueFalse]
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:6067:16: note: Assuming that condition 'a=_loop1_68_rule(p)' is 
not redundant
(a = _loop1_68_rule(p))  // (('@' named_expression NEWLINE))+
   ^
Parser/parser.c:6071:20: note: Assignment '_res=a', assigned value is 0
_res = a;
   ^
Parser/parser.c:6072:22: note: Condition '_res==NULL' is always false
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:10662:22: style: Condition '_res==NULL' is always false 
[knownConditionTrueFalse]
if (_res == NULL && PyErr_Occurred()) {
 ^
Parser/parser.c:10657:16: note: Assuming that condition 'a=expression_rule(p)' 
is not redundant
(a = expression_rule(p))  // expression
   ^
Parser/parser.c:10661:20: note: Assignment '_res=a', assigned value is 0
_res = a;
   ^
Parser/parser.c:10662:22: note: Condition '_res==NULL' is always false
if (_res == NULL && PyErr_Occurred()) {

--

___
Python tracker 

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



[issue41405] python 3.9.0b5 test

2020-07-27 Thread YoSTEALTH


YoSTEALTH  added the comment:

>>> /opt/python/3.9.0/bin/python3 -m test.pythoninfo
Python debug information


CC.version: gcc (GCC) 10.1.0
Py_DEBUG: No (sys.gettotalrefcount() missing)
_decimal.__libmpdec_version__: 2.5.0
builtins.float.double_format: IEEE, little-endian
builtins.float.float_format: IEEE, little-endian
config[_config_init]: 2
config[_init_main]: 1
config[_install_importlib]: 1
config[_isolated_interpreter]: 0
config[_orig_argv]: ['/opt/python/3.9.0/bin/python3', '-m', 'test.pythoninfo']
config[_use_peg_parser]: 1
config[argv]: ['-m']
config[base_exec_prefix]: '/opt/python/3.9.0'
config[base_executable]: '/opt/python/3.9.0/bin/python3'
config[base_prefix]: '/opt/python/3.9.0'
config[buffered_stdio]: 1
config[bytes_warning]: 0
config[check_hash_pycs_mode]: 'default'
config[configure_c_stdio]: 1
config[dev_mode]: 0
config[dump_refs]: 0
config[exec_prefix]: '/opt/python/3.9.0'
config[executable]: '/opt/python/3.9.0/bin/python3'
config[faulthandler]: 0
config[filesystem_encoding]: 'utf-8'
config[filesystem_errors]: 'surrogateescape'
config[hash_seed]: 0
config[home]: None
config[import_time]: 0
config[inspect]: 0
config[install_signal_handlers]: 1
config[interactive]: 0
config[isolated]: 0
config[malloc_stats]: 0
config[module_search_paths]: ['/opt/python/3.9.0/lib/python39.zip', 
'/opt/python/3.9.0/lib/python3.9', 
'/opt/python/3.9.0/lib/python3.9/lib-dynload']
config[optimization_level]: 0
config[parse_argv]: 1
config[parser_debug]: 0
config[pathconfig_warnings]: 1
config[platlibdir]: 'lib'
config[prefix]: '/opt/python/3.9.0'
config[program_name]: '/opt/python/3.9.0/bin/python3'
config[pycache_prefix]: None
config[pythonpath_env]: None
config[quiet]: 0
config[run_command]: None
config[run_filename]: None
config[run_module]: 'test.pythoninfo'
config[show_ref_count]: 0
config[site_import]: 1
config[skip_source_first_line]: 0
config[stdio_encoding]: 'utf-8'
config[stdio_errors]: 'strict'
config[tracemalloc]: 0
config[use_environment]: 1
config[use_hash_seed]: 0
config[user_site_directory]: 1
config[verbose]: 0
config[warnoptions]: []
config[write_bytecode]: 1
config[xoptions]: []
datetime.datetime.now: 2020-07-27 14:03:42.099769
expat.EXPAT_VERSION: expat_2.2.8
fips.openssl_fips_mode: 0
gdb_version: GNU gdb (GDB) 9.2
gdbm.GDBM_VERSION: 1.18.1
global_config[Py_BytesWarningFlag]: 0
global_config[Py_DebugFlag]: 0
global_config[Py_DontWriteBytecodeFlag]: 0
global_config[Py_FileSystemDefaultEncodeErrors]: 'surrogateescape'
global_config[Py_FileSystemDefaultEncoding]: 'utf-8'
global_config[Py_FrozenFlag]: 0
global_config[Py_HasFileSystemDefaultEncoding]: 0
global_config[Py_HashRandomizationFlag]: 1
global_config[Py_IgnoreEnvironmentFlag]: 0
global_config[Py_InspectFlag]: 0
global_config[Py_InteractiveFlag]: 0
global_config[Py_IsolatedFlag]: 0
global_config[Py_NoSiteFlag]: 0
global_config[Py_NoUserSiteDirectory]: 0
global_config[Py_OptimizeFlag]: 0
global_config[Py_QuietFlag]: 0
global_config[Py_UTF8Mode]: 0
global_config[Py_UnbufferedStdioFlag]: 0
global_config[Py_VerboseFlag]: 0
global_config[_Py_HasFileSystemDefaultEncodeErrors]: 0
locale.encoding: UTF-8
os.cpu_count: 16
os.environ[DISPLAY]: :0
os.environ[HOME]: /home/stealth
os.environ[LANG]: en_CA.UTF-8
os.environ[LC_ADDRESS]: en_CA.UTF-8
os.environ[LC_IDENTIFICATION]: en_CA.UTF-8
os.environ[LC_MEASUREMENT]: en_CA.UTF-8
os.environ[LC_MONETARY]: en_CA.UTF-8
os.environ[LC_NAME]: en_CA.UTF-8
os.environ[LC_NUMERIC]: en_CA.UTF-8
os.environ[LC_PAPER]: en_CA.UTF-8
os.environ[LC_TELEPHONE]: en_CA.UTF-8
os.environ[LC_TIME]: en_CA.UTF-8
os.environ[PATH]: 
/home/stealth/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/cuda/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
os.environ[SHELL]: /bin/bash
os.environ[TERM]: xterm-256color
os.getcwd: /home/stealth
os.getegid: 1000
os.geteuid: 1000
os.getgid: 1000
os.getgrouplist: 1000, 3, 7, 10, 90, 91, 93, 95, 96, 98, 619
os.getgroups: 3, 7, 10, 90, 91, 93, 95, 96, 98, 619, 1000
os.getloadavg: (0.26, 0.6, 0.59)
os.getrandom: ready (initialized)
os.getresgid: (1000, 1000, 1000)
os.getresuid: (1000, 1000, 1000)
os.getuid: 1000
os.login: stealth
os.name: posix
os.supports_bytes_environ: True
os.supports_effective_ids: ['access']
os.supports_fd: ['chdir', 'chmod', 'chown', 'execve', 'listdir', 'pathconf', 
'scandir', 'stat', 'statvfs', 'truncate', 'utime']
os.supports_follow_symlinks: ['access', 'chown', 'link', 'stat', 'utime']
os.umask: 0o022
os.uname: posix.uname_result(sysname='Linux', nodename='stealth', 
release='5.8.0-1-MANJARO', version='#1 SMP PREEMPT Sun Jul 26 22:13:04 UTC 
2020', machine='x86_64')
platform.architecture: 64bit ELF
platform.libc_ver: glibc 2.31
platform.platform: Linux-5.8.0-1-MANJARO-x86_64-with-glibc2.31
platform.python_implementation: CPython
pre_config[_config_init]: 2
pre_config[allocator]: 0
pre_config[coerce_c_locale]: 0
pre_config[coerce_c_locale_warn]: 0
pre_config[configure_locale]: 1
pre_config[dev_mode]:

[issue41405] python 3.9.0b5 test

2020-07-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The lnotab warning is probably a bug in gcc 10

--
nosy: +pablogsal

___
Python tracker 

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



[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-27 Thread Ian O'Shaughnessy

Ian O'Shaughnessy  added the comment:

"Leak" was likely the wrong word.

It does appear problematic though.

The loop is using a fixed number of variables (yes, there are repeated dynamic 
allocations, but they fall out of scope with each iteration), only one of these 
variables occupies 1MB of ram (aside from the static variable).

The problem: There's only really one variable occupying 1MB of in-scope memory, 
yet the app's memory usage can/will exceed 1GB after extended use.

At the very least, this is confusing – especially given the lack of user 
control to prevent it from happening once it's discovered as a problem.

--

___
Python tracker 

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



[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-27 Thread Howard A. Landman


Howard A. Landman  added the comment:

I'm running under 32-bit Raspbian, so let's assume the magic number is 13. 
There are only two places in my own code where the number 13 appears:

(1) My result_list is 14 items long, i.e. 0 to 13. Relevant code from qtd.py:
cum_results = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
...
while batches != 0:
...
result_list = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
for m in range(ITERS):
...
result = tdc.measure(...)
result_list[result] += 1
...
for i in range(len(result_list)):
cum_results[i] += result_list[i]

I notice that result_list is getting thrown away each cycle, and thus must be 
garbage-collected. I could try changing that and see if it has any effect.

(2) in the tdc7201 library, 13 occurs as a possible (error) result code from 
measure(). However several of the failing runs had zero errors of this class, 
which means the code with 13 in it never got executed even once. I am not using 
pin 13 of the RPi's header, so I never send that number to RPi.GPIO. GPIO13 is 
pin 33 of the header, and I am not using that pin either, so I don't think 
RPi.GPIO is translating one of my pin number arguments to 13 internally. (But I 
should check Broadcom Mode numbers.)

--

___
Python tracker 

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



[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-27 Thread Tim Peters


Tim Peters  added the comment:

It's impossible for any implementation to know that cyclic trash _is_ trash 
without, in some way, traversing the object graph. This is expensive, so 
CPython (or any other language) does not incur that expense after every single 
decref that leaves a non-zero refcount (the one and only cheap clue that cyclic 
trash _may_ have just been created).

If you want/need synchronous behavior, avoid cycles. CPython's refcounting does 
dispose of trash the instant an object (not involved in a cycle) becomes trash. 
That behavior cannot be extended to cyclic trash short of (as above) running a 
cyclic gc pass extremely frequently.

I don't know of any language that guarantees all garbage will be collected 
"right away". Do you?  CPython does much more in that respect (due to primarily 
relying on refcounting) than most.

--

___
Python tracker 

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



[issue41414] AST for arguments shows extra element

2020-07-27 Thread James Foster


New submission from James Foster :

https://docs.python.org/3.8/library/ast.html shows seven elements:
arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,
 expr* kw_defaults, arg? kwarg, expr* defaults)

https://docs.python.org/3.7/library/ast.html shows six elements:
arguments = (arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults,
 arg? kwarg, expr* defaults)

based on ast.c:1479 I believe that six is the proper number and that the first 
element ("arg* posonlyargs, ") is a duplicate of the second element ("arg* 
args, ") and should be removed.

--
assignee: docs@python
components: Documentation
messages: 374425
nosy: docs@python, jgfoster
priority: normal
severity: normal
status: open
title: AST for arguments shows extra element
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue41414] AST for arguments shows extra element

2020-07-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

(arg* posonlyargs) is correct and was added to 3.8 as part of 
https://www.python.org/dev/peps/pep-0570/

--
nosy: +pablogsal
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



[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-27 Thread Ian O'Shaughnessy


Ian O'Shaughnessy  added the comment:

>I don't know of any language that guarantees all garbage will be collected 
>"right away". Do you?

I'm not an expert in this domain, so, no. I am however attempting to find a way 
to mitigate this issue. Do you have any suggestions how I can avoid these 
memory spikes? Weak references? Calling gc.collect() on regular intervals 
doesn't seem to work consistently.

--

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Ama Aje My Fren


Ama Aje My Fren  added the comment:

> then we can merge that one and close *this* issue.

I am looking at the pydoc issue now. It will take me more than an hour but I 
will figure it. Can that be under this issue also or (since you raised it as an 
OT) make that another issue?

--

___
Python tracker 

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



[issue41405] python 3.9.0b5 test

2020-07-27 Thread Jim Jewett


Jim Jewett  added the comment:

Is this a platform where 3.8 was working?

The curses test seems to think you have too many color-pairs defined, and this 
might well be part of a semi-compatible curses library. I guess I would add 
some output to the test showing how many (and which) color pairs it thinks 
there are.

The pwd complaint is correct, but seems like it is complaining about the 
interface between python and your OS.

The tkinter problem is really a failure to round a floating point, and I would 
be surprised if python had made changes there recently.  I would be slightly 
less surprised if something in the compile chain of tk for your system 
hard-coded a specific rounding format.

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I think your PR 21552 and any work you're doing on pydoc could go under the new 
issue 41411 that Ezio just opened.

--

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread miss-islington


miss-islington  added the comment:


New changeset 13efaec2e03288d7ff0ee643589c32bde6c6973c by amaajemyfren in 
branch 'master':
bpo-41045: Document debug feature of f-strings ('=') (GH-21509)
https://github.com/python/cpython/commit/13efaec2e03288d7ff0ee643589c32bde6c6973c


--
nosy: +miss-islington

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20784
pull_request: https://github.com/python/cpython/pull/21644

___
Python tracker 

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



[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Jim Jewett


Jim Jewett  added the comment:

It may well have been intentional, as deques should normally be mutated only at 
the ends.  But Raymond did make changes to conform to the ABC, so this should 
probably be supported too.  Go ahead and include docstrings and/or discouraging 
it, though, except for i=0 and i=-1

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +20785
pull_request: https://github.com/python/cpython/pull/21645

___
Python tracker 

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



[issue39959] Bug on multiprocessing.shared_memory

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I declare this a duplicate of issue 38119.

--
nosy: +gvanrossum
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> resource tracker destroys shared memory segments when other 
processes should still have valid access

___
Python tracker 

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



[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

@Davin, could you merge one or the other of the PRs that fix this? Presumably 
also backport to 3.9 and 3.8 (but that's up to you and the release manager).

--
nosy: +gvanrossum
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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset e962e3f65a086d9d3b848483fd01215d96ecc5f9 by Guido van Rossum in 
branch '3.9':
[3.9] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (GH-21645)
https://github.com/python/cpython/commit/e962e3f65a086d9d3b848483fd01215d96ecc5f9


--

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Change by Guido van Rossum :


--
pull_requests: +20786
pull_request: https://github.com/python/cpython/pull/21647

___
Python tracker 

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



[issue41406] BufferedReader causes Popen.communicate losing the remaining output.

2020-07-27 Thread Grégory Starck

Grégory Starck  added the comment:

also affecting 3.6

--
nosy: +g.sta...@gmail.com
versions: +Python 3.6

___
Python tracker 

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



[issue40841] Provide mimetypes.sniff API as stdlib

2020-07-27 Thread Jim Jewett


Jim Jewett  added the comment:

The standard itself says that it only applies to content served over http; if 
the content is retrieved by ftp or from a file system, then you should trust 
that.  I don't notice that in the code you pointed to.

So maybe filetype is the right answer if the data isn't coming over the 
network?  For whatwg demonstration code, it is reasonable to assume that, but 
in python -- at a minimum, you should document the assumption prominently in 
the docs and docstring.

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start

2020-07-27 Thread Steve Dower


Steve Dower  added the comment:

I thought we already made it fail? (Checks) No we did not. Guess I 
misremembered that.

I'll fix this tomorrow. We need it, or else we'll be inundated with these 
reports for the entire life of 3.9.

--
assignee:  -> steve.dower
priority: normal -> release blocker
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



[issue40841] Provide mimetypes.sniff API as stdlib

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Whether the data was retrieved over a network has nothing to do with it.

There are complementary ways of guessing what data you are working with -- 
guess based on the filename extension or sniff based on the contents of the 
file (or downloaded data).

There are a zillion reasons why the filename could be a lie -- e.g. a user 
could pick the wrong extension, or rename a file, or a tool could save a file 
using the wrong extension or no extension at all. Then again sometimes the 
contents of the file might not be enough, e.g.
```
foo() // bar
```
is both valid Python and valid JavaScript. :-)

--

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 3baff21f5bb8db7fa1c15788a8f82fa040a90d5d by Guido van Rossum in 
branch '3.8':
[3.8] bpo-41045: Document debug feature of f-strings ('=') (GH-21509) (#21647)
https://github.com/python/cpython/commit/3baff21f5bb8db7fa1c15788a8f82fa040a90d5d


--

___
Python tracker 

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



[issue41045] f-string's "debug" feature is undocumented

2020-07-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks Ama Aje My Fren! You can transfer your other PR to a different bpo issue 
by editing the subject on GitHub.

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



[issue41355] os.link(..., follow_symlinks=False) without linkat(3)

2020-07-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
nosy: +pablogsal
nosy_count: 1.0 -> 2.0
pull_requests: +20787
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/21648

___
Python tracker 

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



[issue18280] Documentation is too personalized

2020-07-27 Thread Jim Jewett


Jim Jewett  added the comment:

I won't speak of nroff or troff in particular, but many programs had trouble 
distinguishing the end of a sentence from an honorific abbreviation, such as 
Mr. Spock or Dr. Seuss.

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue41405] python 3.9.0b5 test

2020-07-27 Thread YoSTEALTH


YoSTEALTH  added the comment:

I compiled and tested for same issues in 3.8.5 and they exist as well.

--

___
Python tracker 

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



[issue41407] Tricky behavior of builtin-function map

2020-07-27 Thread Jim Jewett


Jim Jewett  added the comment:

Why would you raise StopIteration if you didn't want to stop the nearest 
iteration loop?  I agree that the result of your sample code seems strange, but 
that is because it is strange code.

I agree with Steven D'Aprano that changing it would cause more pain than it 
would remove.

Unless it gets a lot more support by the first week of August, I recommend 
closing this request as rejected.

--
nosy: +Jim.Jewett
status: open -> pending

___
Python tracker 

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



[issue1175686] add "reload" function to IDLE

2020-07-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage:  -> resolved

___
Python tracker 

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



[issue41389] Garbage Collector Ignoring Some (Not All) Circular References of Identical Type

2020-07-27 Thread Tim Peters


Tim Peters  added the comment:

Well, this isn't a help desk ;-) You may want instead to detail your problem 
on, say, StackOverflow, or the general Python mailing list.

Please note that I don't know what your "problem" _is_:  you haven't said. You 
posted some numbers that didn't make sense to you, and made unwarranted 
extrapolations from those (for example, no, those numbers won't get worse if 
you let the program run a million times longer).

So you should spell out what the "real" problem is. This shows signs of being 
an "XY problem":

http://xyproblem.info/

For example, now you say:

> Calling gc.collect() on regular intervals doesn't seem
> to work consistently

That's news to me. The code you posted shows quite different behavior when 
FORCE_GC is set.

But if it's true that calling gc.collect() regularly doesn't alleviate "the 
real problem" (whatever that may be!), then that shows the opposite of what you 
appear to be assuming: that Python's cyclic gc is the root of the cause. 
collect() _will_ reclaim every scrap of RAM that's actually trash at the time 
it's called. So if calling that doesn't help, the problem is almost certainly 
NOT that trash isn't getting reclaimed. Something else is the cause.

Examples: it's not actually trash. It is, and gc collects it, but is unable to 
return it to the C library from which the memory came. It is returned to the C 
library, but that in turn is unable to return the memory to the OS. It is 
returned to the OS, but the OS decides to leave its virtual address space 
mapped to the process for now.

Details not only matter, they _can_ be everything when dealing with the 
multiple layers of memory management on modern machines. Waiting for a "general 
insight" is probably futile here :-(

--

___
Python tracker 

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



[issue1721083] Add File - Reload

2020-07-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

All open files, up to the most recent 21 (and that could be increased) are in 
the recent file list.  Clicking on any name loads that file, unless it is 
already loaded.  The exception enforced in filelist.FileList.open, lines 29-32:

if key in self.dict:
edit = self.dict[key]
edit.top.wakeup()
return edit

I believe that we just need to ask, before the return, "Replace editor content 
with file content?" and if yes, call edit.io.loadfile(filename).

--
priority: low -> normal

___
Python tracker 

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



  1   2   >