[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Updating the source. https://github.com/python/cpython-source-deps/pull/24

--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Thanks Shreyan, but Steve prefers to update it himself: 
https://github.com/python/cpython-source-deps/pull/22#issuecomment-705234459

Just having the sources in place does not really help; you need a new git tag, 
which can only be pushed by core devs. Better to wait for the Windows team to 
fix this (also less noise for them) :)

--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Ok. I'm closing https://github.com/python/cpython-source-deps/pull/24 then.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


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

___
Python tracker 

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



[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Hasan Diwan


Hasan Diwan  added the comment:

Patch adds a bz2.BZ2File.name property corresponding to the filename passed in.

--
keywords: +patch
nosy: +Hasan Diwan
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 -Python 3.6
Added file: https://bugs.python.org/file49991/bz2.name.patch

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> These tests should also be added when new types are converted in the future.

We should have a checklist for static to heap type conversion. I'm pretty sure 
I've seen something like that in one of Victor's blogs. A new section in the 
Dev Guide, maybe?

--

___
Python tracker 

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



[issue43948] sysconfig’s osx_framework_user puts headers in different locations from distutils

2021-04-27 Thread Tzu-ping Chung

New submission from Tzu-ping Chung :

When built in framework mode on macOS, distutils puts user-site headers under 
`{userbase}/include/python{py_version_short}{abiflags}`:

>>> import sys
>>> print(sys.platform, sys._framework)
darwin Python
>>> from distutils.dist import Distribution
>>> c = Distribution().get_command_obj('install')
>>> c.user = True
>>> c.finalize_options()
>>> print(c.install_headers)
/Users/uranusjr/Library/Python/3.9/include/python3.9/UNKNOWN

But sysconfig lacks the `pythonX.Y` part:

>>> import sysconfig
>>> print(sysconfig.get_path('include', scheme='osx_framework_user'))
/Users/uranusjr/Library/Python/3.9/include

This is inconsistent to all other schemes, such as `posix_user` (tested on the 
`python:3.9-slim` OCI image):

>>> import sys
>>> print(sys.platform, sys._framework)
linux
>>> from distutils.dist import Distribution
>>> c = Distribution().get_command_obj('install')
>>> c.user = True
>>> c.finalize_options()
>>> print(c.install_headers)
/root/.local/include/python3.9/UNKNOWN
>>> import sysconfig
>>> print(sysconfig.get_path('include', scheme='posix_user'))
/root/.local/include/python3.9

Note that the paths on `posix_user` only differs by one component (`UNKNOWN`, 
which is the distribution name), but `osx_framework_user` differs by two.

--
components: Library (Lib)
messages: 392037
nosy: uranusjr
priority: normal
severity: normal
status: open
title: sysconfig’s osx_framework_user puts headers in different locations from 
distutils
versions: Python 3.10, Python 3.11, 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



[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Re-running the failed tests doesn't trigger the errors but running the whole 
test suite does. And some errors I described are fixed in any of the last 22 
commits and PRs. Therefore should we actually look into this matter or should 
we leave it as it is?

--

___
Python tracker 

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



[issue43949] binascii.Error raised in smtplib when initial_response_ok=False

2021-04-27 Thread junpengruan


New submission from junpengruan <632077...@qq.com>:

Hi
I think there is a bug when initial_response_ok=False and using AUTH PLAIN, the 
server will response like:
--
C: AUTH PLAIN
S: 334 ok. go on
--
and it's not base64 encoding, while in the auth() it will base64 decode the 
resp(here is "ok, go on") which will cause a binascii.Error:

Traceback (most recent call last):
  File "/usr/lib/python3.6/smtplib.py", line 644, in auth
challenge = base64.decodebytes(resp)
  File "/usr/lib/python3.6/base64.py", line 553, in decodebytes
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding

I am using Magic Winmail Server2.4(build 0530) as a SMTP server, which appears 
dont support initial_response, so I set initial_response_ok=False and got this 
Error. 
currently I catch this error and ignore it to evade program failed, it works 
fine. Is there better way to fix this problem?

Thanks!

--
components: email
messages: 392039
nosy: barry, junpengruan, r.david.murray
priority: normal
severity: normal
status: open
title: binascii.Error raised in smtplib when initial_response_ok=False
type: behavior
versions: 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



[issue43948] sysconfig’s osx_framework_user puts headers in different locations from distutils

2021-04-27 Thread Tzu-ping Chung


Change by Tzu-ping Chung :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren
type:  -> behavior

___
Python tracker 

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-27 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +24345
pull_request: https://github.com/python/cpython/pull/25654

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Alternative approach:

Add _PyType_DisabledNew to Include/cpython, and add {Py_tp_new, 
_PyType_DisabledNew} slot to affected types. Diff attached.

See GH discussion:
- https://github.com/python/cpython/pull/25653#issuecomment-827383246
- https://github.com/python/cpython/pull/25653#issuecomment-827390034

--
Added file: https://bugs.python.org/file49992/disablednew.diff

___
Python tracker 

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



[issue39812] Avoid daemon threads in concurrent.futures

2021-04-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

@Jan, without taking a look, I'd answer that indeed you should avoid using the 
"fork" method if you're doing any kind of multithreading in the parent process. 
 "forkserver" is a good choice nowadays on Linux and will result in more robust 
code.

--

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Christian Heimes


Christian Heimes  added the comment:

LGTM

--

___
Python tracker 

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



[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2021-04-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> that was Guido's suggestion.

Well, that complicated things ;-)  I suppose he can revive this if he wants.  
Perhaps after seeing how pervasive the change is he will be less inclined.  
Jelle, Mark, and I have all thought about it and don't think it is worth the 
disruption. In 14 years we hadn't had user reports or any other evidence that 
word Integral is problematic, so it isn't that there is any problem to be 
solved.

--

___
Python tracker 

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



[issue39812] Avoid daemon threads in concurrent.futures

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Alternatively we can make PyType_FromSpec() setting tp_new to NULL if there is 
explicit {Py_tp_new, NULL} in slots.

--

___
Python tracker 

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



[issue41735] Thread locks in zlib module may go wrong in rare case

2021-04-27 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks! ✨ 🍰 ✨

--
nosy: +lukasz.langa
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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-27 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +24346
pull_request: https://github.com/python/cpython/pull/25655

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Alternatively we can make PyType_FromSpec() setting tp_new to NULL if there 
> is explicit {Py_tp_new, NULL} in slots.

Yes. It's not as explicit (and self-documenting) as _PyType_DisabledNew, 
though. But it avoids expanding the C API.

--

___
Python tracker 

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



[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-04-27 Thread Paul Moore


Paul Moore  added the comment:


New changeset d92513390a1a0da781bb08c284136f4d7abea36d by Tzu-ping Chung in 
branch 'master':
bpo-43312: Functions returning default and preferred sysconfig schemes 
(GH-24644)
https://github.com/python/cpython/commit/d92513390a1a0da781bb08c284136f4d7abea36d


--
nosy: +paul.moore

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

For that to work, you'd have to add a flag in PyType_FromModuleAndSpec, set the 
flag if (slot->slot == Py_tp_new && slot->pfunc == NULL) in the slots for loop, 
and then reset tp_new _after_ PyType_Ready.

--

___
Python tracker 

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



[issue41735] Thread locks in zlib module may go wrong in rare case

2021-04-27 Thread Ma Lin


Ma Lin  added the comment:

Thanks for review.

--

___
Python tracker 

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Can you reopen this issue? Brett forgot to silence another warning in 
WindowsRegistryFinderTests class. I'm opening a PR for that.

--

___
Python tracker 

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread Shreyan Avigyan


Change by Shreyan Avigyan :


--
pull_requests: +24347
pull_request: https://github.com/python/cpython/pull/25656

___
Python tracker 

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



[issue42739] Crash when try to disassemble bogus code object

2021-04-27 Thread Mark Shannon


Mark Shannon  added the comment:

Using sentinels as a marker to terminate the line number table, might be a 
problem if we want to use a different format. So I'm fixing this for 3.10.

--

___
Python tracker 

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



[issue42739] Crash when try to disassemble bogus code object

2021-04-27 Thread Mark Shannon


Change by Mark Shannon :


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

___
Python tracker 

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



[issue41486] Add _BlocksOutputBuffer for bz2/lzma/zlib module

2021-04-27 Thread Ma Lin

Ma Lin  added the comment:

The above changes were made in this commit:

split core code and wrappers
55705f6dc28ff4dc6183e0eb57312c885d19090a

After that commit, there is a new commit, it resolves the code conflicts 
introduced by PR 22126 one hour ago.

Merge branch 'master' into blocks_output_buffer
45d752649925765b1b3cf39e9045270e92082164

Sorry to complicate the review again.
I should ask Łukasz Langa to merge PR 22126 after this issue is resolved, since 
resolving code conflicts in PR 22126 is easier.

For the change from 55705f6 to 45d7526, see the uploaded file (45d7526.diff), 
it can also be easily seen with a Git client.

--
Added file: https://bugs.python.org/file49993/45d7526.diff

___
Python tracker 

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



[issue43911] Queue.get() memory leak

2021-04-27 Thread Jens


Jens  added the comment:

Raymond, thanks for your suggestions.

My deployed applications don't hold up 20m items at a time, that was a way to 
show the leak. 

I was able to resolve the threading, queue-based leaks on my instances by 
modifying the Queue, Event and Conditions classes to use external doubly linked 
list library in the following manner (python3.7), not the clearest rewrite, but 
just to get the idea:

class DllistCondition(threading.Condition):
def __init__(self, lock=None):
if lock is None:
lock = threading.RLock()
self._lock = lock
self.acquire = lock.acquire
self.release = lock.release
try:
self._release_save = lock._release_save
except AttributeError:
pass
try:
self._acquire_restore = lock._acquire_restore
except AttributeError:
pass
try:
self._is_owned = lock._is_owned
except AttributeError:
pass
self._waiters = dllist()

def notify(self, n=1):
if not self._is_owned():
raise RuntimeError("cannot notify on un-acquired lock")
all_waiters = self._waiters
waiters_to_notify = all_waiters
#_islize would be empty only if there are no waiters avail, for any 
n
if len(waiters_to_notify) < 1:
return

node = waiters_to_notify.first
i = 1
while True:
#simulate _islice
if i > n:
return

waiter = node.value
#get next node before release
node_next = node.next
waiter.release()
try:
all_waiters.remove(node)
except ValueError:
pass

i += 1
node = node_next
#if it's the last node, return
if node is None:
return




def wait(self, timeout=None):
if not self._is_owned():
raise RuntimeError("cannot wait on un-acquired lock")
waiter = threading._allocate_lock()
waiter.acquire()
node = self._waiters.append(waiter)
saved_state = self._release_save()
gotit = False
try:# restore state no matter what (e.g., KeyboardInterrupt)
if timeout is None:
waiter.acquire()
gotit = True
else:
if timeout > 0:
gotit = waiter.acquire(True, timeout)
else:
gotit = waiter.acquire(False)
return gotit
finally:
self._acquire_restore(saved_state)
if not gotit:
try:
self._waiters.remove(node)
except ValueError:
pass

class DllistEvent(threading.Event):
def __init__(self):
self._cond = DllistCondition(threading.Lock())
self._flag = False

class DllistQueue(queue.Queue):

def __init__(self, maxsize=0):
self.maxsize = maxsize
self._init(maxsize)

self.mutex = threading.Lock()

self.not_empty = DllistCondition(self.mutex)

self.not_full = DllistCondition(self.mutex)

self.all_tasks_done = DllistCondition(self.mutex)
self.unfinished_tasks = 0

def _init(self, maxsize):
self.queue = dllist()

Now, I'm not exactly sure that the Queue itself required the `self.queue = 
deque()`modification, but I'm sure that conditions required getting rid of the 
stock `self._waiters = deque()` and the consequent use of it. 

Memory profiling constantly showed a leak at waiters_to_notify = 
_deque(_islice(all_waiters, n) in the threading.Condition class, which is both 
employed by threading.Queue and treading.Event classes. 

After the modifiction this leak is gone and I suspect it has to do something 
with reiniting the deque at `waiters_to_notify = _deque(_islice(all_waiters, n)`

In any cases, I'm leaving this out here in case anyone get to deal with it as 
well and it might be helpful. 

Thanks

--

___
Python tracker 

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



[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment

2021-04-27 Thread Nick Coghlan


Change by Nick Coghlan :


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

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-04-27 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

If we could include column offsets from the AST nodes for every bytecode 
instructions we could leverage these to offer much better tracebacks and a lot 
more information to debuggers and similar tools. For instance, in an expression 
such as:

z['aa']['bb']['cc']['dd].sddfsdf.sdfsdf

where one of these elements is None, we could tell exactly what of these pieces 
is the actual None and we could do some cool highlighting on tracebacks.

Similarly, coverage tools and debuggers could also make this distinction and 
therefore could offer reports with more granularity.

The cost is not 0: it would be two integers per bytecode instruction, but I 
think it may be worth the effort.

--
messages: 392054
nosy: Mark.Shannon, pablogsal
priority: normal
severity: normal
status: open
title: Include column offsets for bytecode instructions

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +nedbat, serhiy.storchaka

___
Python tracker 

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



[issue43951] Two minor fixes for C module object

2021-04-27 Thread Larry Hastings


New submission from Larry Hastings :

While working on another issue, I noticed two minor nits in the C 
implementation of the module object.  Both are related to getting a module's 
name.

--

First, the C function module_dir() (module.__dir__) starts by ensuring the 
module dict is valid.  If the module dict is invalid, it wants to format an 
exception using the name of the module, which it gets from PyModule_GetName().  
However, PyModule_GetName() gets the name of the module from the dict.  So 
getting the name in this circumstance will never succeed.

When module_dir() wants to format the error but can't get the name, it knows 
that PyModule_GetName() must have already raised an exception.  So it leaves 
that exception alone and returns an error.  The end result is that the 
exception raised here is kind of useless and misleading: dir(module) on a 
module with no __dict__ raises SystemError("nameless module").  I changed the 
code to actually raise the exception it wanted to raise, just without a real 
module name: TypeError(".__dict__ is not a dictionary").  This seems 
more useful, and would do a better job putting the programmer who encountered 
this on the right track of figuring out what was going on.

--

Second, the C API function PyModule_GetNameObject() checks to see if the module 
has a dict.  If m->md_dict is not NULL, it calls _PyDict_GetItemIdWithError().  
However, it's possible for m->md_dict to be None.  And if you call 
_PyDict_GetItemIdWithError(Py_None, ...) it will *crash*.

Unfortunately, this crash was due to my own bug in the other branch.  Fixing my 
code made the crash go away.  I assert that this is still possible at the API 
level.

The fix is easy: add a PyDict_Check() to PyModule_GetNameObject().

Unfortunately, I don't know how to add a unit test for this.  Having changed 
module_dir() above, I can't find any other interfaces callable from Python that 
eventually call PyModule_GetNameObject().  So I don't know how to trick the 
runtime into reproducing this error.

--
assignee: larry
components: Interpreter Core
messages: 392055
nosy: larry
priority: normal
severity: normal
stage: needs patch
status: open
title: Two minor fixes for C module object
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue43951] Two minor fixes for C module object

2021-04-27 Thread Larry Hastings


Change by Larry Hastings :


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

___
Python tracker 

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



[issue43952] Multiprocessing UNIX socket connection: client freeze if authkey is an empty byte string

2021-04-27 Thread anon01


New submission from anon01 :

When I run this code (on a UNIX system with temporary directory `/tmp/`):

```
from multiprocessing import connection
import threading
key=b"1"

def run():
c=connection.Client("/tmp/xxx", authkey=key)
c.send("data")

l=connection.Listener("/tmp/xxx", authkey=key)
threading.Thread(target=run).start()
c=l.accept()
print("receive", c.recv())
```

it prints out "receive data" normally.

However, in the special case that `key=b""` the doesn't print anything, and can 
only be interrupted with Ctrl+C.

`key=None` doesn't have that issue.

Note that this issue does happen when the client uses the key `b""` and the 
server uses the key `None`, but the program works normally if the reverse 
situation.

Python version: Python 3.9.3.

--
components: Library (Lib)
messages: 392056
nosy: anon01
priority: normal
severity: normal
status: open
title: Multiprocessing UNIX socket connection: client freeze if authkey is an 
empty byte string
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



[issue43952] Multiprocessing UNIX socket connection: client freeze if authkey is an empty byte string

2021-04-27 Thread anon01


Change by anon01 :


--
nosy:  -anon01

___
Python tracker 

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



[issue43952] Multiprocessing UNIX socket connection: client freeze if authkey is an empty byte string

2021-04-27 Thread anon01


Change by anon01 :


--
type:  -> behavior

___
Python tracker 

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



[issue43951] Two minor fixes for C module object

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue43916] Check that new heap types cannot be created uninitialised

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> The second most important part here is also adding regression tests so this 
> doesn't happen.

I've started adding tests. I'm not sure if I need to wrap them with 
@cpython_only.

Some of the types are hidden deep inside the implementations, and I have a hard 
time fetching them. For example _functools._lru_list_elem and 
_thread._localdummy. Is it ok to leave those out?

--

___
Python tracker 

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



[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Sergei Lebedev


New submission from Sergei Lebedev :

Motivating example:

>>> @dataclass
... class A:
...   x: InitVar[int] = 0
...   y: int = 1
... 
>>> a = A()
>>> a.x
0
>>> a.y
1

PEP-557 does not specify if fields annotated with InitVar[...] are available on 
the resulting dataclass. However, they are not part of the dataclass structure 
and are only used for __*init__ generation, so perhaps they shouldn't be? Wdyt?

--
components: Library (Lib)
messages: 392058
nosy: eric.smith, superbobry
priority: normal
severity: normal
status: open
title: InitVar should not be available on a @dataclass-decorated class
versions: Python 3.10, Python 3.11, 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



[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Steve Stagg


Steve Stagg  added the comment:

Please may you add a test that uses "io.BytesIO()" as the filename argument.  
BytesIO() objects do not have a 'name' attribute

--
nosy: +stestagg

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-27 Thread Julien Palard


New submission from Julien Palard :

In https://docs.python.org/3/library/unittest.html I see:

> Note that you need to the top level directory too.

Trying to guess, the missing word may be "specify":

> Changed in version 3.4: Test discovery supports namespace packages for start 
> directory. Note that you need to specify the top level directory too. (e.g. 
> python -m unittest discover -s root/namespace -t root).

Am I right?

--
assignee: docs@python
components: Documentation
messages: 392060
nosy: docs@python, mdk, methane
priority: normal
severity: normal
status: open
title: Possible missing word on unittest doc
versions: Python 3.10, Python 3.11, 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



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan


Change by Nick Coghlan :


--
pull_requests:  -24157

___
Python tracker 

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



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan


Change by Nick Coghlan :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-04-27 Thread Nick Coghlan


Nick Coghlan  added the comment:

Another instance at 
https://github.com/python/cpython/pull/25585/checks?check_run_id=2447701034

I unlinked the previously linked PR, as that looked to be for bpo-43539 rather 
than this issue.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm going to prepare a PEP since the discussion regarding if the two integers 
per bytecode are worth enough is going to be eternal.

--

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-04-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Thanks, Larry for pinging me!

What compiler / gdb version are you using?

I tried to reproduce but I don't see any failure:

master on  master [$]  pyenv 3.9.1 took 9s
❯ ./python -m sysconfig | grep CFLAGS
BASECFLAGS = "-Wno-unused-result -Wsign-compare"
CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
-Wall -g3 -O0 -g3 -O0"
CFLAGSFORSHARED = ""
CFLAGS_ALIASING = ""
CFLAGS_NODIST = ""
CONFIGURE_CFLAGS = "-g3 -O0"
CONFIGURE_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden"
CONFIG_ARGS = "'-C' 'CFLAGS=-g3 -O0'"
EXTRA_CFLAGS = ""
PY_BUILTIN_MODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG 
-g -fwrapv -O3 -Wall -g3 -O0 -g3 -O0 -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal 
-I. -I./Include -DPy_BUILD_CORE_BUILTIN"
PY_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 
-Wall -g3 -O0 -g3 -O0"
PY_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal"
PY_CORE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv 
-O3 -Wall -g3 -O0 -g3 -O0 -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal 
-I. -I./Include -DPy_BUILD_CORE"
PY_STDMODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O3 -Wall -g3 -O0 -g3 -O0 -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal 
-I. -I./Include"

master on  master [$]  pyenv 3.9.1
❯ ./python -m test test_gdb -m test_wrapper_call -v
== CPython 3.10.0a7+ (heads/master:d92513390a, Apr 27 2021, 13:20:32) [GCC 
10.2.0]
== Linux-5.11.16-arch1-1-x86_64-with-glibc2.33 little-endian
== cwd: /home/pablogsal/github/python/master/build/test_python_27393æ
== CPU count: 36
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.47 Run tests sequentially
0:00:00 load avg: 1.47 [1/1] test_gdb
GDB version 10.1:
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
test_wrapper_call (test.test_gdb.PyBtTests) ... ok

--

Ran 1 test in 8.752s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 9.2 sec
Tests result: SUCCESS


These are my versions:

❯ gcc --version
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


master on  master [$]  pyenv 3.9.1
❯ gdb --version
GNU gdb (GDB) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

--

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-04-27 Thread Larry Hastings


Larry Hastings  added the comment:

I'm on "Pop!_OS 20.10".  Current versions:

* Linux kernel 5.11.0-7612
* gcc version 10.2.0 (Ubuntu 10.2.0-13ubuntu1)
* GNU gdb (Ubuntu 9.2-0ubuntu2) 9.2


% ./python -m sysconfig | grep CFLAGS
BASECFLAGS = "-Wno-unused-result -Wsign-compare"
CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O0 
-Wall"
CFLAGSFORSHARED = ""
CFLAGS_ALIASING = ""
CFLAGS_NODIST = ""
CONFIGURE_CFLAGS = ""
CONFIGURE_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden"
EXTRA_CFLAGS = ""
PY_BUILTIN_MODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG 
-g -fwrapv -O0 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal -I. -I./Include 
-DPy_BUILD_CORE_BUILTIN"
PY_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O0 
-Wall"
PY_CFLAGS_NODIST = "-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal"
PY_CORE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv 
-O0 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal -I. -I./Include -DPy_BUILD_CORE"
PY_STDMODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -g 
-fwrapv -O0 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden  -I./Include/internal -I. -I./Include"

--

___
Python tracker 

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



[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

This is just how Python works. The default values for .x and .y are set on the 
class A, not its instances. Here's the equivalent without dataclasses:

>>> class A:
...   x = 0
...   y = 1
...
>>> a = A()
>>> a.x
0
>>> a.y
1
>>> a.__dict__
{}
>>> A.__dict__
mappingproxy({'__module__': '__main__', 'x': 0, 'y': 1, '__dict__': , '__weakref__': , '__doc__': None})

Note that the instance "a" has nothing in its __dict__, but the values A.x and 
A.y are none the less available through the instance "a".

The only way to avoid this would be for @dataclass to delete the values from A, 
but that's not a change I'd be willing to make.

Is this causing some actual problem in any code?

--

___
Python tracker 

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



[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-04-27 Thread Petr Viktorin


Petr Viktorin  added the comment:

Please don't lose the big picture here.
Previously, the reported line number was *somewhere close* to the currently 
executing code. That's typically all I need from a traceback: the fix for a bug 
often needs to go a few lines above/below where it's reported.

If, in an effort to make line numbers *exact*, we determine that there's no 
good line number to report and use -1 or None, we're introducing a regression.


> We could give it the line number of the `with` keyword, but that might break 
> coverage and profiling tools.

That sounds like a reasonable idea, despite the drawback. As we can see from 
the report, *any* change will probably break *some* tools.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Can you try to do this:

% make distclean
% export CFLAGS='-O0 -g3'
% ./configure
% make -j
% ./python -m test test_gdb -m test_wrapper_call -v

My guess is that the DWARF generated is not sufficient for whatever reason 
(hence the -g3) in my proposal.

--

___
Python tracker 

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



[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith
type:  -> behavior
versions:  -Python 3.11, 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



[issue43941] Unit test failure in test_gdb only with -O0

2021-04-27 Thread Larry Hastings


Larry Hastings  added the comment:

Did that.  Well, technically, I replaced two lines with the equivalent:
% CFLAGS='-O0 -g3' ./configure

I do see this in the Makefile:
CONFIGURE_CFLAGS=   -O0 -g3
so, I didn't screw it up!


The test still failed:

=
FAIL: test_wrapper_call (test.test_gdb.PyBtTests)
--
Traceback (most recent call last):
  File "/home/larry/src/python/buildtrunk/Lib/test/test_gdb.py", line 947, in 
test_wrapper_call
self.assertRegex(gdb_output,
AssertionError: Regex didn't match: ", v=) at Python/bltinmodule.c:1207\n1207\t{\nBreakpoint 2: file 
Objects/descrobject.c, line 1386.\n\nBreakpoint 2, wrapper_call (wp=, args=, kwds=) at Objects/descrobject.c:1386\n1386\t{\nTraceback 
(most recent call first):\n  \n  File 
"", line 4, in __init__\n  File "", line 7, in \n'

--

--

___
Python tracker 

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



[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Roy Smith


Roy Smith  added the comment:

The https://bitbucket.org/cliff/cpython#python24258 URL 404's

Looking at the attached bz2.py diff, I would change:

 if isinstance(filename, (str, bytes, os.PathLike)):
 self._fp = _builtin_open(filename, mode)
+self.filename = filename
 self._closefp = True
 self._mode = mode_code

to special-case os.PathLike and do:

self.filename = str(filename)

I would expect BZ2File.name to be a string.   Returning a PathLike means lots 
of legitimate string methods will not work on it.  Also, it should be "name" as 
an attribute, not "name()" as a method, to match other existing interfaces.

--

___
Python tracker 

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



[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Sergei Lebedev


Sergei Lebedev  added the comment:

I understand that this is a side-effect of having a default value, but I was 
hoping we could delattr InitVar's in @dataclass. 

I'm not aware of this causing problems, but it does feel a bit unsatisfying 
that InitVar's with defaults are kept in the class namespace. 

Do you see what could go wrong if we delete them?

--

___
Python tracker 

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



[issue43953] InitVar should not be available on a @dataclass-decorated class

2021-04-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm not aware of what problems it would cause, but there's no doubt someone 
who's relying on it.

Since it's a behavior of normal classes, changing it would violate dataclasses 
desire (not always realized) to have as little impact as possible on the class 
that it's decorating.

You could add another decorator to do this, or handle it in a __post_init__ 
function if needed.

--

___
Python tracker 

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



[issue43743] BlockingIOError: [Errno 11] Resource temporarily unavailable: on GPFS.

2021-04-27 Thread PEAR


Change by PEAR :


--
nosy: +PEAR

___
Python tracker 

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



[issue43941] Unit test failure in test_gdb only with -O0

2021-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I will try to reproduce this in other systems this afternoon. I trust that this 
fails, but we must know exactly what triggers this first.

--

___
Python tracker 

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



[issue43636] test_descr fails randomly when executed with -R :

2021-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

commit 22556d84bca68a16e030e2337dcad80069d06f6b
Author: Brett Cannon 
Date:   Fri Apr 23 14:40:18 2021 -0700

Silence find_module() DeprecationWarning on Windows tests (GH-25563)

--

___
Python tracker 

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue for PR 25656.

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

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +24350
pull_request: https://github.com/python/cpython/pull/25659

___
Python tracker 

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



[issue26215] Make GC_Head a compile-time option

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

I only saw yuriy_levchenko's request in 2016, it doesn't sound like a popular 
request. Disabling completely the GC is an invasive change, the GC is part of 
the Python semantics. I agree with Irit, this idea should be discussed on 
python-ideas first. I close this issue.

Note: I moved the PyGC_Head structure to the internal C API in Python 3.9, see 
bpo-40241.

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



[issue43868] Remove PyOS_ReadlineFunctionPointer from the stable ABI list

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


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



[issue43520] Make Fraction(string) handle non-ascii slashes

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue28874] test_logging fails and freezes

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43925] Add hangul syllables to unicodedata.decomposititon

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Pablo, there seems to be some instability in the tests.

Shreyan, Erlend, maybe merging in master would help?

--
nosy: +Guido.van.Rossum

___
Python tracker 

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



[issue8077] [Windows] cgi handling of POSTed files is broken in Windows

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Windows -Library (Lib)
nosy: +paul.moore, steve.dower, tim.golden, zach.ware -vstinner
title: cgi handling of POSTed files is broken in Windows -> [Windows] cgi 
handling of POSTed files is broken in Windows

___
Python tracker 

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



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 531c81038e28b6cfa0f9791467bf671c88c6f4c4 by Miss Islington (bot) 
in branch '3.9':
bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 
(GH-23096) (GH-25659)
https://github.com/python/cpython/commit/531c81038e28b6cfa0f9791467bf671c88c6f4c4


--

___
Python tracker 

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



[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 05ab4b60ab3dae61ee75692b6624537d4f3fdf85 by Ken Jin in branch 
'master':
bpo-43766: Implement PEP 647 (User-Defined Type Guards) in typing.py (#25282)
https://github.com/python/cpython/commit/05ab4b60ab3dae61ee75692b6624537d4f3fdf85


--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I've not seen any failing tests for GH-25653 on the CI or on my computer.

The PR is based off of 1b1f9852bda85c01ef124858f293e9c13e04ffce, which is 
pretty recent. I can rebase onto master, but I don't see any need for it as 
long as the tests suite passes and there's no conflicts.

--

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-04-27 Thread Mark Shannon


Mark Shannon  added the comment:

The additional cost will not only be the line number table, but we need to 
store the line for exceptions that are reraised after cleanup.
Adding a column will mean more stack consumption.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sure. What do you think is causing the failures for Shreyan then? (Are you
two collaborating?)
-- 
--Guido (mobile)

--

___
Python tracker 

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



[issue43950] Include column offsets for bytecode instructions

2021-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yup, but I still think is worth the cost, giving that debugging improvements 
are usually extremely popular among users.

--

___
Python tracker 

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



[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +24351
pull_request: https://github.com/python/cpython/pull/25660

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Pablo, there seems to be some instability in the tests.

Apart from the typical test_asyncio random timeouts I don't see anything on the 
buildbots or the CI. What are those failing test? Maybe I can try to reproduce 
on my side

--

___
Python tracker 

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



[issue43947] lambdas stored with assignment expressions are unoptimized

2021-04-27 Thread Ken Jin


Ken Jin  added the comment:

I'm unable to reproduce it on 3.10:

>>> regass = lambda k: k in {None}
>>> dis.dis(regass)
  1   0 LOAD_FAST0 (k)
  2 LOAD_CONST   1 (frozenset({None}))
  4 CONTAINS_OP  0
  6 RETURN_VALUE
>>> dis.dis(walrus:=lambda k: k in {None})
  1   0 LOAD_FAST0 (k)
  2 LOAD_CONST   1 (frozenset({None}))
  4 CONTAINS_OP  0
  6 RETURN_VALUE

On 3.9 and 3.8, I'm able to reproduce your bug.

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Let me re-run the test suite again and see if the tests have been fixed in the 
most recent commits.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Shreyan, are you running the tests against the PR, or something else? Have you 
tried make clean (or git clean -fdx)?

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Are you two collaborating?

No, but any help is of course appreciated.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

> Shreyan, are you running the tests against the PR, or something else? Have 
> you tried make clean (or git clean -fdx)?

I always have a clean branch checked out but the last time I ran the tests it 
was unsuccessful. I'm re-running the tests now and hoping that the tests will 
be successful this time. However lot of tests have been fixed.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> I've not seen any failing tests for GH-25653 on the CI or on my computer.

That would be GH-25520. GH-25653 is the slightly related issue/PR. Both are 
passing CI, though.

--

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2021-04-27 Thread Éric Araujo

Éric Araujo  added the comment:

A core dev review is needed to get this feature into 3.10 before the freeze.

--
nosy: +methane
stage: patch review -> commit review
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue43954] Possible missing word on unittest doc

2021-04-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Yes, "specify" is likely the missing word.

--
nosy: +rhettinger

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Re-running tests complete. I'm attaching the results. If the errors are not 
reproducible then please tell. I'll then rebuild and rerun the tests once more.

--
Added file: https://bugs.python.org/file49994/tests_log.txt

___
Python tracker 

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



[issue43216] Removal of @asyncio.coroutine in Python 3.11

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to wait for Python 3.11 to remove it. See the thread on python-dev:
https://mail.python.org/archives/list/python-...@python.org/thread/PLSLFTJXY2JUIRGJARBER4SRUWDXX2AQ/

--
nosy: +vstinner
title: Removal of @asyncio.coroutine in Python 3.10 -> Removal of 
@asyncio.coroutine in Python 3.11
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:

I've pushed the new sources and retriggered the PR (a bit messily, because I 
tagged/labelled the wrong version number initially, but it's there now). So if 
it all passes then we're good from my POV.

--

___
Python tracker 

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



[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 99fdd782007db86f20aeb302b2ceaf79ce1ae2ba by Ken Jin in branch 
'master':
bpo-43766: Fix TypeGuard docs (#25660)
https://github.com/python/cpython/commit/99fdd782007db86f20aeb302b2ceaf79ce1ae2ba


--

___
Python tracker 

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset e3bf179642a3445fb079454f382b93d0177f5012 by Shreyan Avigyan in 
branch 'master':
bpo-43864: Silence deprecation warning in test_importlib.test_module_found and 
test_importlib.test_module_not_found (GH-25656)
https://github.com/python/cpython/commit/e3bf179642a3445fb079454f382b93d0177f5012


--

___
Python tracker 

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



[issue43864] [Windows] test_importlib logs: DeprecationWarning: WindowsRegistryFinder.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead

2021-04-27 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Ken Jin


Ken Jin  added the comment:

Guido, thanks so much for reviewing the docs for TypeGuard so thoroughly even 
with how busy you are. I hope you enjoy your upcoming vacation :).

I'm closing this issue as all PRs have landed. Please don't hesitate to re-open 
this if you feel something's amiss. Thanks!

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I don't think I've ever successfully managed to complete the test on my
Windows 10 box either (not even in "production" mode -- you seem to be
using debug mode). I recommend using creating a new PR and having the CI
machinery run the tests. It's more reliable that way.

--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Thank you, Steve!

--

___
Python tracker 

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



[issue43946] unpickling a subclass of list fails when it implements its own extend method

2021-04-27 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks, that makes sense.  And it at least less ugly than the __new__ hack I 
was thinking of as a workaround.  though similar in spirit.

presumably self.append should get the same treatment for completeness given the 
PEP 307 text.

I didn't notice a place in the Python pickle docs that mentioned this specific 
thing about listitems and the need for append/extend.  I didn't do a thorough 
read though, maybe I overlooked something?  If not, it'd be worth figuring out 
how to get this uninitialized class calling of append/extend/__setitem__ for 
list and dict objects detailed in the main docs rather than off in the PEP.

It's semi-mentioned 
https://docs.python.org/3/library/pickle.html#object.__reduce__ here which is 
what the PEP added I suppose, but given this code has no custom __reduce__, we 
need to explicitly mention that list and dict subclasses supporting 
pickling/copying may need to be prepared to handle this situation.  With a 
versionchanged:: 3.7 noting that it now always applies to list subclasses 
without their own __reduce__.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

There are no errors in apply-to-all.diff because I've ran the tests both with 
and without the changes and both give me the same output. It's safe to proceed 
with apply-to-all.diff. The only problem is why are the tests failing at all? I 
ran the tests a few days earlier on this machine only (Windows 10) and it was 
successful then.

--

___
Python tracker 

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



[issue43492] Upgrade to SQLite 3.35.5 in macOS and Windows

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset bf0c7c0147b73738cac63eb27ef48430284ff121 by Erlend Egeberg 
Aasland in branch 'master':
bpo-43492: Upgrade Windows installer to use SQLite 3.35.5 (GH-25641)
https://github.com/python/cpython/commit/bf0c7c0147b73738cac63eb27ef48430284ff121


--

___
Python tracker 

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



[issue43908] array.array should remain immutable

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Since, these changes and the test failures are not related to each other at 
all, I'm opening a new issue addressing the test failures only. I'm adding 
everyone in this issue's nosy to the new issue's nosy as well.

--

___
Python tracker 

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



  1   2   >