[issue39498] Signpost security considerations in library

2020-06-24 Thread Christian Heimes


Christian Heimes  added the comment:

There are more features that should have security considerations, e.g. builtin 
functions like eval and exec.

--

___
Python tracker 

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



[issue39498] Signpost security considerations in library

2020-06-24 Thread Christian Heimes


Christian Heimes  added the comment:

+1

--
nosy: +christian.heimes

___
Python tracker 

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



[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Christian Heimes


Christian Heimes  added the comment:

The additional read may read the TLS shutdown alert from the wire. The TLS 
record layer can send additional messages besides application layer data, e.g. 
for post handshake authentication, sessions, rekeying, and to indicate that one 
side is shutting down the current TLS connection.

To investigate you can either use the undocumented SSLContext._msg_callback 
debug hook or Wireshark with SSLKEYLOGFILE env var (available since 3.8).

--
nosy: +christian.heimes

___
Python tracker 

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



[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-24 Thread Ram Rachum


Ram Rachum  added the comment:

I'll fix that typo.

--

___
Python tracker 

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



[issue41110] 2to3 reports some files as both not changing and having been modified

2020-06-24 Thread Ashley Whetter


New submission from Ashley Whetter :

Many of the fixers cause the tool to report a file as both unchanged and 
modified.

For example when checking a file with the following contents:

```
s = "str"
```

using the following command: `python -m lib2to3 -f unicode unicode_test.py`
The following is output:

```
RefactoringTool: No changes to unicode_test.py
RefactoringTool: Files that need to be modified:
RefactoringTool: unicode_test.py
```

When a fixer returns a node, even if it is the original node without changes, 
it is considered as a change to the code 
(https://github.com/python/cpython/blob/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b/Lib/lib2to3/refactor.py#L446-L447)
 and the file is later added to the list of modified files. I have not yet 
identified which fixers have this issue.

The fix appears to be that fixers need to be aware of when they have not made a 
change and should `None` when that is the case.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 372299
nosy: AWhetter
priority: normal
severity: normal
status: open
title: 2to3 reports some files as both not changing and having been modified
versions: Python 3.10, Python 3.5, Python 3.6, 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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-06-24 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pitrou

___
Python tracker 

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-06-24 Thread Étienne Pot

Étienne Pot  added the comment:

Note that this likely affect all methods which returns new Path by calling 
`_from_parts` or `_from_parsed_parts`, like `.absolute`, `.resolve`,...

--

___
Python tracker 

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-06-24 Thread Étienne Pot

New submission from Étienne Pot :

I have a subclass GithubPath of PurePosixPath.

```
class GithubPath(pathlib.PurePosixPath):

  def __new__(cls, *args, **kwargs):
print('New')
return super().__new__(cls, *args, **kwargs)

  def __init__(self, *args, **kwargs):
print('Init')
super().__init__()
```

Calling `child.parent` create a new GithubPath but without ever calling __new__ 
nor __init__. So my subclass is never notified it is created.

```
p = GithubPath()  # Print "New", "Init"

p.parent  # Create a new GithubPath but bypass the constructors
```

The reason seems to be that parent calls _from_parts which create a new object 
through `object.__new__(cls)`: 
https://github.com/python/cpython/blob/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b/Lib/pathlib.py#L689


A hack is to subclass `_init` but it seems hacky as it relies on internal 
implementation detail.

--
messages: 372297
nosy: Étienne Pot
priority: normal
severity: normal
status: open
title: subclasses of pathlib.PurePosixPath never call __init__ or __new__
type: behavior
versions: Python 3.10, Python 3.6, 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



[issue32884] Adding the ability for getpass to print asterisks when password is typed

2020-06-24 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr


Alexander Mohr  added the comment:

so I did some investigation into the difference between aiohttp + httpx and it 
appears that for some reason httpx does an extra read after the connection is 
closed.

--

___
Python tracker 

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



[issue41075] Make support of navigating through prev. commands in IDLE more conspicuous

2020-06-24 Thread wyz23x2


wyz23x2  added the comment:

Doesn't work? The  and  work perfectly in 3.8.3!
Th problem now is that only very few people know it. There should be a clearer 
way.

--
title: Add support of navigating through prev. commands in IDLE -> Make support 
of navigating through prev. commands in IDLE more conspicuous

___
Python tracker 

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



[issue39277] _PyTime_FromDouble() fails to detect an integer overflow when converting a C double to a C int64_t

2020-06-24 Thread Stefan Krah


Stefan Krah  added the comment:

Is it a bug in float.__trunc__()? It seems to me that the detailed comment 
accounts for case of rounding up.

That's why < is used instead of <=.

--
nosy: +skrah, tim.peters

___
Python tracker 

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



[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr


Alexander Mohr  added the comment:

I've updated https://repl.it/@thehesiod/PristineBonyBugs#main.py to contain 
both httpx + aiohttp testcases, and now httpx reproduces almost immediately and 
aiohttp is still ok

--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-06-24 Thread Stefan Krah


Stefan Krah  added the comment:

"""
* Doc/c-api/buffer.rst: the table with ".. c:macro:: PyBUF_INDIRECT" is wrong. 
Sphinx fails because PyBUF_SIMPLE is declared twice.
  => use ":c:macro:`PyBUF_INDIRECT`" instead
"""

Hmm, grep shows:

c-api/buffer.rst:123:  most cases such a request will be 
:c:macro:`PyBUF_SIMPLE` or :c:macro:`PyBUF_WRITABLE`.
c-api/buffer.rst:144:  If :c:member:`~Py_buffer.shape` is ``NULL`` as a 
result of a :c:macro:`PyBUF_SIMPLE`
c-api/buffer.rst:255:Since :c:macro:`PyBUF_SIMPLE` is defined as 0, 
:c:macro:`PyBUF_WRITABLE`
c-api/buffer.rst:258::c:macro:`PyBUF_FORMAT` can be \|'d to any of the flags 
except :c:macro:`PyBUF_SIMPLE`.
c-api/buffer.rst:280:| .. c:macro:: PyBUF_SIMPLE   |  NULL |   NULL  |NULL  
  |



So I see a single definition ans several references. Whether the definition may 
occur in a table is more a question for Georg. :)

It worked up to now and is quite useful, because you can jump directly into the 
correct row.


Escaping the "\*" was necessary at the time for vim syntax highlighting. I 
think it is no longer needed.  So everything has a reason :)

--
nosy: +skrah

___
Python tracker 

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



[issue35823] Use vfork() in subprocess on Linux

2020-06-24 Thread Yonatan Goldschmidt


Change by Yonatan Goldschmidt :


--
nosy: +Yonatan Goldschmidt

___
Python tracker 

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



[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr


Alexander Mohr  added the comment:

as an FYI I've reproduced this with the httpx library as well: 
https://repl.it/repls/PristineBonyBugs#main.py.  It reproduces on this site but 
I've been unable to reproduce it locally.  It does always reproduce on our 
production systems.

what's interesting is that it I can't seem to be able to reproduce it with 
aiohttp either on that site or locally:
https://repl.it/@thehesiod/PristineBonyBugs-1#main.py

does aiohttp do something to avoid this scenario?

--

___
Python tracker 

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



[issue40379] multiprocessing's default start method of fork()-without-exec() is broken

2020-06-24 Thread Julian Berman


Change by Julian Berman :


--
nosy: +Julian

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the patch!

--
nosy: +eric.araujo
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset ec05a7feed120503a3ad2dd4547eea2aa9a81dae by Miss Islington (bot) 
in branch '3.8':
bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081)
https://github.com/python/cpython/commit/ec05a7feed120503a3ad2dd4547eea2aa9a81dae


--

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset c1634ac834729eb46caf98efcb7e33b8698d54a7 by Miss Islington (bot) 
in branch '3.9':
bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081)
https://github.com/python/cpython/commit/c1634ac834729eb46caf98efcb7e33b8698d54a7


--

___
Python tracker 

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



[issue39498] Signpost security considerations in library

2020-06-24 Thread Éric Araujo

Éric Araujo  added the comment:

I think that we could make this easier with a custom directive that’s rendered 
into the appropriate markup during build and auto-generates the index page with 
links to all links.  No error-prone manual update needed!

--
nosy: +eric.araujo

___
Python tracker 

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



[issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized

2020-06-24 Thread PEW's Corner


PEW's Corner  added the comment:

I'm getting the same error (in 3.8.3) for this code:

o = bytearray(1)
o += o

There's no error if the second line is replaced with:

o += bytearray(1)

Not sure if this is related.

--
nosy: +pewscorner

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20292
pull_request: https://github.com/python/cpython/pull/21129

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20293
pull_request: https://github.com/python/cpython/pull/21130

___
Python tracker 

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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, you can already do this with map() and deque():

   deque(map(f, it), maxsize=0)

--

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b by Arisaka97 in branch 
'master':
bpo-40773: Fix rendering for 'retval' on the pdb page (GH-21081)
https://github.com/python/cpython/commit/cf18c9e9d4d44f6671a3fe6011bb53d8ee9bd92b


--
nosy: +miss-islington

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20291
pull_request: https://github.com/python/cpython/pull/21128

___
Python tracker 

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



[issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing.

2020-06-24 Thread Steve Dower


Steve Dower  added the comment:

Does it make the most sense for us to make .flush() also do an implicit 
.fsync() (when it's actually a file object)?

--

___
Python tracker 

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



[issue41108] IN module removed in python 3.x; socket doesn't fill in the gap with IP_PORTRANGE*

2020-06-24 Thread Enji Cooper


New submission from Enji Cooper :

The group that I work with uses the IN.py module to access constants available 
in netinet/in.h on BSD when adjusting socket port ranges.

This compile-time module was never ported forward to 3.x and equivalent 
functionality doesn't exist in the `socket` module. This bug will address that 
issue.

--
components: Extension Modules
messages: 372282
nosy: ngie
priority: normal
pull_requests: 20290
severity: normal
status: open
title: IN module removed in python 3.x; socket doesn't fill in the gap with 
IP_PORTRANGE*
type: enhancement
versions: Python 3.10, Python 3.5, Python 3.6, 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



[issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing.

2020-06-24 Thread Eryk Sun


Eryk Sun  added the comment:

In FSBO [1] section 6 "Time Stamps", note that the LastWriteTime value gets 
updated when an IRP_MJ_FLUSH_BUFFERS is processed. In the Windows API, this is 
a FlushFileBuffers [2] call. In the C runtime, it's a _commit [3] call, which 
is an os.fsync [4] call in Python. Calling the latter will update the directory 
entry for the file. 

For an example implementation in the FAT32 filesystem, see 
FatCommonFlushBuffers [5]. Note in the UserFileOpen case that it flushes any 
cached data via FatFlushFile and then updates the directory entry from the file 
control block (FCB) via FatUpdateDirentFromFcb, and finally it  flushes the 
parent directory control blocks (DCBs) -- and possibly also the volume.

Example with os.fsync:

import os
import time
import datetime

UPDATE_DIR = True

FILEPATH = 'C:/Temp/test/spam.txt'

def scan(filepath):
dir_path, filename = os.path.split(filepath)
with os.scandir(dir_path) as iter_dir:
for entry in iter_dir:
if entry.name == filename:
return entry

with open(FILEPATH, 'w') as f:
while True:
print('spam', file=f, flush=True)
if UPDATE_DIR:
os.fsync(f.fileno())
entry = scan(FILEPATH)
stat_result = entry.stat()
now = datetime.datetime.now()
print(f'st_mtime: {stat_result.st_mtime:0.3f}, '
  f'delta_t: {now.timestamp() - stat_result.st_mtime:0.3f}')
time.sleep(1.0)


[1] https://go.microsoft.com/fwlink/?LinkId=140636
[2] 
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-flushfilebuffers
[3] 
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/commit?view=vs-2019
[4] https://docs.python.org/3/library/os.html#os.fsync
[5] 
https://github.com/microsoft/Windows-driver-samples/blob/9afd93066dfd9db12f66099cf9ec44b6fd734b2d/filesys/fastfat/flush.c#L145

--
nosy: +eryksun

___
Python tracker 

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



[issue40986] Async generators are not garbage collected

2020-06-24 Thread Vytautas Liuolia


Change by Vytautas Liuolia :


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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Natsumi H.


Natsumi H.  added the comment:

If it won't be added do you reckon creating a library to solve this issue would 
be appropriate?

--

___
Python tracker 

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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I don't think something so obvious can be added, if you want a one liner you 
can write:

for e in iterable: f(e)

I think it would go in itertools if it were accepted.

--
nosy: +rhettinger

___
Python tracker 

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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Natsumi H.


Natsumi H.  added the comment:

Exactly that was the plan!

--

___
Python tracker 

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



[issue40986] Async generators are not garbage collected

2020-06-24 Thread Vytautas Liuolia


Vytautas Liuolia  added the comment:

I've now skimmed through the relevant Trio issue 
https://github.com/python-trio/trio/issues/265 and the currently deferred 
https://www.python.org/dev/peps/pep-0533/ and, as I understand, the issue is 
not trivial and subject to subtle edge cases.

Getting back to the issue, it looks like a misunderstanding on my side, sorry!

As per PEP-525:

The asyncio event loop will use sys.set_asyncgen_hooks() API to maintain a 
weak set of all scheduled asynchronous generators, and to schedule their 
aclose() coroutine methods when it is time for generators to be GCed.

It seems that my original test case just doesn't give these aclose() coroutines 
a chance to run. Awaiting an asyncio.sleep() "fixes" that.

--

___
Python tracker 

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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
components: +Library (Lib) -Interpreter Core

___
Python tracker 

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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

If I'm understanding correctly you want:

def xmap(f, iterable):
for e in iterable:
f(e)


Is that correct?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue41107] Running a generator in a map-like manner

2020-06-24 Thread Natsumi H.


New submission from Natsumi H. :

I suggest adding a function which behaves like map but without returning 
anything to iterate over a generator.

This is useful in cases where you need to run a function on every element in a 
list without unnecessarily creating a generator object like map would. 

I think given the existence of the map function that this should be added to 
Python.

--
components: Interpreter Core
messages: 372275
nosy: natsuwumi
priority: normal
severity: normal
status: open
title: Running a generator in a map-like manner
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



[issue41096] Need command to exit PDB interactive shell

2020-06-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you, now I understand the problem.

It is reasonable request, but a new feature can only be added in Python 3.10.

--
versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread J. Nick Koston


Change by J. Nick Koston :


--
nosy: +bdraco

___
Python tracker 

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



[issue41074] msilib does not work correctly with non-ASCII names

2020-06-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing.

2020-06-24 Thread Steve Dower


Steve Dower  added the comment:

I'm going to have to spend more time to analyse this (later), but it seems like 
Windows deciding not to update the directory's data structures (containing the 
st_mtime retrieved by scandir) as long as the file is still open.

I suspect the answer for your scenario is that you'll just have to use 
os.stat() to get the information from the file's entry, rather than the 
directory's entry. It's unlikely there's anything we can do at Python's level 
without sacrificing all the performance gains of scandir() for all other 
scenarios.

--

___
Python tracker 

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



[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-24 Thread SilentGhost


SilentGhost  added the comment:

Ram, please fix the typo pointed out on github 
https://github.com/python/cpython/commit/59cf853332a82ce92875ea3dd6bba08e1305a288#r40044022

--
nosy: +SilentGhost

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-06-24 Thread Georg Brandl


Georg Brandl  added the comment:

Don't hesitate to send requests back to the Sphinx tracker if any changes 
appear to be too restrictive to you. It is a documentation tool, not a compiler.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue41096] Need command to exit PDB interactive shell

2020-06-24 Thread Kerrick Staley


Kerrick Staley  added the comment:

Serhiy: I'm referring to the interactive mode that can be entered by typing 
"interact" in PDB.

Here are reproduction instructions:
1. Run "python3" command.
2. In Python shell, type "import pdb; pdb.set_trace()".
3. In PDB shell, type "interact".

Now, in this "PDB InteractiveConsole" shell (I'm not sure what it's called), 
the only way to go back to PDB is to press Ctrl+D. If you type "quit()" or 
"exit()" it exits the entire Python process. If you type "q" it says 
"NameError: name 'q' is not defined".

In Jupyter, I get different (but still undesirable) behavior: "quit()" raises 
"NameError: name 'quit' is not defined" (and similar for "exit()").

I think "quit()"/"exit()" in these contexts should return you back to the PDB 
shell.

--

___
Python tracker 

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



[issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing.

2020-06-24 Thread Cezary Wagner


Cezary Wagner  added the comment:

One hint more.

Start of new process os.scandir() give invalid modification date for file open 
for writing until external tool is not called (like explorer, touch, etc.).

So (log open for writing and write is done between 1, 2):
1. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t1.
2. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t1.
Modification is stalled.

Another scenario (log open for writing and write is done between 1, 3):
1. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t1.
2. touch -> dir_entry.path
3. Run program with os.scandir() -> dir_entry.stat().st_mtime() = t2.
Modification works.

--

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset 29aa8085e95e106f4b9e312169d4af87e9b5e3e2 by Miss Islington (bot) 
in branch '3.9':
bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)
https://github.com/python/cpython/commit/29aa8085e95e106f4b9e312169d4af87e9b5e3e2


--

___
Python tracker 

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



[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2020-06-24 Thread Brandt Bucher


Change by Brandt Bucher :


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



[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2020-06-24 Thread Jiachen Yang


Change by Jiachen Yang :


--
nosy: +Jiachen Yang

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset 1dda40c1d2681a8f03a567b72698d88ced6bbd6c by Miss Islington (bot) 
in branch '3.8':
bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)
https://github.com/python/cpython/commit/1dda40c1d2681a8f03a567b72698d88ced6bbd6c


--

___
Python tracker 

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



[issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing.

2020-06-24 Thread Cezary Wagner


Cezary Wagner  added the comment:

Extra file for for tests with:

DO_STAT = False

See not changes but file was writing every second. If os.stat() run all between 
call os.scandir() all works.

C:\root\Python38\python.exe 
C:/Users/Cezary.Wagner/PycharmProjects/dptr-monitoring-v2/sandbox/python/s13_dir_entry/s03_dir_entry.py
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
0.0009987354278564453
2020-06-24 18:57:52.911980 1593017872.91198
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
1.0078418254852295
2020-06-24 18:57:53.918823 1593017873.918823
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
2.0103507041931152
2020-06-24 18:57:54.921332 1593017874.921332
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
3.023340940475464
2020-06-24 18:57:55.934322 1593017875.934322
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
4.036783933639526
2020-06-24 18:57:56.947765 1593017876.947765
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
5.049667835235596
2020-06-24 18:57:57.960649 1593017877.960649
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
6.063947916030884
2020-06-24 18:57:58.974929 1593017878.974929
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
7.0797247886657715
2020-06-24 18:57:59.990706 1593017879.990706
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
8.091670751571655
2020-06-24 18:58:01.002652 1593017881.002652
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
9.1053147315979
2020-06-24 18:58:02.016296 1593017882.016296
dir_entry.stat() T:\\test.txt 1593017872.9109812 since last change 
10.120086908340454
2020-06-24 18:58:03.031068 1593017883.031068

--
Added file: https://bugs.python.org/file49260/s03_dir_entry.py

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-06-24 Thread STINNER Victor


STINNER Victor  added the comment:

Sphinx documentation of the C domain:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-c-domain

--

___
Python tracker 

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



[issue41106] os.scandir() Windows bug dir_entry.stat() not works on file during writing.

2020-06-24 Thread Cezary Wagner


New submission from Cezary Wagner :

I have problem with change detection of log during writing under Windows 
(normal fs and windows share). Probably bad order of Windows API calls - no 
idea.

Test program is attached. You can reproduce it. Try with os.scandir() without 
os.stats() and os.stat().

Source code responsible for it is probably this -> I do not understand CPython 
code -> https://github.com/python/cpython/blob/master/Modules/posixmodule.c.

Here is full description - many test was done.

# os.scandir() Windows bug dir_entry.stat() not works on file during writing.
# Such files is for example application log.
# No problem with os.stat()

# Call of os.stat() before os.scandir() -> dir_entry.stat() is workaround.
# Open file during writing other program "fixes" dir_entry.stat().
# Get properties on open file during writing "fixes" dir_entry.stat().

# Notice that I run os.scandir() separately so dir_entry.stat() is not cached.

# Steps to reproduce lack of modification update:
# 1. Close all explorers or other application using PATH (it has impact).
# 2. Set PATH to test folder can be directory or windows share.
# 3. Run program without DO_STAT (False).
#
# Alternative steps (external app force valid modification date):
# 4. run 'touch' or 'echo' on file should "fix" problem. 'echo' will throw 
error not matter.
#
# Alternative scenario (os.stat() force valid modification date - very slow):
# 3. Run program without DO_STAT (True). No problems.
#
# Error result:
# Modification date from dir_entry.stat() is stalled (not changing after 
modification)
# if os.stat() or other Windows application not read file.
#
# Excepted result:
# Modification date from dir_entry.stat() is update from separate calls 
os.scandir()
# or cached if it is same os.scandir() call.
#
# Notice that os.scandir() must be call before dir_entry.stat() to avoid 
caching as described in documentation.
# And this is done but not work on files during writing..
#
# Ask question if you have since is very hard to find bug.

--
components: Windows
files: s03_dir_entry.py
messages: 372264
nosy: Cezary.Wagner, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.scandir() Windows bug dir_entry.stat() not works on file during 
writing.
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file49259/s03_dir_entry.py

___
Python tracker 

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



[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset 153e20e087577553ad92a4c802c71d96244e508e by Miss Islington (bot) 
in branch '3.9':
bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
https://github.com/python/cpython/commit/153e20e087577553ad92a4c802c71d96244e508e


--

___
Python tracker 

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



[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-06-24 Thread STINNER Victor


STINNER Victor  added the comment:

I look into this issue. It's quite complicated :-(

The Sphinx 3.0.0b1 changelog says:

* The C domain has been rewritten, with additional directives and roles. The 
existing ones are now more strict, resulting in new warnings.
* The C domain has been rewritten adding for example:

  * Cross-referencing respecting the current scope.
  * Possible to document anonymous entities.
  * More specific directives and roles for each type of entitiy, e.g., handling 
scoping of enumerators.
  * New role c:expr for rendering expressions and types in text.

The Python documentation has many issues:

* Doc/howto/instrumentation.rst: ".. c:function:: function__entry(str filename, 
str funcname, int lineno)" is not valid
  => replace "str" with "char*" and explain that "char*" must be read as 
"str"... The documentation is about DTrace functions, it's not C code.

* Doc/library/configparser.rst: "unique" is declared twice
  => the second declaration must have :noindex: marker

* ".. c:function:: PyObject* PyObject_CallMethodObjArgs(PyObject *obj, PyObject 
*name, ..., NULL)": the "..., NULL" part is invalid in C => remove ", NULL"

* .. c:var:: PY_VECTORCALL_ARGUMENTS_OFFSET: a variable must be declared with 
its type, but PY_VECTORCALL_ARGUMENTS_OFFSET is macro
  => use ".. c:macro::" instead

* ".. c:var:: Py_BytesWarningFlag": the type is missing
  => ".. c:var:: int Py_BytesWarningFlag"

* Doc/c-api/call.rst: vectorcallfunc documentation is not properly indented.
  => fix indentation

* Doc/c-api/buffer.rst: the table with ".. c:macro:: PyBUF_INDIRECT" is wrong. 
Sphinx fails because PyBUF_SIMPLE is declared twice.
  => use ":c:macro:`PyBUF_INDIRECT`" instead

* :c:type:`PyObject\*` is invalid
  => use  :c:type:`PyObject*`

* ... there are many other errors :-(

PR 19397 fix some errors, but not all of them.

--
nosy: +vstinner

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20288
pull_request: https://github.com/python/cpython/pull/21125

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20287
pull_request: https://github.com/python/cpython/pull/21124

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a7dc71470156680f1fd5243290c6d377824b7ef4 by Serhiy Storchaka in 
branch 'master':
bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)
https://github.com/python/cpython/commit/a7dc71470156680f1fd5243290c6d377824b7ef4


--

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset 1813d318fd4e517042415fa4f59fe8668c17a235 by Miss Islington (bot) 
in branch '3.8':
bpo-41094: Fix decoding errors with audit when open files. (GH-21095)
https://github.com/python/cpython/commit/1813d318fd4e517042415fa4f59fe8668c17a235


--

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset 7329c8c7a263015c5dae04fc9fb7ec9d58508c76 by Miss Islington (bot) 
in branch '3.9':
bpo-41094: Fix decoding errors with audit when open files. (GH-21095)
https://github.com/python/cpython/commit/7329c8c7a263015c5dae04fc9fb7ec9d58508c76


--

___
Python tracker 

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



[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-24 Thread miss-islington


miss-islington  added the comment:


New changeset fb4a6241054ad6b7f24d1b32af6827e02936d568 by Miss Islington (bot) 
in branch '3.8':
bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
https://github.com/python/cpython/commit/fb4a6241054ad6b7f24d1b32af6827e02936d568


--

___
Python tracker 

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



[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-24 Thread Steve Dower


Change by Steve Dower :


--
assignee:  -> steve.dower
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20286
pull_request: https://github.com/python/cpython/pull/21123

___
Python tracker 

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



[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-24 Thread Steve Dower


Steve Dower  added the comment:


New changeset 33b79b11b891adea5a916df8e3779505b37aabe7 by Nikita Nemkin in 
branch 'master':
bpo-41038: Fix non-ASCII string corruption in Win32 resource files (GH-20985)
https://github.com/python/cpython/commit/33b79b11b891adea5a916df8e3779505b37aabe7


--

___
Python tracker 

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



[issue41038] VersionInfo string is corrupted when building on Windows with DBCS or UTF-8 locale

2020-06-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +20285
pull_request: https://github.com/python/cpython/pull/21122

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20284
pull_request: https://github.com/python/cpython/pull/21121

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20283
pull_request: https://github.com/python/cpython/pull/21120

___
Python tracker 

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



[issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

2020-06-24 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +20282
pull_request: https://github.com/python/cpython/pull/21119

___
Python tracker 

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



[issue41056] minor NULL pointer and sign issues reported by Coverity

2020-06-24 Thread Paul Ganssle


Paul Ganssle  added the comment:


New changeset 6c56356109616ea1292aafa48d30536279ec0937 by Paul Ganssle in 
branch '3.9':
[3.9] bpo-41056: Fix a possible MemoryError leak within zoneinfo. (GH-21007)
https://github.com/python/cpython/commit/6c56356109616ea1292aafa48d30536279ec0937


--

___
Python tracker 

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



[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2020-06-24 Thread lilydjwg


Change by lilydjwg :


--
nosy: +lilydjwg

___
Python tracker 

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



[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2020-06-24 Thread Manjusaka


Change by Manjusaka :


--
title: Add some extra content check  for some who has been deprecated by glibc 
-> Add some extra content check  in configure process for some empty header 
file who has been deprecated by glibc

___
Python tracker 

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



[issue41105] Add some extra content check for some who has been deprecated by glibc

2020-06-24 Thread Manjusaka


Manjusaka  added the comment:

Here's the reference

https://sourceware.org/legacy-ml/libc-alpha/2019-08/msg00029.html

--

___
Python tracker 

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



[issue41105] Add some extra content check for some who has been deprecated by glibc

2020-06-24 Thread Manjusaka

New submission from Manjusaka :

Hello everyone

When I try to compile the code from the master branch on my Manjaro, one of the 
Linux system based on the Arch and based on the glibc-2.31 && gcc-10.1.0 . the 
compiler show me that the fcntl module has been failed to be compiled

Here's the message 

/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:618:33: error: 
‘I_PUSH’ undeclared (first use in this function)
  618 | if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
  | ^~
./Include/modsupport.h:146:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:618:33: note: 
each undeclared identifier is reported only once for each function it appears in
  618 | if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
  | ^~
./Include/modsupport.h:146:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:619:33: error: 
‘I_POP’ undeclared (first use in this function)
  619 | if (PyModule_AddIntMacro(m, I_POP)) return -1;
  | ^
./Include/modsupport.h:146:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:620:33: error: 
‘I_LOOK’ undeclared (first use in this function); did you mean ‘F_LOCK’?
  620 | if (PyModule_AddIntMacro(m, I_LOOK)) return -1;
  | ^~


I have figured out the reason because the stropts.h has been deprecated since 
the glic-2.30, but some of the distribution of Linux keep an empty file on the 
/usr/include, so the configure process will recognize stropts.h is existed and 
open HAVE_STROPTS_H flag.

So should we add an extra content check in the configure process to avoid the 
empty file problem?

--
components: Build
messages: 372254
nosy: Manjusaka
priority: normal
severity: normal
status: open
title: Add some extra content check  for some who has been deprecated by glibc
type: compile error
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



[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values

2020-06-24 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 5.0 -> 6.0
pull_requests: +20281
pull_request: https://github.com/python/cpython/pull/21118

___
Python tracker 

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



[issue41103] Removing old buffer support

2020-06-24 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2020-06-24 Thread STINNER Victor


STINNER Victor  added the comment:

Update of the EXPERIMENTAL_ISOLATED_SUBINTERPRETERS status.

I made many free lists and singletons per interpreter in bpo-40521.

TODO:

* _PyUnicode_FromId() and interned strings are still shared: typeobject.c 
requires a workaround for that.
* GC is disabled in subinterpreters since some objects are still shared
* Type method cache is shared.
* pymalloc is shared.
* The GIL is shared.

I'm investigating performance of my _PyUnicode_FromId() PR: 
https://github.com/python/cpython/pull/20058

This PR now uses "atomic functions" proposed in a second PR: 
https://github.com/python/cpython/pull/20766

The "atomic functions" avoids the need to have to declare a variable or a 
structure member as atomic, which would cause different issues if they are 
declared in Python public headers (which is the case for _Py_Identifier used by 
_PyUnicode_FromId()).

--

___
Python tracker 

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



[issue41104] IMAPlib debug errors

2020-06-24 Thread skorpeo


New submission from skorpeo :

This line in imaplib.py inside _dump_ur function:
l = map(lambda x:'%s: "%s"' % (x[0], x[1][0] and '" "'.join(x[1]) or ''), l)

fails because the untagged responses are bytestrings and it expects regular 
strings.

--
components: Library (Lib)
messages: 372252
nosy: skorpeo
priority: normal
severity: normal
status: open
title: IMAPlib debug errors
type: behavior
versions: Python 3.5, Python 3.6, 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



[issue41103] Removing old buffer support

2020-06-24 Thread Inada Naoki


New submission from Inada Naoki :

https://docs.python.org/3/c-api/objbuffer.html
Old buffer protocol has been deprecated since Python 3.0.
It was useful to make transition from Python 2 easy.
But it's time to remove.

--
components: C API
messages: 372251
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Removing old buffer support
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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-24 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0430dfac629b4eb0e899a09b899a494aa92145f6 by Victor Stinner in 
branch 'master':
bpo-40521: Always create the empty tuple singleton (GH-21116)
https://github.com/python/cpython/commit/0430dfac629b4eb0e899a09b899a494aa92145f6


--

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:


New changeset d518ed0baaa31ca25cd88ac8996c7a7d563b2a1f by Miss Islington (bot) 
in branch '3.9':
bpo-41005: Fixed perrmission error (GH-20936) (GH-21051)
https://github.com/python/cpython/commit/d518ed0baaa31ca25cd88ac8996c7a7d563b2a1f


--

___
Python tracker 

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



[issue41005] Permission denied: 'xdg-settings' when executing 'jupyter notebook' from command line

2020-06-24 Thread Ronald Oussoren


Ronald Oussoren  added the comment:


New changeset adf8708c44945bfa68db8b02c6a1f560f05a5151 by Miss Islington (bot) 
in branch '3.8':
bpo-41005: Fixed perrmission error (GH-20936) (GH-21052)
https://github.com/python/cpython/commit/adf8708c44945bfa68db8b02c6a1f560f05a5151


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-24 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20279
pull_request: https://github.com/python/cpython/pull/21116

___
Python tracker 

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



[issue41090] Support for "Universal 2" binary builds

2020-06-24 Thread Ronald Oussoren


Change by Ronald Oussoren :


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

___
Python tracker 

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



[issue41090] Support for "Universal 2" binary builds

2020-06-24 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
title: Support for "Apple Silicon" -> Support for "Universal 2" binary builds
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



[issue41101] Support "arm64" in Mac/Tools/pythonw

2020-06-24 Thread Ronald Oussoren


Change by Ronald Oussoren :


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

___
Python tracker 

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



[issue41102] ZipFile.namelist() does not match the actual files in .zip file

2020-06-24 Thread Xiaolong Liu


New submission from Xiaolong Liu :

I used zipfile module to archive thousands of .geojson file to zip files and 
access those .geojson file by ZipFile.open() method. In my hundreds of 
runnings, one of them was abnormal.
As the title says, the ZipFile.namelist() did not match all the files in .zip 
file. And I extracted it by extractall() method and it only got those files 
included in the namelist. On the other hand, I extracted it by my compress 
software (360zip). I got the other files unincluded in the namelist(). Only one 
file (2564.geojson) appeared with these two extract methods.
ZipFile.extractall() method got 674 files from '2654.geojson' to '3989.geojson'.
360zip got 1399 files from '.geojson' to '2654.geojson'.
The abnormal file is too big to upload this page and I uploaded to google drive:
https://drive.google.com/file/d/1UE2N2qwjn4m7uE6YF2A1FhdXYHP_7zQr/view?usp=sharing

--
components: Library (Lib)
messages: 372247
nosy: alanmcintyre, longavailable, serhiy.storchaka, twouters
priority: normal
severity: normal
status: open
title: ZipFile.namelist() does not match the actual files in .zip file
type: performance
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



[issue41101] Support "arm64" in Mac/Tools/pythonw

2020-06-24 Thread Ronald Oussoren


New submission from Ronald Oussoren :

Apple introduced a new CPU architecture for macOS at WWDC, which is arm64.

Mac/Tools/pythonw.c launches the real python interpreter in a framework build 
is and is careful to launch that using the same architecture as it is running 
(to make it possible to use "arch -x86_64 pythonw" to launch the x86_64 variant 
when available.

The current code does not support ARM64.

--
components: Build, macOS
messages: 372246
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Support "arm64" in Mac/Tools/pythonw
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



[issue41100] Build failure on macOS 11 (beta)

2020-06-24 Thread Ronald Oussoren


Change by Ronald Oussoren :


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

___
Python tracker 

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



[issue41100] Build failure on macOS 11 (beta)

2020-06-24 Thread Ronald Oussoren


New submission from Ronald Oussoren :

macOS 11 is darwin 20.0.0. This confuses the configure script, resulting in 
defining _POSIX_C_SOURCE and friends.

--
assignee: ronaldoussoren
components: Build, macOS
messages: 372245
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Build failure on macOS 11 (beta)
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



[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr


Change by Alexander Mohr :


--
nosy: +thehesiod

___
Python tracker 

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



[issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown()

2020-06-24 Thread Tony


Tony  added the comment:

This still leaves the open issue of UDPServer not shutting down immediately 
though

--

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-24 Thread Ned Deily


Change by Ned Deily :


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



[issue41093] TCPServer's server_forever() shutdown immediately when calling shutdown()

2020-06-24 Thread Tony


Tony  added the comment:

Just want to note that this fixes an issue in all TCPServers and not only 
http.server

--
title: BaseServer's server_forever() shutdown immediately when calling 
shutdown() -> TCPServer's server_forever() shutdown immediately when calling 
shutdown()

___
Python tracker 

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



[issue41099] Deprecating PyUnicodeTranslateError_Create

2020-06-24 Thread Inada Naoki


New submission from Inada Naoki :

PyUnicodeTranslateError_Create marked as Py_DEPRECATED since it receives  
Py_UNICODE* as an argument.
But it is not deprecated in the document.

On the other hand, we have alternative private API which accepts Unicode 
object: _PyUnicodeTranslateError_Create.  Should we make it public?

Otherwise, we can recommend `PyObject_CallFunction(PyExc_UnicodeTranslateError, 
...)` as an alternative.

--
components: C API
messages: 372242
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Deprecating PyUnicodeTranslateError_Create
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



[issue41098] Deprecating PyUnicodeEncodeError_Create

2020-06-24 Thread Inada Naoki


New submission from Inada Naoki :

PyUnicodeEncodeError_Create is using Py_UNICODE and is marked 
Py_DEPRECATED(3.3).
But it is not deprecated in doc yet.

There are no alternative API.  In CPython code base, UnicodeEncodeError is 
created by `PyObject_CallFunction(PyExc_UnicodeEncodeError, ...)`.

Can we just document it as deprecated since Python 3.3?
Or should we add alternative API?

--
components: C API
messages: 372241
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Deprecating PyUnicodeEncodeError_Create
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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-24 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Sorry, I was not sure which versions are in security-fix phase now.

--

___
Python tracker 

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



[issue41070] Simplify pyshellext.dll build

2020-06-24 Thread Nikita Nemkin


Nikita Nemkin  added the comment:

Thanks for reviewing my patches so quickly, Steve.

There's one last Windows-specific patch left 
(https://bugs.python.org/issue41038). Single-line change.

--

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-24 Thread Ned Deily


Ned Deily  added the comment:

@Serhiy, you have opened PRs for this for 3.7 and 3.6, both of which are now in 
the security-fix phase of their release cycles. It looks like this behavior has 
been around for a long time and does not appear to be a security issue. Unless 
there is some important reason why this behavior should be changed in a 
security fix release (for 3.6) or as a release critical fix for 3.7.8 final and 
unless another core developer reviews the changes, I do not think the PRs 
should be merged to 3.7 or 3.6.

--
nosy: +ned.deily

___
Python tracker 

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



[issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized

2020-06-24 Thread Armin Rigo


Change by Armin Rigo :


--
nosy:  -arigo

___
Python tracker 

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



  1   2   >