[issue40003] test.regrtest: add an option to run test.bisect_cmd on failed tests, use it on Refleaks buildbots

2020-03-27 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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-27 Thread Dong-hee Na


Dong-hee Na  added the comment:

> And I would prefer to first see the overhead of PyType_FromSpec(), and 
> discuss the advantages and drawbacks.

Should we stop the work until the overhead is measured?

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Avram


Avram  added the comment:

Honestly, I'm not sure if any of the other magic methods behave this way. It 
would take a little research or someone more familiar with it.

Here's more info about how __bool__ behaves.
https://docs.python.org/3/reference/datamodel.html#object.__bool__

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-27 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +18565
pull_request: https://github.com/python/cpython/pull/19202

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the example I didn't know hasattr can return False to return a value 
when the magicmethod was accessed. I will wait for others opinion on this then.

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Avram


Avram  added the comment:

That is not necessarily the same thing, hence why there was a bug.

>>> hasattr(object, '__bool__')
False
>>> bool(object)
True

I think you may be right that magic methods shouldn't magically appear for 
wrapped objects, except those that do magically appear, like __bool__.

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> What may make more sense for some magic methods is to call the underlying 
> object and use the return value or raise any exception that occurs.

Sorry, isn't that what the previous issue did? It tries to return the wrapped 
object attribute and raises exception if attribute is not present. Using 
wrapped object attribute and falling back to default value means that it will 
always return a value but the user can't figure out if it's from wrapped object 
or the default value for the magic method.

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Avram


Avram  added the comment:

Ah, I see, yes, the documentation is a bit inconsistent. What may make more 
sense for some magic methods is to call the underlying object and use the 
return value or raise any exception that occurs.
For example:
__bool__ return value is bool(mock._mock_wraps)
__int__ return value is int(mock._mock_wraps)
__lt__ return value is operator.lt(mock._mock_wraps, other)

This would take care of several of them and provide more consistent behavior 
with the wrapped object.

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

It's supposed to raise an AttributeError if the attribute is not present. The 
previous case was that magicmethods were not wrapped returning configured 
values. So this conflicts with the documentation returning a default value when 
not present instead of raising an AttributeError.

wraps: Item for the mock object to wrap. If wraps is not None then calling the 
Mock will pass the call through to the wrapped object (returning the real 
result). Attribute access on the mock will return a Mock object that wraps the 
corresponding attribute of the wrapped object (so attempting to access an 
attribute that doesn’t exist will raise an AttributeError).

--

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Avram


Avram  added the comment:

They are documented. That said, the subsection section could use a header.

https://docs.python.org/3/library/unittest.mock.html#magic-mock

Patch looks good! Can't think of any other test scenarios right now.

--

___
Python tracker 

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



[issue36085] Enable better DLL resolution

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



[issue40091] Crash in logging._after_at_fork_child_reinit_locks()

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

By the way, I'm not sure about the error handling code path:

for handler in _at_fork_reinit_lock_weakset:
try:
handler.createLock()
except Exception as err:
# Similar to what PyErr_WriteUnraisable does.
print("Ignoring exception from logging atfork", instance,
  "._reinit_lock() method:", err, file=sys.stderr)

Is it really a good idea to ignore such error?

By the way, there is an obvious typo: "instance" name doesn't exist, it should 
be "handler" :-)

--

___
Python tracker 

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



[issue28859] os.path.ismount sometimes raises FileNotFoundError on Windows

2020-03-27 Thread Steve Dower


Steve Dower  added the comment:

Reminding us on here is helpful (for me, anyway).

I just left a couple of suggestions to make sure we handle all the cases.

It's important when you change or add tests that you make sure the test fails 
without your fix - otherwise it might not be testing the fix!

--

___
Python tracker 

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



[issue40094] Add os._wait_status_to_returncode() helper function

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40094] Add os._wait_status_to_returncode() helper function

2020-03-27 Thread STINNER Victor


New submission from STINNER Victor :

os.wait() and os.waitpid() returns a "status" number which is not easy to 
return. It's made of two information: (how the process completed, value).

The usual way to handle it is to use a code which looks like:

if os.WIFSIGNALED(status):
self.returncode = -os.WTERMSIG(status)
elif os.WIFEXITED(status):
self.returncode = os.WEXITSTATUS(status)
elif os.WIFSTOPPED(status):
self.returncode = -os.WSTOPSIG(status)
else:
raise Exception("... put your favorite error message here ...")

It's not convenient to have to duplicate this code each time we have to handle 
a wait status.

Moreover, WIFSTOPPED() is commonly treated as "the process was killed by a 
signal", whereas the process is still alive but was only stopped. WIFSTOPPED() 
should only happen when the process is traced (by ptrace), or if waitpid() was 
called with WUNTRACED option.

The common case is not to trace a process or to use WUNTRACED. Moreover, if 
WIFSTOPPED() is true, the process is still alive and can continue its 
execution. It's bad to consider it as completed.


The subprocess module has such bug: Popen._handle_exitstatus() returns 
-os.WSTOPSIG(sts) if os.WIFSTOPPED(sts) is true.


On the other side, the pure Python implementation os._spawnvef() calls again 
waitpid() if WIFSTOPPED() is true. That sounds like a better behavior.

while 1:
wpid, sts = waitpid(pid, 0)
if WIFSTOPPED(sts):
continue

elif WIFSIGNALED(sts):
return -WTERMSIG(sts)
elif WIFEXITED(sts):
return WEXITSTATUS(sts)
else:
raise OSError("Not stopped, signaled or exited???")

But I'm not sure how WIFSTOPPED() can be true, since this function creates a 
child process using os.fork() and it doesn't use os.WUNTRACED flag.


I propose to add a private os._wait_status_to_returncode(status) helper 
function:
---
os._wait_status_to_returncode(status) -> int

Convert a wait() or waitpid() status to a returncode.

If WIFEXITED(status) is true, return WEXITSTATUS(status).
If WIFSIGNALED(status) is true, return -WTERMSIG(status).
Otherwise, raise a ValueError.

If the process is being traced or if waitpid() was called with WUNTRACED
option, the caller must first check if WIFSTOPPED(status) is true.
This function must not be called if WIFSTOPPED(status) is true.
---

I'm not sure if it's a good idea to add the helper as a private function. 
Someone may discover it and starts to use it. If we decide to make it public 
tomorrow, removing os._wait_status_to_returncode() would break code.

Maybe it's better to directly a public function? But I'm not sure if it's 
useful, nor if the function name is good, nor if good to helper an function 
function directly in the os module.

Maybe such helper should be added to shutil instead which is more the 
"high-level" flavor of the os module?

I chose to add it to the os module for different reasons:

* Existing code using os.WEXITSTATUS() and friends usually only uses the os 
module.
* It's convenient to be able to use os._wait_status_to_returncode(status) in 
the subprocess module without adding a dependency (import) on the shutil module.
* os.wait() and os.waitpid() live in the os module: it's convenient to have an 
helper functon in the same module.

What do you think?

* Is it worth it to add os._wait_status_to_returncode() helper function?

* If you like the idea, propose a better name!

* Should it remain private first?

--
components: Library (Lib)
messages: 365195
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add os._wait_status_to_returncode() helper function
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



[issue40093] ThreadPoolExecutor with wait=True shuts down too early

2020-03-27 Thread fireattack


New submission from fireattack :

Example

```
from concurrent.futures import ThreadPoolExecutor
from time import sleep

def wait_on_future():
sleep(1)
print(f.done()) # f is not done obviously
f2 = executor.submit(pow, 5, 2)
print(f2.result())
sleep(1)


executor = ThreadPoolExecutor(max_workers=100)
f = executor.submit(wait_on_future)
executor.shutdown(wait=True)
```

When debugging, it shows "cannot schedule new futures after shutdown":

Exception has occurred: RuntimeError
cannot schedule new futures after shutdown
File "test2.py", line 7, in wait_on_future
f2 = executor.submit(pow, 5, 2)

According to https://docs.python.org/3/library/concurrent.futures.html, 
`shutdown(wait=True)` "[s]ignal the executor that it should free any resources 
that it is using when the currently pending futures are done executing". But 
when f2 is being submitted, f is not done yet, so executor shouldn't be shut 
down.

--
components: Library (Lib)
messages: 365194
nosy: fireattack
priority: normal
severity: normal
status: open
title: ThreadPoolExecutor with wait=True shuts down too early
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



[issue38002] 'ModifiedInterpreter' object has no attribute 'interp'

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

You tried to run editor code and ran into a uncaught idle-process bug, which 
causes an exit.

pyshell.ModifiedInterpreter.runcode: 760-1
if self.tkconsole.executing:
self.interp.restart_subprocess()

The immediate bug is that 'self' *is* the interpreter with the 
restart_subprocess method, so '.interp' needs to be deleted.  An easy fix in 
itself.

Puzzle 1 is that I expect that 'executing' should be true whenever Shell is not 
waiting for a response to '>>>', so that we should be seeing this often.  But 
it is false when running tkinter code, when sleeping, and when waiting for 
input(prompt) response, so I don't know how it was ever true for you.

I don't remember ever seeing this exception. I will look at the code that sets 
and resets it.  Maybe the former is not being called when it should be.

Puzzle 2 is that the subprocess *is* being restarted even with this code being 
(normally) skipped.  Is it ever needed, even in the (unknown) circumstance that 
'executing' is true?  Or would that cause two restarts? This would be a new 
buglet, though preferable to the current exception exit.  The easy fix may not 
be enough.

'executing' and other shell booleans are still set as 0 and 1.  I may update 
these first.

--

___
Python tracker 

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



[issue40049] tarfile cannot extract from stdin

2020-03-27 Thread Danijel


Danijel  added the comment:

For me, this patch solves my problems. Thank you.

--

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2020-03-27 Thread David Miguel Susano Pinto


David Miguel Susano Pinto  added the comment:

I have just found out that commit 2438cdf0e93 which added the winmode argument 
and the documentation for it disagree. Documentation states that default is 
zero while the real default in code is None.

I have opened PR 19167 on github to address it

--
message_count: 60.0 -> 61.0
nosy: +carandraug
nosy_count: 14.0 -> 15.0
pull_requests: +18563
pull_request: https://github.com/python/cpython/pull/19167

___
Python tracker 

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



[issue38804] Regular Expression Denial of Service in http.cookiejar

2020-03-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +larry
priority: normal -> release blocker
versions:  -Python 2.7, 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



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

2020-03-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 6467134307cf01802c9f1c0384d8acbebecbd400 by Miro Hrončok in 
branch 'master':
bpo-36543: What's new: Document how to replace xml.etree.cElementTree (GH-19188)
https://github.com/python/cpython/commit/6467134307cf01802c9f1c0384d8acbebecbd400


--

___
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

2020-03-27 Thread Antoine Pitrou


Change by Antoine Pitrou :


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



[issue39812] Avoid daemon threads in concurrent.futures

2020-03-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset b61b818d916942aad1f8f3e33181801c4a1ed14b by Kyle Stanley in 
branch 'master':
bpo-39812: Remove daemon threads in concurrent.futures (GH-19149)
https://github.com/python/cpython/commit/b61b818d916942aad1f8f3e33181801c4a1ed14b


--

___
Python tracker 

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



[issue38819] Redirecting stdout

2020-03-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +Interpreter Core -IDLE
title: The redirect -> Redirecting stdout

___
Python tracker 

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



[issue38636] IDLE regression: toggle tabs and change indent width functions

2020-03-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue40068] test_threading: ThreadJoinOnShutdown.test_reinit_tls_after_fork() crash with Python 3.8 on AIX

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue39325] Original window focus when opening IDLE by double clicking Python file Mac

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

In mac Terminal, 'python3 -m idlelib tem.py' opens tem.py without shell, just 
as on Windows.

--

___
Python tracker 

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



[issue40045] Make "dunder" method documentation easier to locate

2020-03-27 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I think this is resolved. Someone can re-open if they feel discontent. Thanks 
@javadmokhtari for the patch.

--
stage: patch review -> resolved

___
Python tracker 

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



[issue40045] Make "dunder" method documentation easier to locate

2020-03-27 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset c3622b2dcc9278900a7e3cbef12edfa83a8728ed by Miss Islington (bot) 
in branch '3.7':
bpo-40045: Make "dunder" method documentation easier to locate (GH-19153) 
(GH-19199)
https://github.com/python/cpython/commit/c3622b2dcc9278900a7e3cbef12edfa83a8728ed


--

___
Python tracker 

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



[issue39325] Original window focus when opening IDLE by double clicking Python file Mac

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Double clicking in finder with current Mohave (10.14.6?) does same as described 
here.  See Ned's comment (msg357667) for #38946.

--

___
Python tracker 

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



[issue40045] Make "dunder" method documentation easier to locate

2020-03-27 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset bb852266b77ffeeb09a42847c907829eec6d5cb5 by Miss Islington (bot) 
in branch '3.8':
bpo-40045: Make "dunder" method documentation easier to locate (GH-19153) 
(GH-19198)
https://github.com/python/cpython/commit/bb852266b77ffeeb09a42847c907829eec6d5cb5


--

___
Python tracker 

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



[issue40045] Make "dunder" method documentation easier to locate

2020-03-27 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset 5f9c131c099d6675d1a9d0228497865488afd548 by Javad Mokhtari in 
branch 'master':
bpo-40045: Make "dunder" method documentation easier to locate (#19153)
https://github.com/python/cpython/commit/5f9c131c099d6675d1a9d0228497865488afd548


--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue40045] Make "dunder" method documentation easier to locate

2020-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18561
pull_request: https://github.com/python/cpython/pull/19199

___
Python tracker 

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



[issue40045] Make "dunder" method documentation easier to locate

2020-03-27 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue39133] threading lib. working improperly on idle window

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Insufficient information to determine even if there is a bug.

--
resolution:  -> later
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue39325] Original window focus when opening IDLE by double clicking Python file Mac

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Ned, I believe that this issue results from peculiarities of how macOS runs 
apps.  Insight from you would be appreciated.

macOS Sierra 10.2.8?, Python 3.7.3 (Did you use python.org installer?)

On my Win10, multiple IDLE windows are cascaded to the right and down.  Each 
window opened gets the focus until the focus is moved.  So on startup, the last 
window opened ends up with the focus.
  'python -m idlelib tem tem2' opens tem and then tem2.
  'python -m idlelib -i tem' opens tem then a shell.

The order is set in pyshell.main(), where sys.args is parsed to set boolean 
enable_edit and enable_shell.  Then 'if enable_edit: ...' and 'if enable_shell: 
...' execute.  I presume that the logic is that if one wants to immediately 
edit and run an existing file, there is little reason pass args to cause a 
shell opened also.

I watched your video a couple of times.  It appears to show Shell being opened 
first (with the focus) and then an editor being opened on top of it, but 
without getting the focus.  AFAIK, both are impossible.

One possible interpretation: editor and shell are opened in the normal order, 
with the editor somehow not appearing.  Then macOS intervenes to lift the 
editor above the shell, but without shifting the focus.  Or macOS intervenes 
some other way.  Or the specific tk in use on macOS has some undocumented 
macOS-specific behavior.  (The tcl/tk folk claim that 8.6.10 follows the doc 
better.)  In all these cases, IDLE's code is not responsible.  If you want to 
chase down the details, add some logging to pyshell.main.

The root problem is asking IDLE to open a shell.  For me, 'python -m idlelib 
tem' only opens tem without a shell.  Ditto for right-click 'Edit with IDLE'.  
Can you tell what command is used to start IDLE with double clicks?  Can you 
change it to not open Shell?  Also, does updating to 3.7.7 (recommended) change 
anything?

I am inclined to close this as a 3rd party or non-bug issue, but will wait a 
bit for Ned to comment.

--
nosy: +ned.deily

___
Python tracker 

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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-27 Thread Ethan Furman


Ethan Furman  added the comment:

Adding to the existing dir() is as easy as writing one's own __dir__.

I think using the instance dict and omitting any keys with a leading underscore 
will do the right thing most of the time.

The fix should into `Enum` and not just `IntEnum` as other enumerations could 
also have extra attributes.

--
assignee:  -> ethan.furman
keywords: +newcomer friendly
stage:  -> needs patch

___
Python tracker 

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



[issue40018] test_ssl fails with OpenSSL 1.1.1e

2020-03-27 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

And there is already a meta-issue created by cheimes for 3.0.0: 
https://bugs.python.org/issue38820

--

___
Python tracker 

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



[issue40091] Crash in logging._after_at_fork_child_reinit_locks()

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18559
pull_request: https://github.com/python/cpython/pull/19195

___
Python tracker 

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



[issue40090] The referenced RFC for the json module should be corrected to rfc8259

2020-03-27 Thread Ama Aje My Fren


Change by Ama Aje My Fren :


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

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Having interpreters interfering with each other's objects is almost certain 
> to lead to race conditions.

To be honest, I don't understand the purpose of this issue. Some messages are 
talking about pending calls, some others are talking about channels, and a few 
are talking about "shared" objects.

Can someone either clarify the exact intent of this issue, or close this one 
and create a new issue with a clear explanation of what should be done and why?

--

___
Python tracker 

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



[issue39984] Move pending calls from _PyRuntime to PyInterpreterState

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Awesome!  Thanks for doing this, Victor.  I'll take a look when I can and 
> adjust the changes for bpo-33608.  If you'll recall, I made a similar change 
> as part of the solution for that issue, which we later reverted due to 
> problems we discovered with daemon threads during runtime finalization.

I recall the revert dance, yeah. It took one year to fix the daemon threads and 
related issues! So far, buildbots look happy. I also ran many manual tests 
which makes me confident that the code is now reliable even with all recent 
changes done for isolating thread states.

--

___
Python tracker 

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



[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40089: "Add _at_fork_reinit() method to locks".

--

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40092: "Crash in _PyThreadState_DeleteExcept() at fork in the 
process child".

--

___
Python tracker 

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



[issue40068] test_threading: ThreadJoinOnShutdown.test_reinit_tls_after_fork() crash with Python 3.8 on AIX

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

I created 3 follow-up issues:

* bpo-40089: Add _at_fork_reinit() method to locks
* bpo-40091: Crash in logging._after_at_fork_child_reinit_locks()
* bpo-40092: Crash in _PyThreadState_DeleteExcept() at fork in the process child

--

___
Python tracker 

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



[issue40092] Crash in _PyThreadState_DeleteExcept() at fork in the process child

2020-03-27 Thread STINNER Victor


New submission from STINNER Victor :

At fork, Python calls PyOS_AfterFork_Child() in the child process which 
indirectly calls _PyThreadState_DeleteExcept() whichs calls release_sentinel() 
of the thread which releases the thread state lock 
(threading.Thread._tstate_lock).

Problem: using a lock after fork is unsafe and can crash.

That's exactly what happens randomly on AIX when stressing 
ThreadJoinOnShutdown.test_reinit_tls_after_fork() of test_threading:
https://bugs.python.org/issue40068#msg365031

There are different options to solve this issue:

* Reset _tstate_lock before using it... not sure that it's worth it, since we 
are going to delete the threading.Thread object with its _tstate_lock object 
anymore. After calling fork, the child process has exactly 1 thread: all other 
threads have been removed.

* Modify release_sentinel() to not use the lock: avoid PyThread_release_lock() 
call.

--
components: Interpreter Core
messages: 365173
nosy: vstinner
priority: normal
severity: normal
status: open
title: Crash in _PyThreadState_DeleteExcept() at fork in the process child
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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40091 "Crash in logging._after_at_fork_child_reinit_locks()" that 
I just created.

--

___
Python tracker 

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



[issue40091] Crash in logging._after_at_fork_child_reinit_locks()

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40089 "Add _at_fork_reinit() method to locks".

--

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18557
pull_request: https://github.com/python/cpython/pull/19196

___
Python tracker 

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



[issue40091] Crash in logging._after_at_fork_child_reinit_locks()

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +gregory.p.smith, vinay.sajip

___
Python tracker 

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



[issue40091] Crash in logging._after_at_fork_child_reinit_locks()

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40091] Crash in logging._after_at_fork_child_reinit_locks()

2020-03-27 Thread STINNER Victor


New submission from STINNER Victor :

test_threading.ThreadJoinOnShutdown.test_reinit_tls_after_fork() does crash 
randomly on AIX in logging._after_at_fork_child_reinit_locks():
https://bugs.python.org/issue40068#msg365028

This function ends by releasing a lock:

_releaseLock()  # Acquired by os.register_at_fork(before=.

But it is not safe to use a lock after fork (see bpo-6721 and bpo-40089).

The purpose of _after_at_fork_child_reinit_locks() is already to fix locks used 
by logging handles: see bpo-36533 and commit 
64aa6d2000665efb1a2eccae176df9520bf5f5e6. But the global logging._lock is not 
reset after fork.

Attached PR fix the issue.

--
components: Library (Lib)
messages: 365170
nosy: vstinner
priority: normal
severity: normal
status: open
title: Crash in logging._after_at_fork_child_reinit_locks()
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



[issue6721] Locks in the standard library should be sanitized on fork

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-40089: Add _at_fork_reinit() method to locks.

--

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18554
pull_request: https://github.com/python/cpython/pull/19194

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18555
pull_request: https://github.com/python/cpython/pull/19195

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d8ff44ce4cd6f3ec0fab5fccda6bf14afcb25c30 by Victor Stinner in 
branch 'master':
bpo-40089: Fix threading._after_fork() (GH-19191)
https://github.com/python/cpython/commit/d8ff44ce4cd6f3ec0fab5fccda6bf14afcb25c30


--

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +18553
pull_request: https://github.com/python/cpython/pull/19193

___
Python tracker 

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



[issue38237] Expose meaningful keyword arguments for pow()

2020-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 9c5c497ac167b843089553f6f62437d263382e97 by Miss Islington (bot) 
in branch '3.8':
bpo-38237: Use divmod for positional arguments whatsnew example (GH-19171)
https://github.com/python/cpython/commit/9c5c497ac167b843089553f6f62437d263382e97


--

___
Python tracker 

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



[issue38237] Expose meaningful keyword arguments for pow()

2020-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18552
pull_request: https://github.com/python/cpython/pull/19192

___
Python tracker 

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



[issue38237] Expose meaningful keyword arguments for pow()

2020-03-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 5a58c5280b8df4ca5d6a19892b24fff96e9ea868 by Ammar Askar in branch 
'master':
bpo-38237: Use divmod for positional arguments whatsnew example (GH-19171)
https://github.com/python/cpython/commit/5a58c5280b8df4ca5d6a19892b24fff96e9ea868


--
nosy: +pablogsal

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

_at_fork() has a bug: it creates a _DummyThread instead of a _MainThread. 
Example:
---
import os, _thread, threading, time

def fork_in_thread():
pid = os.fork()
if pid:
# parent
os._exit(0)

# child process
print(f"child process: {threading.current_thread()=}")
print(f"child process: {threading._main_thread=}")

print(f"parent process: {threading.current_thread()=}")
print(f"parent process: {threading._main_thread=}")

_thread.start_new_thread(fork_in_thread, ())
# block the main thread: fork_in_thread() exit the process
time.sleep(60)
---

Output:
---
parent process: threading.current_thread()=<_MainThread(MainThread, started 
139879200077632)>
parent process: threading._main_thread=<_MainThread(MainThread, started 
139879200077632)>
child process: threading.current_thread()=<_DummyThread(Dummy-1, started daemon 
139878980245248)>
child process: threading._main_thread=<_DummyThread(Dummy-1, started daemon 
139878980245248)>
---

My PR 19191 fix the issue:
---
parent process: threading.current_thread()=<_MainThread(MainThread, started 
140583665170240)>
parent process: threading._main_thread=<_MainThread(MainThread, started 
140583665170240)>
child process: threading.current_thread()=<_MainThread(MainThread, started 
140583445075712)>
child process: threading._main_thread=<_MainThread(MainThread, started 
140583445075712)>
---

--

___
Python tracker 

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



[issue40083] No run option available in python idle in version 3.8.2

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Run only appears on the main menu of editor windows, not Shell or Output 
windows.  If it does not appear, that would be a major bug.  But I have no 
problem with 3.8.2 on Win10 Pro.

If you do not have Run in an editor, or do but do not have Run Module or Run 
Customized on the Run menu, please supply much more detailed information.
1. How are you installing python?  From the python.org installer (which one)?  
From the Window store?  From a 3rd party installer (which one)?
2. How do you start IDLE?
3. What does Help => About IDLE say about the tk version?
4. How do you get an editor window?  What do you see on the menu?  If Run 
appears, what happens when you click it?
5. Start IDLE from Command Prompt with "py -3.8 -m idlelib".  Do you ever see 
any error messages?
6. Have you touched any files in Lib/idlelib?

--
nosy:  -twouters

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2020-03-27 Thread Eric Snow


Eric Snow  added the comment:

FYI, in bpo-39984 Victor moved pending calls to PyInterpreterState, which was 
part of my reverted change.  However, there are a few other pieces of that 
change that need to be applied before this issue is resolved.  I'm not sure 
when I'll get to it, but hopefully soon.

--

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40090] The referenced RFC for the json module should be corrected to rfc8259

2020-03-27 Thread Ama Aje My Fren


New submission from Ama Aje My Fren :

Currently the Documentation of the json library module refers to :rfc:`7159` . 
That RFC has however been obsoleted by :rfc:`8259`. 

The Documentation for :mod:`json` should be changed to indicate this.

--
assignee: docs@python
components: Documentation
messages: 365162
nosy: amaajemyfren, docs@python
priority: normal
severity: normal
status: open
title: The referenced RFC for the json module should be corrected to rfc8259
type: enhancement
versions: 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



[issue39984] Move pending calls from _PyRuntime to PyInterpreterState

2020-03-27 Thread Eric Snow


Eric Snow  added the comment:

Awesome!  Thanks for doing this, Victor.  I'll take a look when I can and 
adjust the changes for bpo-33608.  If you'll recall, I made a similar change as 
part of the solution for that issue, which we later reverted due to problems we 
discovered with daemon threads during runtime finalization.

--
nosy: +eric.snow

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2020-03-27 Thread Mark Shannon


Mark Shannon  added the comment:

Just to add my 2 cents.

I think this a bad idea and is likely to be unsafe.
Having interpreters interfering with each other's objects is almost certain to 
lead to race conditions.

IMO, objects should *never* be shared across interpreters (once interpreters 
are expected to be able to run in parallel).

Any channel between two interpreters should consist of two objects, one per 
interpreter. The shared memory they use to communicated can be managed by the 
runtime. Likewise for inter-interpreter locks. The lock itself should be 
managed by the runtime, with each interpreter having its own lock object with a 
handle on the shared lock.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue40031] Python Configure IDLE 'Ok' and 'Apply' buttons do not seem to work.

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What does Help => About IDLE say about the tk version?

--

___
Python tracker 

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



[issue40031] Python Configure IDLE 'Ok' and 'Apply' buttons do not seem to work.

2020-03-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Upgrading to bugfix releases is usually a good idea.  Aside from everything 
else, there is usually some change to IDLE.

Again, how are you installing python?  From the python.org installer (which 
one)?  From the Window store?  From a 3rd party installer?

--

___
Python tracker 

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



[issue38966] List similarity relationship

2020-03-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
components: +Interpreter Core -IDLE

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +Batuhan Taskaya

___
Python tracker 

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



[issue40089] Add _at_fork_reinit() method to locks

2020-03-27 Thread STINNER Victor


New submission from STINNER Victor :

Using a lock after fork() is unsafe and can crash.

Example of a crash in logging after a fork on AIX:
https://bugs.python.org/issue40068#msg365028

This problem is explained in length in bpo-6721: "Locks in the standard library 
should be sanitized on fork".

The threading module registers an "at fork" callback: 
Thread._reset_internal_locks() is called to reset self._started 
(threading.Event) and self._tstate_lock. The current implementation creates new 
Python lock objects and forgets about the old ones.

I propose to add a new _at_fork_reinit() method to Python lock objects which 
reinitializes the native lock internally without having to create a new Python 
object.

Currently, my implementation basically creates a new native lock object and 
forgets about the old new (don't call PyThread_free_lock()).

Tomorrow, we can imagine a more efficient impementation using platform specific 
function to handle this case without having to forget about the old lock.

--
components: Library (Lib)
messages: 365157
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add _at_fork_reinit() method to locks
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



[issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation

2020-03-27 Thread John Andersen


John Andersen  added the comment:

I'm going to take a stab at this by adding build_swig which will run if the 
list of files only contains .i files.

--

___
Python tracker 

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



[issue39943] Meta: Clean up various issues in C internals

2020-03-27 Thread Andy Lester


Andy Lester  added the comment:

Casting tail to (void *)tail was the correct thing to do.  The problem is that 
casting to void* casts away the constness of tail.  The even more correct thing 
to do is what my patch does, which is cast it to (const void *)tail.

There is no functional difference between sending a const void * and a void * 
to fprintf.  However, it's one more bit of noise for -Wcast-qual to gripe 
about.  My hope is to clear up the noise to find the real problems.

For example, if you had this very bad code:

const char *msg = "literal";
strcpy(msg, "another string");

then the compiler would complain you're passing a non-const char * to the first 
arg of strcpy that wants a const char *.  That's a good thing.

However, you could naively change that to:

strcpy((char *)msg, "another string");

and that would compile just fine, but the code would still be a big problem. It 
would require -Wcast-qual to warn you that you're casting away the constness of 
a pointer.

...

For pymemallocator_eq, changing the arguments to const doesn't quiet any 
warnings in this case with this one function.  However, it's good to make them 
const because the arguments are not getting modified.  They're getting passed 
to memcmp(), which properly takes const void *.

--

___
Python tracker 

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



[issue25780] Add support for CAN_RAW_JOIN_FILTERS

2020-03-27 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 3.0 -> 4.0
pull_requests: +18550
pull_request: https://github.com/python/cpython/pull/19190

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-27 Thread Stefan Krah


Stefan Krah  added the comment:

> Or maybe _decimal_state_global was used in "hot code".

Yes, _decimal has problems here that most modules don't have.
Modules like atexit are obviously fine. :)

I just posted it as an example why one should be a bit cautious.


> The PEP 573 is going to give access to the module state in functions which 
> didn't access to it previously.

That could help, we'll see.

--

___
Python tracker 

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



[issue8978] "tarfile.ReadError: file could not be opened successfully" if compiled without zlib

2020-03-27 Thread Deep Sukhwani


Deep Sukhwani  added the comment:

Hello, I just observed this issue on Python 3.8.2 while running tests for 
Django project.

Example error
==
ERROR: test_extract_function (utils_tests.test_archive.TestArchive) 
[foobar.tar.xz]
--
Traceback (most recent call last):
...
raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

Python version: 3.8.2
OS: macOS Catalina 10.15.4

This should be reopened?

--
nosy: +Deep Sukhwani

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1c1e68cf3e3a2a19a0edca9a105273e11c6e by Victor Stinner in 
branch 'master':
bpo-38644: Use _PySys_Audit(): pass tstate explicitly (GH-19183)
https://github.com/python/cpython/commit/1c1e68cf3e3a2a19a0edca9a105273e11c6e


--

___
Python tracker 

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



[issue39943] Meta: Clean up various issues in C internals

2020-03-27 Thread STINNER Victor

STINNER Victor  added the comment:

> However, it does quiet the -Wcast-qual compiler warning that could be a 
> helpful addition some time in the future.

Aha, that's intesting. It helps me if I can see that your change fix a compiler 
warning that I can reproduce. If I build Objects/obmalloc.c with -Wcast-qual 
using GCC 9.2.1 (on Fedora 31), I get:

Objects/obmalloc.c:2455:66: warning: cast discards 'const' qualifier from 
pointer target type [-Wcast-qual]
 2455 | fprintf(stderr, "The %d pad bytes at tail=%p are ", SST, (void 
*)tail);
  |  ^


But I get no warning for pymemallocator_eq().


About the (void *) cast, it was added by Zackery Spytz in bpo-36594:

commit 1a2252ed39bc1b71cdaa935d7726d82909af93ab
Author: Zackery Spytz 
Date:   Mon May 6 10:56:51 2019 -0600

bpo-36594: Fix incorrect use of %p in format strings (GH-12769)

In addition, fix some other minor violations of C99.

(...)
-fprintf(stderr, "The %d pad bytes at tail=%p are ", SST, tail);
+fprintf(stderr, "The %d pad bytes at tail=%p are ", SST, (void *)tail);
(...)

Extract of the issue:

"""
gcc warns with -pedantic:

ptr.c: In function ‘main’:
ptr.c:5:13: warning: format ‘%p’ expects argument of type ‘void *’, but 
argument 2 has type ‘int *’ [-Wformat=]
 printf ("%p", );
"""

We should check that GCC doesn't emit warning with -pedantic nor -Wcast-qual, 
and when both flags are combined :-)

--

___
Python tracker 

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



[issue40088] list.reverse(): slow sublist reverse

2020-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This looks like a duplicate of https://bugs.python.org/issue1491804

--
nosy: +rhettinger, xtreak

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

In the _json module, PyModule_GetState() (called by get_json_state()) is only 
used by the garbage collector (traverse function) and to unload the module 
(clear and free functions). It's not used in "hot code" (let me consider that 
the GC is not part of the usual "hot code" :-)).

But maybe we should measure the overhead of future changes if 
PyModule_GetState() starts to be used in "hot code" by running a few 
microbenchmarks.

--

Stefan Krah:
> Yes, and not only startup time:
> https://bugs.python.org/issue15722

Aha, that's interesting. I didn't know that it could have an impact on runtime 
performance as well.

_decimal_pep3121-384_v1.patch attached to bpo-15722 seems to use:

#define _decimal_state_global ((_decimal_state 
*)PyModule_GetState(PyState_FindModule(&_decimal_module)))

whereas the commit 33f15a16d40cb8010a8c758952cbf88d7912ee2d only uses:

static inline _jsonmodulestate*
get_json_state(PyObject *module)
{
void *state = PyModule_GetState(module);
assert(state != NULL);
return (_jsonmodulestate *)state;
}

Maybe PyState_FindModule() adds a little overhead, even if this function is 
simple: in short, it gets the i-th item of a list (from 
PyInterpreterState.modules_by_index).

PyModule_GetState() function is really simple: it only reads 
PyModuleObject.md_state attribute.

Or maybe _decimal_state_global was used in "hot code".

If PyState_FindModule() or PyModule_GetState() is the source of the overhead, 
maybe we could try to optimise these functions, or pass directly the module 
state to inner functions.

--

PyState_FindModule() doesn't work for a module using PyModuleDef_Init(). The 
PEP 573 is going to give access to the module state in functions which didn't 
access to it previsouly.

The commit 33f15a16d40cb8010a8c758952cbf88d7912ee2d removed a few assertions 
checking that "self" has the expected type. It wasn't possible to get the 
module state to get the types, because PEP 573 is not implemented yet and 
PyState_FindModule() doesn't work in _json (which uses PyModuleDef_Init()). I 
decided that it's ok to remove these assertions: it should not be possible to 
call these functions with another type in practice.

--

In his PR 19177, Dong-hee started by replacing direct access to PyTypeObject 
fields, like replacing:

type->free(self);

with:

freefunc free_func = PyType_GetSlot(tp, Py_tp_free);
free_func(self);

I asked him to revert these changes.

I'm interested to experiment a few C extension modules of the stdlib using the 
limited C API (PEP 384, stable ABI), but I don't think that it should done 
while converting modules to PyType_FromSpec().

We should separate the two changes. And I would prefer to first see the 
overhead of PyType_FromSpec(), and discuss the advantages and drawbacks.

--

___
Python tracker 

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



[issue40086] test_etree is skipped in test_typing due to cElementTree removal

2020-03-27 Thread Furkan Önder

Change by Furkan Önder :


--
keywords: +patch
nosy: +furkanonder
nosy_count: 2.0 -> 3.0
pull_requests: +18549
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19189

___
Python tracker 

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



[issue40018] test_ssl fails with OpenSSL 1.1.1e

2020-03-27 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

The change has been reverted upstream.

Also on the rawhide buildbots, we have an updated build with the commit 
reverted, so they returned back to green.

Now the revertion will be included at a new release of the 1.1.1 branch, 
however it will still be on the 3.0.0 branch when it will be released, so at 
that point a possible rewrite of the ssl module will be required, as is the 
case with every major openssl update.

I'd suggest to close this issue and open a new one for compatibility with 
openssl 3.0.0.

--

___
Python tracker 

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



[issue40088] list.reverse(): slow sublist reverse

2020-03-27 Thread Yury Norov


New submission from Yury Norov :

Hi all,

In Python, I need a tool to reverse part of a list (tail) quickly.
I expected that

nums[start:end].reverse()

would do it inplace with the performance similar to nums.reverse().
However, it doesn't work at all. The fastest way to reverse a part of
the list that I found is like this:

nums[start:end] = nums[end:start-1:-1]

But it is 30 times slower than pure reverse(). The patch below adds
a region support for the reverse(). It works as fast as I expect.

The test results and script are like this:

exec(open('test.py').read())
nums.reverse() 0.006764888763427734
nums = nums[::-1] 0.10066413879394531
nums.reverse(-L/2) 0.003548145294189453
nums.reverse(L/2, L) 0.003538370132446289
nums = nums[:L/2] + nums[L:L/2-1:-1] 0.19934582710266113
nums[L/2:L] = nums[L:L/2-1:-1] 0.11419057846069336

import time

nums = list(range(1000))
L = len(nums)
LL = int(L/2)

t = time.time()
nums.reverse()
print('nums.reverse()\t\t\t\t', str(time.time() - t))

t = time.time()
nums = nums[::-1]
print('nums = nums[::-1]\t\t\t', str(time.time() - t))

t = time.time()
nums.reverse(-LL)
print('nums.reverse(-L/2)\t\t\t', time.time() - t)

t = time.time()
nums.reverse(LL, L)
print('nums.reverse(L/2, L)\t\t\t', time.time() - t)

t = time.time()
nums = nums[:LL] + nums[L : LL - 1 : -1]
print('nums = nums[:L/2] + nums[L:L/2-1:-1]\t', time.time() - t)

t = time.time()
nums[LL:L] = nums[L:LL-1:-1]
print('nums[L/2:L] = nums[L:L/2-1:-1]\t\t', time.time() - t)

If there is better way to reverse lists, can someone point me at the right 
direction? If not, I'll be happy to fix all existing issues and upstream
this approach.

PR: https://github.com/python/cpython/pull/19181

Thanks,
Yury

--
components: C API, Interpreter Core
messages: 365147
nosy: Yury
priority: normal
pull_requests: 18548
severity: normal
status: open
title: list.reverse(): slow sublist reverse
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



[issue40087] How to Uninstall Python3.7.3 using cmd?

2020-03-27 Thread Deepalee Khare


New submission from Deepalee Khare :

How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec /uninstall 
C:\Python37\python.exe But it giver me an error:

"This installation package could not be opened.  Contact the application vendor 
to verify that this is a valid Windows Installer package."


how do i uninstall it ?

--
components: Windows
messages: 365146
nosy: deepaleedotkh...@gmail.com, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: How to Uninstall Python3.7.3 using cmd?
type: performance
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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-27 Thread Stefan Krah


Stefan Krah  added the comment:

> Wouldn't having less static types slow down startup time?

Yes, and not only startup time:

https://bugs.python.org/issue15722

--
nosy: +skrah

___
Python tracker 

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



[issue39966] mock 3.9 bug: Wrapped objects without __bool__ raise exception

2020-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

On thinking more about this the wraps argument provides a way to wrap the calls 
for the mock to a given object. So when an attribute not present in the wrapped 
object is being accessed then it should act like the attribute is not present. 
Falling back to the default value like previous case would help but that will 
pose the question over whether the value is from the wrapped object's attribute 
or from the default value for the magic method that the user could never know. 
This could be better clarified in the docs I suppose which I missed in the 
previous issue. 

Thoughts on this fallback behavior?

--

___
Python tracker 

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



[issue40086] test_etree is skipped in test_typing due to cElementTree removal

2020-03-27 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

Currently, test_etree has a Python 2 shim importing cElementTree and skipping 
the test on ImportError. Since cElementTree was deprecated and removed in 
Python 3 with 36543. So this test is now skipped. The fix would be to remove 
the shim and import Element from xml.etree.ElementTree. This is a good beginner 
issue. Test log as below : 

./python -m test test_typing -m test_etree -vvv
== CPython 3.9.0a5+ (heads/master:33f15a16d4, Mar 27 2020, 11:15:48) [GCC 7.5.0]
== Linux-4.15.0-66-generic-x86_64-with-glibc2.27 little-endian
== cwd: /root/cpython/build/test_python_24162
== CPU count: 1
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 0.07 Run tests sequentially
0:00:00 load avg: 0.07 [1/1] test_typing
test_etree (test.test_typing.UnionTests) ... skipped 'cElementTree not found'

--

Ran 1 test in 0.001s

OK (skipped=1)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 150 ms
Tests result: SUCCESS

--
components: Tests, XML
messages: 365143
nosy: serhiy.storchaka, xtreak
priority: normal
severity: normal
stage: needs patch
status: open
title: test_etree is skipped in test_typing due to cElementTree removal
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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue36093] UnicodeEncodeError raise from smtplib.verify() method

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



[issue40077] Convert static types to PyType_FromSpec()

2020-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 33f15a16d40cb8010a8c758952cbf88d7912ee2d by Dong-hee Na in branch 
'master':
bpo-40077: Convert _json module to use PyType_FromSpec() (GH-19177)
https://github.com/python/cpython/commit/33f15a16d40cb8010a8c758952cbf88d7912ee2d


--

___
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-03-27 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy: +hroncok
nosy_count: 4.0 -> 5.0
pull_requests: +18547
pull_request: https://github.com/python/cpython/pull/19188

___
Python tracker 

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



[issue36453] pkgutil.get_importer only return the first valid path_hook(importer)

2020-03-27 Thread Windson Yang


Windson Yang  added the comment:

Any update?

--

___
Python tracker 

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



[issue36093] UnicodeEncodeError raise from smtplib.verify() method

2020-03-27 Thread Windson Yang


Windson Yang  added the comment:

Any update?

--

___
Python tracker 

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



[issue40085] Argument parsing option c should accept int between -128 to 255 ?

2020-03-27 Thread tzickel


New submission from tzickel :

I converted some code from python to c-api and was surprised that a code 
stopped working.

Basically the "c" parsing option allows for 1 char bytes or bytearray inputs 
and converts them to a C char.

But just as indexing a bytes array returns an int, so should this option 
support it. i.e. b't'[0] = 116

Not sure if it should limit between 0 to 255 or -128 to 127.

--
components: C API
messages: 365139
nosy: tzickel
priority: normal
severity: normal
status: open
title: Argument parsing option c should accept int between -128 to 255 ?
type: enhancement
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



[issue40084] HTTPStatus has incomplete dir() listing

2020-03-27 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The dir() listing omits the attributes "description" and "phrase":

>>> import http
>>> from pprint import pp
>>> r = http.HTTPStatus(404)
>>> pp(vars(r))
{'_value_': 404,
 'phrase': 'Not Found',
 'description': 'Nothing matches the given URI',
 '_name_': 'NOT_FOUND',
 '__objclass__': }
>>> r.value
404
>>> r.name
'NOT_FOUND'
>>> r.description
'Nothing matches the given URI'
>>> r.phrase
'Not Found'
>>> dir(r)
['__class__', '__doc__', '__module__', 'as_integer_ratio', 'bit_length', 
'conjugate', 'denominator', 'from_bytes', 'imag', 'name', 'numerator', 'real', 
'to_bytes', 'value']

One fix would be to teach IntEnum.__dir__() to include entries in the instance 
dict.  Another fix would be to provide a way for a IntEnum subclass to add to 
the known members list.

--
components: Library (Lib)
messages: 365138
nosy: ethan.furman, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: HTTPStatus has incomplete dir() listing
type: behavior
versions: 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



[issue40083] No run option available in python idle in version 3.8.2

2020-03-27 Thread Rajesh R Naik


New submission from Rajesh R Naik :

i using pyhton 3.8.2 latest version in that there no run option available in 
python idle.
so please help
also iam using windows 10 home

--
assignee: terry.reedy
components: IDLE
messages: 365137
nosy: Raj_110, terry.reedy, twouters
priority: normal
severity: normal
status: open
title: No run option available in python idle in version 3.8.2
type: performance
versions: Python 3.8

___
Python tracker 

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



[issue40082] Assertion failure in trip_signal

2020-03-27 Thread Alexander Riccio


Alexander Riccio  added the comment:

Hmmm, happens every time I interrupt while attached. Is there some obvious 
gotcha in the docs that I'm missing?

--

___
Python tracker 

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



[issue40082] Assertion failure in trip_signal

2020-03-27 Thread Alexander Riccio


Alexander Riccio  added the comment:

Lmao the name mangling comes up as a mailto. That's interesting.

--

___
Python tracker 

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



[issue40082] Assertion failure in trip_signal

2020-03-27 Thread Alexander Riccio


New submission from Alexander Riccio :

While trying to make sense of some static analysis warnings for the Windows 
console IO module, I Ctrl+C'd in the middle of an intentionally absurd __repr__ 
output, and on proceeding in the debugger (which treated it as an exception), I 
immediately hit the assertion right here:

/* Get the Python thread state using PyGILState API, since
   _PyThreadState_GET() returns NULL if the GIL is released.
   For example, signal.raise_signal() releases the GIL. */
PyThreadState *tstate = PyGILState_GetThisThreadState();
assert(tstate != NULL);

...With the stacktrace: 
ucrtbased.dll!issue_debug_notification(const wchar_t * const message) 
Line 28   C++
ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 
154 C++
ucrtbased.dll!abort() Line 51   C++
ucrtbased.dll!common_assert_to_stderr_direct(const wchar_t * const 
expression, const wchar_t * const file_name, const unsigned int line_number) 
Line 161C++
ucrtbased.dll!common_assert_to_stderr(const wchar_t * const 
expression, const wchar_t * const file_name, const unsigned int line_number) 
Line 175  C++
ucrtbased.dll!common_assert(const wchar_t * const expression, 
const wchar_t * const file_name, const unsigned int line_number, void * const 
return_address) Line 420   C++
ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * 
file_name, unsigned int line_number) Line 443C++
>   python39_d.dll!trip_signal(int sig_num) Line 266C
python39_d.dll!signal_handler(int sig_num) Line 342 C
ucrtbased.dll!ctrlevent_capture(const unsigned long ctrl_type) Line 206 
C++
KernelBase.dll!_CtrlRoutine@4()Unknown
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!__RtlUserThreadStart()Unknown
ntdll.dll!__RtlUserThreadStart@8() Unknown


...I'm not entirely sure why this happened, but I can tell a few things. 
_PyRuntime.gilstate.autoInterpreterState is NOT null, in fact the gilstate 
object is as displayed in my watch window: 

-   _PyRuntime.gilstate {check_enabled=1 
tstate_current={_value=0 } getframe=0x79e3a570 
{python39_d.dll!threadstate_getframe(_ts *)} ...}   _gilstate_runtime_state
check_enabled   1   int
+   tstate_current  {_value=0 } _Py_atomic_address
getframe0x79e3a570 
{python39_d.dll!threadstate_getframe(_ts *)} _frame *(*)(_ts *)
-   autoInterpreterState0x00e5eff8 {next=0x  
tstate_head=0x00e601c0 {prev=0x  next=0x  ...} ...} 
 _is *
+   next0x_is *
+   tstate_head 0x00e601c0 {prev=0x  
next=0x  interp=0x00e5eff8 {next=0x  ...} ...}   
_ts *
+   runtime 0x7a0e2118 {python39_d.dll!pyruntimestate _PyRuntime} 
{preinitializing=0 preinitialized=1 core_initialized=...} pyruntimestate *
id  0   __int64
id_refcount -1  __int64
requires_idref  0   int
id_mutex0x  void *
finalizing  0   int
+   ceval   {tracing_possible=0 eval_breaker={_value=0 } 
pending={finishing=0 lock=0x00e59390 calls_to_do={_value=...} ...} }   
_ceval_state
+   gc  {trash_delete_later=0x  
trash_delete_nesting=0 enabled=1 ...} _gc_runtime_state
+   modules 0x00bf1228 {ob_refcnt=3 ob_type=0x7a0b1178 
{python39_d.dll!_typeobject PyDict_Type} {ob_base={ob_base=...} ...} }   
_object *
+   modules_by_index0x00750058 {ob_refcnt=1 
ob_type=0x7a0b8210 {python39_d.dll!_typeobject PyList_Type} 
{ob_base={ob_base=...} ...} }   _object *
+   sysdict 0x00bf1298 {ob_refcnt=2 ob_type=0x7a0b1178 
{python39_d.dll!_typeobject PyDict_Type} {ob_base={ob_base=...} ...} }   
_object *
+   builtins0x00bf1f48 {ob_refcnt=88 ob_type=0x7a0b1178 
{python39_d.dll!_typeobject PyDict_Type} {ob_base={ob_base=...} ...} }  
_object *
+   importlib   0x00c0df60 {ob_refcnt=28 ob_type=0x7a0b92d0 
{python39_d.dll!_typeobject PyModule_Type} {ob_base={ob_base=...} ...} }
_object *
num_threads 0   long
pythread_stacksize  0   unsigned int
+   codec_search_path   0x00c4a260 {ob_refcnt=1 
ob_type=0x7a0b8210 {python39_d.dll!_typeobject PyList_Type} 
{ob_base={ob_base=...} ...} }   _object *
+   codec_search_cache  0x00c1f0d8 {ob_refcnt=1 
ob_type=0x7a0b1178 {python39_d.dll!_typeobject PyDict_Type} 
{ob_base={ob_base=...} ...} }   _object *
+   codec_error_registry0x00c14f10 {ob_refcnt=1 
ob_type=0x7a0b1178 {python39_d.dll!_typeobject PyDict_Type} 
{ob_base={ob_base=...} ...} }   _object *

  1   2   >