[issue40935] Links to Python3 docs for some libs return 404

2020-06-10 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report!  If the links are always to ../3/.. it should be easy to 
set up permanent redirects on the website to the most appropriate webpage in 
the current Python 3 docset. If someone could produce a list of 2 to 3 mappings 
here, creating the redirects should be trivial.  The hard part is finding the 
missing links and figuring out the best replacements for each.

--
nosy: +ned.deily

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread David Bolen


David Bolen  added the comment:

So a script I use on the buildbot intended to prevent hanging on assertions was 
failing to work in this particular case, which I've corrected.  That changes 
the failure mode for new Win10 buildbot runs.

The test in question (test_close_stdin) still fails, but does so immediately 
(return code not 0, as the child process aborts) rather than timing out.  

If the assertion is expected, and something to be ignored, the test itself 
still needs to handle that.

--

___
Python tracker 

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



[issue29242] Crash on GC when compiling PyPy

2020-06-10 Thread Ned Deily


Ned Deily  added the comment:

I agree with Zachery that this issue should be closed. There has been no 
activity on it since it was opened three years ago and no indication that it 
has been an ongoing problem. I'm not even sure what the current state of using 
cPython 3 to build PyPy is. If someone can reliably reproduce a crash when 
compiling with a currently support Python 3 version, they can re-open this with 
appropriate supporting documentation.

--
nosy: +ned.deily
resolution:  -> out of date
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



[issue40934] Default RLock does not work well for Manager Condition

2020-06-10 Thread Ned Deily


Change by Ned Deily :


--
nosy: +davin, pitrou

___
Python tracker 

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



[issue40932] subprocess docs should warn of shlex use on Windows

2020-06-10 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: subprocess docs don't qualify the instruction to use shlex.quote by OS 
-> subprocess docs should warn of shlex use on Windows
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



[issue40869] errno missing descriptions

2020-06-10 Thread YoSTEALTH


YoSTEALTH  added the comment:

Hello Arpit,

Welcome to python bugs. I have already created the patch at 
https://github.com/python/cpython/pull/20665 if you feel like i missed 
something you can comment on it. That said there is always something to do with 
python, just keep your eye out for it ;)

--

___
Python tracker 

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



[issue40906] Unable to import module due to python unable to resolve dependecies

2020-06-10 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS

2020-06-10 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Would it be possible to wrap malloc_print_configure() 
(https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L59)
 in a context manager that we put in test.support? or to override 
https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L36?


This would let us change this behaviour locally without masking all other 
errors.

--

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

test__xxsubinterpreters and test_interpreters failed on AMD64 FreeBSD Shared 
3.x:
https://buildbot.python.org/all/#/builders/152/builds/973

See also bpo-37224: "[subinterpreters] test__xxsubinterpreters fails randomly".

IMO there are multiple race conditions in these tests.

==
FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test__xxsubinterpreters.py",
 line 478, in test_subinterpreter
self.assertTrue(interpreters.is_running(interp))
AssertionError: False is not true

==
FAIL: test_still_running (test.test_interpreters.TestInterpreterDestroy)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py",
 line 309, in test_still_running
interp.close()
AssertionError: RuntimeError not raised

==
FAIL: test_subinterpreter (test.test_interpreters.TestInterpreterIsRunning)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py",
 line 207, in test_subinterpreter
self.assertTrue(interp.is_running())
AssertionError: False is not true

==
FAIL: test_already_running (test.test_interpreters.TestInterpreterRun)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_interpreters.py",
 line 383, in test_already_running
self.interp.run('print("spam")')
AssertionError: RuntimeError not raised

--
versions: +Python 3.10 -Python 3.8

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-10 Thread Ned Deily


Change by Ned Deily :


--
nosy:  -ned.deily

___
Python tracker 

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



[issue40936] Remove deprecated functions from gettext

2020-06-10 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

The codeset parameter and the following functions were marked for removal in 
Python 3.10:

- bind_textdomain_codeset()
- lgettext()
- ldgettext()
- lngettext()
- ldngettext()
- output_charset()
- set_output_charset()

--
components: Library (Lib)
messages: 371174
nosy: barry, remi.lapeyre
priority: normal
severity: normal
status: open
title: Remove deprecated functions from gettext
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



[issue40936] Remove deprecated functions from gettext

2020-06-10 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-06-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Correct, it is not backward compatible in that respect. 

Unfortunately, we take backwards compatibility very seriously in the core team 
and this is a big downside of this proposal.

> I can instead add the called_event property

Wouldn't that also break any mock that is mocking an object with a 
"called_event" attribute?

--

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Joannah, Eric, could you look into this? Having random failures in the builbots 
can make debugging more challenging, hide other issues and can also spam the 
buildbot list :(

--

___
Python tracker 

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



[issue40906] Unable to import module due to python unable to resolve dependecies

2020-06-10 Thread Saba Kauser


Saba Kauser  added the comment:

Hello Steve,
You have added changes to load windows dependent DLLs for python C extension 
modules. After building the source, I can import the module only after I set 
dll path as:
os.add_dll_directory('C:\\Program Files\\IBM\\IBM DATA SERVER DRIVER_01\\bin') 

Is there a backward compatibility or any other way I can hardcode the 
dependency resolution path while building the extension itself.

I have read through the discussion in https://bugs.python.org/issue36085 but I 
don't seem to understand if there is a real way for users to import the module 
without any additional step like os.add_dll_directory() from python.

Thanks!

--

___
Python tracker 

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



[issue40937] Remove deprecated functions marked for removal in 3.10

2020-06-10 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

The following modules have functions marked for deprecation in Python 3.10:
 - asyncio-queue
 - asyncio-subprocess
 - asyncio-sync
 - asyncio-task
 - collections
 - builtins
 - gettext
 - the old parser

I already opened a PR to remove those in gettext and Pablo Galindo removed the 
old parser. I will open PRs to fix the remainding modules.

Instead of creating a new issue to track those separately, I thought it would 
be easier to list them all here and open multiple PRs.

--
components: Library (Lib)
messages: 371178
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Remove deprecated functions marked for removal in 3.10
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



[issue40937] Remove deprecated functions marked for removal in 3.10

2020-06-10 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g)

2020-06-10 Thread Open Close


New submission from Open Close :

path 'g' in 'http:g' becomes '/g'.

>>> urlsplit('http:g')
SplitResult(scheme='http', netloc='', path='g', query='', fragment='')
>>> urlunsplit(urlsplit('http:g'))
'http:///g'
>>> urlsplit('http:///g')
SplitResult(scheme='http', netloc='', path='/g', query='', fragment='')

>>> urljoin('http://a/b/c/d', 'http:g')
'http://a/b/c/g'
>>> urljoin('http://a/b/c/d', 'http:///g')
'http://a/g'

The problematic part of the code is:

def urlunsplit(components):
[...]
if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'):
--->if url and url[:1] != '/': url = '/' + url
url = '//' + (netloc or '') + url

Note also that urllib has decided on the interpretation of 'http:g' (in test).

def test_RFC3986(self):
[...]
#self.checkJoin(RFC3986_BASE, 'http:g','http:g') # strict parser
self.checkJoin(RFC3986_BASE, 'http:g','http://a/b/c/g') #relaxed parser

--
messages: 371179
nosy: op368
priority: normal
severity: normal
status: open
title: urllib.parse.urlunsplit makes relative path to absolute (http:g -> 
http:///g)
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue37969] Correct urllib.parse functions dropping the delimiters of empty URI components

2020-06-10 Thread Open Close


Open Close  added the comment:

This is a duplicate of issue22852 ('urllib.parse wrongly strips empty 
#fragment, ?query, //netloc').

Also note that three alternative solutions have already proposed.

(1) Add 'None' type to Result objects members like this one.

But it is considering not only query and fragment, but also netloc,
which may solve many other issues.

(2) Add 'has_netloc', 'has_query' and 'has_fragment' attribute.

(3) like (1), but conditional on 'allow_none' argument (similar to 
'allow_fragments')

--
nosy: +op368

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment, ?query, //netloc

2020-06-10 Thread Open Close


Open Close  added the comment:

I found another related issue (issue37969).

I also filed one myself (issue 40938).

---

One thing against the 'has_netloc' etc. solution is that
while it guarantees round-trips (urlunsplit(urlsplit('...')) etc.),
it is conditional on 'urlunsplit' getting 'SplitResult' object.
When 'urlunsplit' gets a normal tuple, it is helpless.

--
nosy: +op368

___
Python tracker 

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



[issue40939] Remove the old parser

2020-06-10 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

As stated in PEP 617, the old parser will be removed in Python 3.10

--
assignee: pablogsal
components: Interpreter Core
messages: 371182
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Remove the old parser
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



[issue40939] Remove the old parser

2020-06-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +gvanrossum, lys.nikolaou

___
Python tracker 

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



[issue40939] Remove the old parser

2020-06-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue40938] urllib.parse.urlunsplit makes relative path to absolute (http:g -> http:///g)

2020-06-10 Thread Open Close


Change by Open Close :


--
components: +Library (Lib)

___
Python tracker 

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



[issue40937] Remove deprecated functions marked for removal in 3.10

2020-06-10 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
pull_requests: +19973
pull_request: https://github.com/python/cpython/pull/20775

___
Python tracker 

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



[issue40283] Documentation of turtle.circle()

2020-06-10 Thread Frank Henigman


Change by Frank Henigman :


--
nosy: +fjh

___
Python tracker 

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



[issue40932] subprocess docs should warn of shlex use on Windows

2020-06-10 Thread Chris Jerdonek


Change by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue40925] Remove redundant macros used for stack manipulation in interpreter

2020-06-10 Thread Mark Shannon


Mark Shannon  added the comment:

I'm proposing that we remove the nine macros above; the eleven listed, except 
TOP() and SECOND().
They can be replaced by POP(), PUSH() and PEEK() without lost of functionality 
or performance.

--

___
Python tracker 

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



[issue40860] Exception in multiprocessing/context.py under load

2020-06-10 Thread Arkady


Arkady  added the comment:

A workaround is to synchronize the call to Process.start()

diff --git a/main.py b/main.py
index d09dc53..49d68f0 100644
--- a/main.py
+++ b/main.py
@@ -26,17 +26,24 @@ def load_cpu(deadline):
 while time.time() - start < 0.2*deadline:
 math.pow(random.randint(0, 1), random.randint(0, 1))

+def join_process(job, timeout):
+time_start = time.time()
+while time.time()-time_start < timeout and job.is_alive():
+time.sleep(0.1   * timeout)
+continue
+
 job_counter = 0
+lock = threading.Lock()
 def spawn_job(deadline):
 '''
 Creat a new Process, call join(), process errors
 '''
 global job_counter
 time_start = time.time()
-job = multiprocessing.Process(target=load_cpu, args=(deadline, ))
-job.start()
-# timeout=None in the call to join() solves the problem
-job.join(deadline)
+with lock:
+job = multiprocessing.Process(target=load_cpu, args=(deadline, ))
+job.start()
+join_process(job, deadline)

--

___
Python tracker 

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



[issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

I have two observations:

First, I think that the default DEBUG_WRITE_ALWAYS, which is the cause
of this issue, is not C standard conforming -- The standard does not
permit implementation defined diagnostics (global side effects!) on a
completely normal allocation failure.

So I would feel justified to make DEBUG_WRITE_ON_CRASH the default
on Python startup, even if that means that we force that on extension
modules.

That would also address annoyances like in msg327446. Speaking of
which, do you also get that diagnostic in cases like these?


>>> [0] * 1
Traceback (most recent call last):
  File "", line 1, in 
MemoryError


FreeBSD has a similar reporting mechanism, but the default is not
DEBUG_WRITE_ALWAYS.  I suspect DEBUG_WRITE_ALWAYS is there for the
convenience of Apple developers dealing with user reports.


Second, we *could* write such a context manager and it would probably
be okay *for the test suite*, but in general changing a static variable
that is not thread safe at runtime in a library should be avoided.


I don't have OS X at all though. Ronald, what do you think?

--

___
Python tracker 

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



[issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS

2020-06-10 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> I have two observations:
> 
> First, I think that the default DEBUG_WRITE_ALWAYS, which is the cause
> of this issue, is not C standard conforming -- The standard does not
> permit implementation defined diagnostics (global side effects!) on a
> completely normal allocation failure.

That makes sense

> So I would feel justified to make DEBUG_WRITE_ON_CRASH the default
> on Python startup, even if that means that we force that on extension
> modules.
> 
> That would also address annoyances like in msg327446. Speaking of
> which, do you also get that diagnostic in cases like these?
> 
> 
> >>> [0] * 1
> Traceback (most recent call last):
>   File "", line 1, in 
> MemoryError
>

It gives:

>>> [0] * 1
python3(36633,0x110c08dc0) malloc: can't allocate region
:*** mach_vm_map(size=84096, flags: 100) failed (error code=3)
python3(36633,0x110c08dc0) malloc: *** set a breakpoint in malloc_error_break 
to debug
Traceback (most recent call last):
  File "", line 1, in 
MemoryError

Not very nice.

> 
> FreeBSD has a similar reporting mechanism, but the default is not
> DEBUG_WRITE_ALWAYS.  I suspect DEBUG_WRITE_ALWAYS is there for the
> convenience of Apple developers dealing with user reports.
> 
> 
> Second, we *could* write such a context manager and it would probably
> be okay *for the test suite*, but in general changing a static variable
> that is not thread safe at runtime in a library should be avoided.
> 

What about overriding the default to DEBUG_WRITE_ON_CRASH if MallocDebugReport
is not set? This would be more standard compliant and still let the user 
override it if he whishes so.

> 
> I don't have OS X at all though. Ronald, what do you think?

--

___
Python tracker 

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



[issue40940] How to update pip permanently for new venv?

2020-06-10 Thread tillus

New submission from tillus :

**Describe the bug**
Every new environment has the old pip version (19.2.3)

**Expected behavior**
My system python has pip version 20 so I would expect direnv also to use the 
most recent pip version. But it installs the old pip version for every new 
environment

**Environment**
 - OS: macOS Catalina 10.15.4
 - Shell: zsh 5.7.1
 - Python version: stable 3.7.7 (homebrew bottled)

**To Reproduce**
  ```console
➜  ~ pip list
PackageVersion
-- ---
appdirs1.4.4
astroid2.4.1
distlib0.3.0
filelock   3.0.12
importlib-metadata 1.6.1
isort  4.3.21
lazy-object-proxy  1.4.3
mccabe 0.6.1
numpy  1.18.5
pip20.1.1
pylint 2.5.2
python-dateutil2.8.1
pytz   2020.1
setuptools 40.8.0
six1.12.0
toml   0.10.1
typed-ast  1.4.1
virtualenv 20.0.21
wheel  0.33.1
wrapt  1.12.1
zipp   3.1.0
➜  ~ python3 -m venv ./foobar
➜  ~ source ./foobar/bin/activate
(foobar) ➜  ~ pip list
PackageVersion
-- ---
pip19.2.3 
setuptools 41.2.0 
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```

--
components: asyncio
messages: 371187
nosy: asvetlov, tillus, yselivanov
priority: normal
severity: normal
status: open
title: How to update pip permanently for new venv?
type: behavior
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



[issue40275] test.support has way too many imports

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0d00b2a5d74390da7bbeff7dfa73abf2eb46124a by Hai Shi in branch 
'master':
bpo-40275: Add os_helper submodule in test.support (GH-20765)
https://github.com/python/cpython/commit/0d00b2a5d74390da7bbeff7dfa73abf2eb46124a


--

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-06-10 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +19974
pull_request: https://github.com/python/cpython/pull/20777

___
Python tracker 

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



[issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

> What about overriding the default to DEBUG_WRITE_ON_CRASH if 
> MallocDebugReport is not set?


That sounds like a very good compromise!

--

___
Python tracker 

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



[issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS

2020-06-10 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Ok, I will try to do this in the coming days. Is adding this kind of super 
ugly, super specific code to pymain_init() ok?

--

___
Python tracker 

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



[issue40928] test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: can't allocate region" on MacOS

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

I would probably put all that code in a separate function like
init_darwin_libc(), and call init_darwin_libc() in pymain_init().

The real fun will start when we figure out which OS X versions
support this feature. I hope we have a buildbot for each. :-)

--

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

Changing the title to get more input from others.

--
title: test_decimal.CWhitebox.test_maxcontext_exact_arith() shows "malloc: 
can't allocate region" on MacOS -> OS X: malloc(): set default diagnostics to 
DEBUG_WRITE_ON_CRASH

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-06-10 Thread Ilya Kulakov


Ilya Kulakov  added the comment:

> Unfortunately, we take backwards compatibility very seriously in the core 
> team and this is a big downside of this proposal.

Current implementation relies on that:
1. called is almost never used in practice (people just use .assert*)
2. The is True / False is discouraged and is rarely used by itself, let alone 
in combination with .called

> Wouldn't that also break any mock that is mocking an object with a 
> "called_event" attribute?

It should break them in the same way as "called" breaks them now.

--

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-06-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> 1. called is almost never used in practice (people just use .assert*)

Sorry but saying "almost never used" is not good enough. Not only because you 
hold incomplete data but because backwards compatibility is mainly binary: it 
breaks or it does not, and this breaks.

> 2. The is True / False is discouraged and is rarely used by itself, let alone 
> in combination with .called

That is not true, is actually encouraged to check for singletons like True, 
False and None.

--

___
Python tracker 

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



[issue40941] Merge generator.gi_running and frame executing flag into single frame state

2020-06-10 Thread Mark Shannon


New submission from Mark Shannon :

Generators have a "gi_running" attribute (coroutines have an equivalent 
cr_running flag). Internally frame also has an executing flag.

We use these, plus the test `f_stacktop pointer == NULL`, to determine what 
state a generator or frame is in.

It would be much cleaner to maintain a single f_state field in the frame to 
track the state of a frame, reducing the change of ambiguity and error.

The possible states of a frame are:
CREATED -- Frame exists but has not been executed at all
SUSPENDED -- Frame has been executed, and has been suspended by a yield
EXECUTING -- Frame is being executed
RETURNED -- Frame has completed by a RETURN_VALUE instruction
RAISED -- Frame has completed as a result of an exception being raised
CLEARED -- Frame has been cleared, either by explicit call to clear or by the 
GC.

--
assignee: Mark.Shannon
components: Interpreter Core
messages: 371194
nosy: Mark.Shannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Merge generator.gi_running and frame executing flag into single frame 
state
type: performance

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-06-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Current implementation relies on that:

Notice that this is a clear disadvantage over a subclass-based approach, which 
is backwards compatible and preserves the semantics of mock.

--

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Ok, I will try to do this in the coming days. Is adding this kind of super 
> ugly, super specific code to pymain_init() ok?

Maybe _PyPreConfig_Write() would be a better place.

There is a very little risk that memory allocation done before 
_PyPreConfig_Write() (i.e. in _PyPreConfig_Read()) fail with out of memory.

--
nosy: +vstinner

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Would it be possible to wrap malloc_print_configure() 
> (https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L59)
>  in a context manager that we put in test.support? or to override 
> https://github.com/PureDarwin/libmalloc/blob/e37056265821cd6e014ab911d9fe3b9d0da88e22/src/malloc_printf.c#L36?

I don't see much benefit of having a feature which only works on macOS.

You can put a hook on memory allocations using PyMem_SetAllocator() to trigger 
any action you want when any memory allocation done by Python fails.

But is it really an use case to log any memory allocation failure? Python is 
very likely to raise a MemoryError exception in this case. It's well defined, 
no?

--

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> But is it really an use case to log any memory allocation failure? Python is 
> very likely to raise a MemoryError exception in this case. It's well defined, 
> no?

Yes, we are not trying to log the allocation failure, we are just trying to 
suppress a dubious error message that occurs specifically on MacOS.

--

___
Python tracker 

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



[issue36439] Inconsistencies with datetime.fromtimestamp(t) when t < 0

2020-06-10 Thread Paul Anton Letnes


Paul Anton Letnes  added the comment:

I've encountered an issue on anaconda python on windows 10 v1909 which I 
suspect is related. It looks like no dates in 1970 can be converted to 
datetime.timestamp():

Python 3.8.2 (default, Apr 14 2020, 19:01:40) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import datetime

In [2]: datetime.datetime(1970, 1, 2, 0, 0, 1, 123456).timestamp()
---
OSError   Traceback (most recent call last)
 in 
> 1 datetime.datetime(1970, 1, 2, 0, 0, 1, 123456).timestamp()

OSError: [Errno 22] Invalid argument

In [3]: datetime.datetime(1971, 1, 2, 0, 0, 1, 123456).timestamp()
Out[3]: 31618801.123456

--
nosy: +Paul Anton Letnes

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not sure if it is worthwhile to tweak CPython to work around this 
misfeature of libc on macOS (and likely iOS).  Is this something that causes 
issues in real code, or just in the test suite?  Looking at this particular 
test is seems to use a context that is not likely to occur in real code (due to 
using a lot of memory)


Note that malloc_print_configure is not a public API, using that can cause 
problems for folks that embed Python in apps that are shipped in the app store.

--

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-06-10 Thread Ilya Kulakov


Ilya Kulakov  added the comment:

As far as I understand it introduces 3 methods that may clash. It's unlikely 
but (I speculate)
is still more likely than an identity check with called.

That being said, the PR can be redone as a subclass. But that implementation 
will not play
as nicely with the planned `awaited` property for asyncio mocks (see 
description in the PR).

--

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

No, it does not cause real issues. Adding this feature would just suppress 
chatty diagnostics like this one, which are a bit unfriendly: 

>>> [0] * 1
python3(36633,0x110c08dc0) malloc: can't allocate region
:*** mach_vm_map(size=84096, flags: 100) failed (error code=3)
python3(36633,0x110c08dc0) malloc: *** set a breakpoint in malloc_error_break 
to debug
Traceback (most recent call last):
  File "", line 1, in 
MemoryError


So yes, users do occasionally see it outside the test suite.

--

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

But if malloc_print_configure() is not a public API, it should probably not be 
used.

--

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

And indeed, with the new decimal MAX_PREC feature, you should see
the misguided diagnostic as well on OS X:

>>> from decimal import *
>>> 
>>> c = getcontext()
>>> c.prec = MAX_PREC
>>> Decimal(4).sqrt()
Decimal('2')
>>> 


So it is real code, but extremely rarely used.

--

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19975
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/20779

___
Python tracker 

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



[issue39666] IDLE: Factor out similar code in editor and hyperparser

2020-06-10 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The quote from #32989 is from my msg313179, msg313179.

There are two levels of duplication.  First, between Hyperparser and 
EditorWindow.  Second between editor and shell branches.  While I said before 
to resolve the first with an EditorWindow method, as done in the patch, a 
hyperparser function, with 'self' replaced by 'editwin' would be possible.  I 
might prefer that.

The second level of duplication could be handled by a method in EditorWindow 
overridden by a method in PyShell.  But with duplication between the branches 
removed as in the patch, leaving the Shell branch so short, this does not seem 
as worthwhile.  I suspect/expect it would be even less so after future Shell 
changes.

--
nosy: +taleinat

___
Python tracker 

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



[issue17013] Allow waiting on a mock

2020-06-10 Thread Ilya Kulakov


Ilya Kulakov  added the comment:

> That is not true, is actually encouraged to check for singletons like True, 
> False and None.

You're right, just never used it as I never needed an identity check against 
True / False

The PR is re-done to use an additional property call_event instead of extending 
called for backwards compatibility.

--

___
Python tracker 

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



[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-06-10 Thread Pinto


Pinto  added the comment:

I have the same problem on my site https://lesmarketing.fr I deactivated the 
breadcrumbs, you have found a solution ?

--
nosy: +khaled

___
Python tracker 

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've filed a report with Apple about this (FB7731971), even though I expect 
that this behaviour will not change. That's something we should have done years 
ago.

BTW. The link to malloc_print_configure that Victor shared seems to indicate 
that the default for MallocDebugReport should be "none", instead of "stderr". 
The code on opensource.apple.com conforms this 
(https://opensource.apple.com/source/libmalloc/libmalloc-283.60.1/src/malloc_printf.c.auto.html).
  Apparently Apple uses a slightly different code when building macOS :-(

Note that this annoying message is only printed when the proces runs out of 
address space, which requires allocating an insane amount of memory (the first 
warning line in the initial message of this bug report tries to allocate 872 
petabyte).  

If this is something we want to avoid its probably easier to switch to a 
allocator that won't avoids calling malloc(3) on large enough allocations (for 
example return NULL for any allocation attempt above 4TB, which is comfortably 
above the max amount of memory in a Mac Pro).  This theoretically limits memory 
allocations, but in practice the system will be unusable with far smaller 
allocations (assuming the allocated memory is actually used).

--

___
Python tracker 

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



[issue40940] How to update pip permanently for new venv?

2020-06-10 Thread Zachary Ware


Change by Zachary Ware :


--
components: +Library (Lib) -asyncio
nosy: +vinay.sajip -asvetlov, yselivanov

___
Python tracker 

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



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset ec88e1bca81a167e6d5c0ac635e22f84298cb1df by Serhiy Storchaka in 
branch 'master':
bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." 
(GH-20117)
https://github.com/python/cpython/commit/ec88e1bca81a167e6d5c0ac635e22f84298cb1df


--

___
Python tracker 

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



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +19976
pull_request: https://github.com/python/cpython/pull/20780

___
Python tracker 

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



[issue40942] BaseManager cannot start with local manager

2020-06-10 Thread Mike Jarvis


New submission from Mike Jarvis :

I had a function for making a logger proxy that could be safely passed to 
multiprocessing workers and log back to the main logger with essentially the 
following code:
```
import logging
from multiprocessing.managers import BaseManager

class SimpleGenerator:
def __init__(self, obj): self._obj = obj
def __call__(self): return self._obj

def get_logger_proxy(logger):
class LoggerManager(BaseManager): pass
logger_generator = SimpleGenerator(logger)
LoggerManager.register('logger', callable = logger_generator)
logger_manager = LoggerManager()
logger_manager.start()
logger_proxy = logger_manager.logger()

return logger_proxy

logger = logging.getLogger('test')

logger_proxy = get_logger_proxy(logger)
```
This worked great on python 2.7 through 3.7. I could pass the resulting 
logger_proxy to workers and they would log information, which would then be 
properly sent back to the main logger.

However, on python 3.8.2 (and 3.8.0) I get the following:
```
Traceback (most recent call last):
  File "test_proxy.py", line 20, in 
logger_proxy = get_logger_proxy(logger)
  File "test_proxy.py", line 13, in get_logger_proxy
logger_manager.start()
  File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/managers.py", line 
579, in start
self._process.start()
  File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/process.py", line 
121, in start
self._popen = self._Popen(self)
  File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/context.py", line 
283, in _Popen
return Popen(process_obj)
  File 
"/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", 
line 32, in __init__
super().__init__(process_obj)
  File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/popen_fork.py", 
line 19, in __init__
self._launch(process_obj)
  File 
"/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", 
line 47, in _launch
reduction.dump(process_obj, fp)
  File "/anaconda3/envs/py3.8/lib/python3.8/multiprocessing/reduction.py", line 
60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 
'get_logger_proxy..LoggerManager'
```
So it seems that something changed about ForkingPickler that makes it unable to 
handle the closure in my get_logger_proxy function.

I don't know if this is an intentional change in behavior or an unintentional 
regression.  If the former, I would appreciate advice on how to modify the 
above code to work.

Possibly relevant system details:
```
$ uname -a
Darwin Fife 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 22:24:32 PST 2018; 
root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
$ python --version
Python 3.8.2
$ which python
/anaconda3/envs/py3.8/bin/python
$ conda info

 active environment : py3.8
active env location : /anaconda3/envs/py3.8
shell level : 2
   user config file : /Users/Mike/.condarc
 populated config files : /Users/Mike/.condarc
  conda version : 4.8.3
conda-build version : 3.18.5
 python version : 3.6.5.final.0
   virtual packages : __osx=10.13.4
   base environment : /anaconda3  (writable)
   channel URLs : https://conda.anaconda.org/conda-forge/osx-64
  https://conda.anaconda.org/conda-forge/noarch
  https://conda.anaconda.org/astropy/osx-64
  https://conda.anaconda.org/astropy/noarch
  https://repo.anaconda.com/pkgs/main/osx-64
  https://repo.anaconda.com/pkgs/main/noarch
  https://repo.anaconda.com/pkgs/r/osx-64
  https://repo.anaconda.com/pkgs/r/noarch
  package cache : /anaconda3/pkgs
  /Users/Mike/.conda/pkgs
   envs directories : /anaconda3/envs
  /Users/Mike/.conda/envs
   platform : osx-64
 user-agent : conda/4.8.3 requests/2.23.0 CPython/3.6.5 
Darwin/17.5.0 OSX/10.13.4
UID:GID : 501:20
 netrc file : /Users/Mike/.netrc
   offline mode : False

```

--
components: Library (Lib)
messages: 371211
nosy: Mike Jarvis
priority: normal
severity: normal
status: open
title: BaseManager cannot start with local manager
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 3b97d1becbe08cf56c58d9c740a4622cbf6285fd by Miss Islington (bot) 
in branch '3.9':
bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." 
(GH-20117) (GH-20780)
https://github.com/python/cpython/commit/3b97d1becbe08cf56c58d9c740a4622cbf6285fd


--

___
Python tracker 

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



[issue36543] Remove old-deprecated ElementTree features (part 2)

2020-06-10 Thread Stefan Behnel


Stefan Behnel  added the comment:

The xml.etree.cElementTree module is restored. We'll see about what to do with 
it later. It hurts less to keep it around than to delete it.

I think this ticket can be closed.

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



[issue40928] OS X: malloc(): set default diagnostics to DEBUG_WRITE_ON_CRASH

2020-06-10 Thread Stefan Krah


Stefan Krah  added the comment:

> The first warning line in the initial message of this bug report tries to 
> allocate 872 petabyte.

Yes, that's for systems like Linux where you never know what overallocation is 
going to permit and subsequently freeze the system.


Special casing malloc() for OS X/large allocations sounds like a good plan.

--

___
Python tracker 

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



[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 24b8bad6d30ae4fb37ee686a073adfa5308659f9 by scoder in branch 
'master':
bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set 
yet. (GH-20273)
https://github.com/python/cpython/commit/24b8bad6d30ae4fb37ee686a073adfa5308659f9


--

___
Python tracker 

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



[issue40943] Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40943] Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


New submission from STINNER Victor :

Follow-up of bpo-36381: In Python 3.8, PyArg_ParseTuple() and Py_BuildValue() 
formats using "int" when PY_SSIZE_T_CLEAN is not defined, but Py_ssize_t when 
PY_SSIZE_T_CLEAN is defined, were deprecated by:

commit d3c72a223a5f771f964fc34557c55eb5bfa0f5a0
Author: Inada Naoki 
Date:   Sat Mar 23 21:04:40 2019 +0900

bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473)

We will remove int support from 3.10 or 4.0.

I propose to drop support for these formats in Python 3.10. It is a backward 
incompatible change on purpose, to ensure that all C extensions are compatible 
with objects larger than 2 GB, and that all C extensions behave the same.

I'm not sure of the effects of this issue on bpo-27499 "PY_SSIZE_T_CLEAN 
conflicts with Py_LIMITED_API".

--
components: C API
messages: 371216
nosy: inada.naoki, serhiy.storchaka, vstinner
priority: normal
severity: normal
status: open
title: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not 
defined
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



[issue40925] Remove redundant macros used for stack manipulation in interpreter

2020-06-10 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue40925] Remove redundant macros used for stack manipulation in interpreter

2020-06-10 Thread Dong-hee Na


Dong-hee Na  added the comment:

AFAIK, SET_VALUE is not used in CPython master codebase.

--

___
Python tracker 

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



[issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


--
title: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not 
defined -> PEP 353: Drop support for PyArg_ParseTuple() format when 
PY_SSIZE_T_CLEAN is not defined

___
Python tracker 

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



[issue40925] Remove redundant macros used for stack manipulation in interpreter

2020-06-10 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d36cf5f1d20ce9f111a8fc997104785086e8eee6 by Victor Stinner in 
branch 'master':
bpo-40943: Replace PY_FORMAT_SIZE_T with "z" (GH-20781)
https://github.com/python/cpython/commit/d36cf5f1d20ce9f111a8fc997104785086e8eee6


--

___
Python tracker 

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



[issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40943] PEP 353: Drop support for PyArg_ParseTuple() format when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

I started to write a long rationale to explain why "#" variants of formats must 
be deprecated, before I noticed that they are already deprecated! To not lost 
it, here is my rationale :-)


The C code base of Python switched from int to Py_ssize_t with PEP 353. For not 
break the backward compatibility, C extension modules have to opt-in for 
Py_ssize_t by defining PY_SSIZE_T_CLEAN macro in their code base. It affects a 
few format PyArg_ParseTuple() and Py_BuildValue():
https://docs.python.org/dev/c-api/arg.html

Currently, the documentation says "This behavior will change in a future Python 
version to only support Py_ssize_t and drop int support. It is best to always 
define PY_SSIZE_T_CLEAN."

Continue to use int by default prevents to accept content larger than 2 GB and 
causes issues with limited C API: bpo-27499.

I propose to raise a DeprecationWarning on C extension modules built without 
the PY_SSIZE_T_CLEAN macro defined.

#warning could be used to emit a warning when building a C extension without 
PY_SSIZE_T_CLEAN. The problem is that the compiler output is hidden by "pip 
install", only few developers pay attention to such warnings, and also we 
should not bother C extensions which don't use PyArg_ParseTuple() and 
Py_BuildValue().

I prefer to raise a DeprecationWarning exception at runtime since this warning 
can be made an error when using -Werror: it eases detection of deprecated 
modules without preventing to build or use a C extension using the deprecated 
functions.

Two releases after the DeprecationWarning is introduced, we can consider to 
always raise an exception. Again, I dislike the idea of always require 
PY_SSIZE_T_CLEAN macro when including "Python.h" header file. I suggest to only 
raise an exception at runtime when the few affected functions are called.

For example, PyArg_ParseTuple(args, "y*", &buffer) always Py_buffer which uses 
Py_ssize_t: the behavior does not depend on PY_SSIZE_T_CLEAN.

An alternative is to even deprecate the few "#" formats which are affected by 
PY_SSIZE_T_CLEAN.

--

___
Python tracker 

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



[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread Stefan Behnel


Change by Stefan Behnel :


--
stage: patch review -> test needed

___
Python tracker 

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



[issue40703] PyType_FromSpec*() overwrites the type's "__module__"

2020-06-10 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 9419158a3e67ba2eadf33215568003ed723b0a98 by Miss Islington (bot) 
in branch '3.9':
bpo-40703: Let PyType_FromSpec() set "type.__module__" only if it is not set 
yet. (GH-20273) (GH-20782)
https://github.com/python/cpython/commit/9419158a3e67ba2eadf33215568003ed723b0a98


--

___
Python tracker 

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



[issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40943: PEP 353: Drop support for PyArg_ParseTuple() format when 
PY_SSIZE_T_CLEAN is not defined.

--

___
Python tracker 

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



[issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Oh, I can avoid this problem by setting Py_LIMITED_API to 0x3030 or 
> greater.

Hum, maybe the behavior is different because of the following code in 
Include/modsupport.h:

/* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
#if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 
>= 0x0303

--
nosy: +vstinner

___
Python tracker 

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



[issue40943] PEP 353: Drop support for PyArg_ParseTuple() "#" formats when PY_SSIZE_T_CLEAN is not defined

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


--
title: PEP 353: Drop support for PyArg_ParseTuple() format when 
PY_SSIZE_T_CLEAN is not defined -> PEP 353: Drop support for PyArg_ParseTuple() 
"#" formats when PY_SSIZE_T_CLEAN is not defined

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f6e58aefde2e57e4cb11ea7743955da53a3f1e80 by Victor Stinner in 
branch 'master':
bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779)
https://github.com/python/cpython/commit/f6e58aefde2e57e4cb11ea7743955da53a3f1e80


--

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the bug report David Bolen and thanks for the analysis Eryk Sun. The 
bug should be be fixed in the master branch, and backports to 3.8 and 3.9 are 
coming.

--

___
Python tracker 

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



[issue40913] time.sleep ignores errors on Windows

2020-06-10 Thread Tim Golden


Tim Golden  added the comment:

Thinking about testing here.. is there any straightforward way to cause 
WaitForSingleObjectEx to fail?

The code change would be fairly slight and amenable to inspection, but it would 
be good to actually test it ;)

--

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4a4f660cfde8b683634c53e6214a6baa51de43b1 by Victor Stinner in 
branch '3.9':
bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) (GH-20785)
https://github.com/python/cpython/commit/4a4f660cfde8b683634c53e6214a6baa51de43b1


--

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19982
pull_request: https://github.com/python/cpython/pull/20787

___
Python tracker 

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



[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19983
pull_request: https://github.com/python/cpython/pull/20788

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c7a6c7b5279f766e65b7cc9dc5bebb73acee6672 by Victor Stinner in 
branch '3.8':
bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779) (GH-20785) 
(GH-20787)
https://github.com/python/cpython/commit/c7a6c7b5279f766e65b7cc9dc5bebb73acee6672


--

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 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



[issue40927] ./python -m test test___all__ test_binhex fails

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9c24e2e4c10705d95258558348417a28007dac66 by Victor Stinner in 
branch 'master':
bpo-40927: Fix test_binhex when run twice (GH-20764)
https://github.com/python/cpython/commit/9c24e2e4c10705d95258558348417a28007dac66


--

___
Python tracker 

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



[issue40927] ./python -m test test___all__ test_binhex fails

2020-06-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19984
pull_request: https://github.com/python/cpython/pull/20789

___
Python tracker 

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



[issue39465] [subinterpreters] Design a subinterpreter friendly alternative to _Py_IDENTIFIER

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1bcc32f0620d2e99649a6d423284d9496b7b3548 by Victor Stinner in 
branch 'master':
bpo-39465: Use _PyInterpreterState_GET() (GH-20788)
https://github.com/python/cpython/commit/1bcc32f0620d2e99649a6d423284d9496b7b3548


--

___
Python tracker 

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



[issue39679] functools: singledispatchmethod doesn't work with classmethod

2020-06-10 Thread Viktor Roytman


Viktor Roytman  added the comment:

Sorry to bump this after months of inactivity but is there something I need to 
do here?

--

___
Python tracker 

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



[issue40927] ./python -m test test___all__ test_binhex fails

2020-06-10 Thread STINNER Victor

STINNER Victor  added the comment:

Rémi Lapeyre: Thanks for the bug report, it's now fixed!

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



[issue40927] ./python -m test test___all__ test_binhex fails

2020-06-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset af6932575391bca10f4f2145b56e3edbe9765343 by Victor Stinner in 
branch '3.9':
bpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789)
https://github.com/python/cpython/commit/af6932575391bca10f4f2145b56e3edbe9765343


--

___
Python tracker 

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



[issue40847] New parser considers empty line following a backslash to be a syntax error, old parser didn't

2020-06-10 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue40826] PyOS_InterruptOccurred() now requires to hold the GIL: PyOS_Readline() crash

2020-06-10 Thread Eryk Sun


Eryk Sun  added the comment:

Why doesn't SuppressCrashReport suppress the hard error dialog (i.e. 
SEM_FAILCRITICALERRORS)? This dialog gets created by the NtRaiseHardError 
system call. For example:

>>> NtRaiseHardError = ctypes.windll.ntdll.NtRaiseHardError
>>> response = (ctypes.c_ulong * 1)()

With the default OS error mode, the following raises a hard error dialog for 
STATUS_UNSUCCESSFUL (0xC001), with abort/retry/ignore options:

>>> NtRaiseHardError(0xC000_0001, 0, 0, None, 0, response)
0
>>> response[0]
2

The response value is limited to abort (2), retry (7), ignore (4) -- or simply 
returned (0) when the process hard error mode is disabled: 

>>> msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS)
0
>>> NtRaiseHardError(0xC000_0001, 0, 0, None, 0, response)
0
>>> response[0]
0

NtRaiseHardError also checks for an error-mode override flag (0x1000_) in 
the status code, which is used in cases such as WinAPI FatalAppExitW. For 
example, the following will raise the dialog regardless of the hard error mode:

>>> NtRaiseHardError(0xC000_0001 | 0x1000_, 0, 0, None, 0, response)
0
>>> response[0]
2

--

___
Python tracker 

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



[issue40944] email.message.EmailMessage address parser fails to handle 'example@'

2020-06-10 Thread Ivan Savin


New submission from Ivan Savin :

How to reproduce:

>>> import email.message
>>> message = email.message.EmailMessage()
>>> message['From'] = 'hey@'
Traceback (most recent call last):
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1956, in get_address
token, value = get_group(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1914, in get_group
raise errors.HeaderParseError("expected ':' at end of group "
email.errors.HeaderParseError: expected ':' at end of group display name but 
found '@'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1782, in get_mailbox
token, value = get_name_addr(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1768, in get_name_addr
token, value = get_angle_addr(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1693, in get_angle_addr
raise errors.HeaderParseError(
email.errors.HeaderParseError: expected angle-addr but found '@'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/message.py", 
line 409, in __setitem__
self._headers.append(self.policy.header_store_parse(name, val))
  File "/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/policy.py", line 
148, in header_store_parse
return (name, self.header_factory(name, value))
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", 
line 596, in __call__
return self[name](name, value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", 
line 191, in __new__
cls.parse(value, kwds)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", 
line 334, in parse
kwds['parse_tree'] = address_list = cls.value_parser(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/headerregistry.py", 
line 325, in value_parser
address_list, value = parser.get_address_list(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1979, in get_address_list
token, value = get_address(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1959, in get_address
token, value = get_mailbox(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1785, in get_mailbox
token, value = get_addr_spec(value)
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1638, in get_addr_spec
token, value = get_domain(value[1:])
  File 
"/home/ivan/.pyenv/versions/3.9.0a5/lib/python3.9/email/_header_value_parser.py",
 line 1595, in get_domain
if value[0] in CFWS_LEADER:
IndexError: string index out of range

--
components: email
messages: 371234
nosy: Ivan Savin, barry, r.david.murray
priority: normal
severity: normal
status: open
title: email.message.EmailMessage address parser fails to handle 'example@'
type: behavior
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



[issue40944] email.message.EmailMessage address parser fails to handle 'example@'

2020-06-10 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +19985
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20790

___
Python tracker 

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



[issue40913] time.sleep ignores errors on Windows

2020-06-10 Thread Eryk Sun


Eryk Sun  added the comment:

> is there any straightforward way to cause WaitForSingleObjectEx to fail?

The wait can fail for ERROR_INVALID_HANDLE or ERROR_ACCESS_DENIED (i.e. the 
handle lacks SYNCHRONIZE access). If _PyOS_SigintEvent were replaced with 
get/set functions, then a non-waitable handle could be set temporarily via 
ctypes.

--
nosy: +eryksun

___
Python tracker 

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



[issue40945] TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent

2020-06-10 Thread Ben Li-Sauerwine


New submission from Ben Li-Sauerwine :

One would expect that calling TKinter.Tk.geometry(tk.winfo_geometry()) would be 
idempotent.  However, based on the system window frame, it is not and doing so 
moves the window down the screen.

Running the example below reproduces the issue.

--
components: Tkinter
files: tkinter_ex.py
messages: 371236
nosy: Ben Li-Sauerwine
priority: normal
severity: normal
status: open
title: TKinter.Tk.geometry(Tk.winfo_geometry()) should be idempotent
versions: Python 3.6
Added file: https://bugs.python.org/file49225/tkinter_ex.py

___
Python tracker 

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



  1   2   >