[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

Based on the feedback received in GitHub here:
https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b

I made a new revision of the 'Absolute paths' chapter here:
https://github.com/florisla/cpython/blob/pathlib-chapter-absolute-paths-2/Doc/library/pathlib.rst#absolute-paths

Further feedback is welcome.

Changes:

* Be more 'in your face' about Path.resolve() being the recommended
  approach.
* Add separate section on Windows considerations
* Explain difference between Path.resolve() and os.path.isabs() w.r.t.
  checking for drive.
* Refer to 'mapped share' instead of 'mapped network share'.
* Explain replacement of substitute drive with final path.
* Mention os.path.abspath's upcasing of drive letter in case of
  a path missing a root.
* Mention different handling of junctions versus symlinks w.r.t.
  relative parts.

For brevity, I've kept the wording on substitute drive and handling of
junctions very short.

For the same reason I did not not include eryksun's (interesting!) info
on why mapped and substitute drives are non-canonical.

Not mentioning Path.resolve()'s behavior w.r.t. non-existing files since
that's documented in resolve() itself.

--

___
Python tracker 

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



[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2020-02-24 Thread Paulo Henrique Silva


Change by Paulo Henrique Silva :


--
nosy: +phsilva

___
Python tracker 

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



[issue29450] xattr functions aren't in os.supports_fd, os.supports_follow_symlinks

2020-02-24 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
nosy_count: 2.0 -> 3.0
pull_requests: +18014
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18653

___
Python tracker 

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



[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Brandt Bucher


Brandt Bucher  added the comment:

My current PR plans are:

- Docs. This will include the dict docs and the whatsnew 3.9. I assume we have 
no plans to cover this in the tutorials, etc. Let me know if I'm missing 
anything here.
- collections.defaultdict, with tests. I don't think this needs docs beyond a 
short "changed in version 3.9" note.
- collections.OrderedDict, with tests. Ditto defaultdict on docs.
- collections.ChainMap, ditto.
- types.MappingProxy, ditto.

I'll also create a BPO issue to discuss whether the dict subclasses in 
http.cookies should be updated.

That should do it for CPython; I'm planning on updating typeshed and adding a 
handful of tests to mypy for TypedDict, etc. after these are landed.

Guido, okay to tag you on these for review?

--

___
Python tracker 

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



[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Mike Frysinger


Mike Frysinger  added the comment:

if threading.active_count() returns 1, then you know there's one thread, and 
you're it, so it's not racey, and a lock ins't needed.

thinking a bit more, what if the code just use a recursive lock ?  that would 
restore the single threaded status quo without overly complicating the code.

thinking a bit more, i think you're right that this is inherently racy, but not 
because using the APIs in async context isn't permissible.  if a signal is 
delivered after Popen.wait() finishes the OS waitpid call, but before it 
releases the lock, then the child state is not recoverable from the signal 
handler.

in our case, we're using the signal handler to kill the process, and we want to 
make sure it's exited, so being able to get the exact exit status is not 
important to us, just making sure we can detect when the process is gone.

--

___
Python tracker 

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



[issue39747] test_os debug assertion failure

2020-02-24 Thread Ethan Smith


New submission from Ethan Smith :

With CPython master branch and build.bat -e -p x64, if I run test_os I get the 
following (in a messagebox transcribed here for ease of consumption).

Sorry if I am missing something. This means I am unable to run test_os to 
completion.

I am on Windows 10.0.19559.1000 x64 with CL 19.24.28315/Visual Studio 16.4.3

For test_bad_fd:
-
Debug Assertion Failed!

Program: C:\Users\ethanhs\cpython\PCbuild\amd64\python_d.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\isatty.cpp
Line: 17

Expression: (fh >= 0 && (unsigned)fh < (unsigned)_nhandle)

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)
 ---

--
components: Windows
messages: 362624
nosy: Ethan Smith, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_os debug assertion failure
type: crash
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



[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-24 Thread Masahiro Sakai


Change by Masahiro Sakai :


--
type:  -> behavior

___
Python tracker 

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



[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the report and for the initial patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6

___
Python tracker 

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



[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Tim Peters


Tim Peters  added the comment:

Orion, you're using the interface as intended :-)

While it's too late to change now, if Python started over from scratch I'd 
argue to leave "in" and "not in" out of this feature - chaining them is 
_usually_ an unintended behavior.

Then again, sometimes it is slightly useful.  For example, if I want to know if 
`n` is in a set of primes, but isn't even,

if 2 != n in some_set_of_primes:

does the job succinctly.  But not really "Pythonically", since even experienced 
Python programmers may scratch their heads when reading it :-(

--

___
Python tracker 

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



[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum


Guido van Rossum  added the comment:

While the main code has been merged now, I propose to keep this issue open 
until some other things have happened:

- Documentation
- Add | operators to some dict subclasses in the stdlib
- (What else?)

--

___
Python tracker 

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



[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset eb8ac57af26c4eb96a8230eba7492ce5ceef7886 by Brandt Bucher in 
branch 'master':
bpo-36144: Dictionary Union (PEP 584) (#12088)
https://github.com/python/cpython/commit/eb8ac57af26c4eb96a8230eba7492ce5ceef7886


--

___
Python tracker 

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



[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum


Guido van Rossum  added the comment:

PEP 584 has been approved by the Steering Council (at my recommendation). We 
will shortly begin landing PRs related to this.

--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset daef21ce7dfd3735101d85d6ebf7554187c33ab8 by Miss Islington (bot) 
in branch '3.8':
bpo-30566: Fix IndexError when using punycode codec (GH-18632)
https://github.com/python/cpython/commit/daef21ce7dfd3735101d85d6ebf7554187c33ab8


--

___
Python tracker 

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



[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 55be9a6c09d4415f50b14212ce22eccefa83ca64 by Miss Islington (bot) 
in branch '3.7':
bpo-30566: Fix IndexError when using punycode codec (GH-18632)
https://github.com/python/cpython/commit/55be9a6c09d4415f50b14212ce22eccefa83ca64


--

___
Python tracker 

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



[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Eryk Sun


Eryk Sun  added the comment:

For reference see the section on comparisons in the language reference:

https://docs.python.org/3/reference/expressions.html#comparisons

--
nosy: +eryksun
resolution:  -> not a bug

___
Python tracker 

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



[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Orion Fisher


Orion Fisher  added the comment:

Ah, I see, thank you for the clear explanation.

Chaining is so intuitive in the case it is always introduced with, yet I never 
knew it applied so generally.

(New to the interface so I hope this is indeed where I must reply.)

--

___
Python tracker 

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



[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Orion Fisher


Change by Orion Fisher :


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



[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Tim Peters


Tim Peters  added the comment:

"!=" and "in" are comparison operators in Python, and _all_ comparison 
operators "chain".  That is,

x < y < z

means

x < y and y < z

(although y is evaluated only once), and in the same way

True != True in [False, False]

means

True != True and True in [False, False]

--
nosy: +tim.peters

___
Python tracker 

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



[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset ba22e8f174309979d90047c5dc64fcb63bc2c32e by Berker Peksag in 
branch 'master':
bpo-30566: Fix IndexError when using punycode codec (GH-18632)
https://github.com/python/cpython/commit/ba22e8f174309979d90047c5dc64fcb63bc2c32e


--

___
Python tracker 

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



[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +18012
pull_request: https://github.com/python/cpython/pull/18651

___
Python tracker 

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



[issue30566] punycode codec raises IndexError in decode_generalized_number()

2020-02-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18013
pull_request: https://github.com/python/cpython/pull/18652

___
Python tracker 

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



[issue39746] Inappropriate short circuit relating to inequality comparison and membership test

2020-02-24 Thread Orion Fisher


New submission from Orion Fisher :

I found a strange issue with how the interpreter produces bytecode for an 
expression like True != True in [False, False].

Reading it, one would expect the value of the expression to be True, whether 
the inequality comparison is evaluated first, or the membership test is 
evaluated first. Indeed, when parentheses are used to control the order of 
execution these results do occur.

However, without any parentheses, the result is False. The underlying cause 
seems to be in a short circuit which is dependent on the inequality comparison, 
seen in the JUMP_IF_FALSE_OR_POP instruction.

This expression is very synthetic, but I am submitting this bug under the worry 
that it speaks to a more significant error in the bytecode produced for 
inequality tests (or membership tests).

--
components: Interpreter Core
files: bug_occurence.py
messages: 362612
nosy: Orion Fisher
priority: normal
severity: normal
status: open
title: Inappropriate short circuit relating to inequality comparison and 
membership test
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48911/bug_occurence.py

___
Python tracker 

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



[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-24 Thread Masahiro Sakai


New submission from Masahiro Sakai :

According to https://docs.python.org/3/library/exceptions.html#BlockingIOError 
, 'characters_written' is "An integer containing the number of characters 
written to the stream before it blocked". But I observed that it represents 
number of *bytes* not *characters* in the following program.

Program:

import os
import threading
import time

r, w = os.pipe()
os.set_blocking(w, False)
f_r = os.fdopen(r, mode="rb")
f_w = os.fdopen(w, mode="w", encoding="utf-8")

msg = "\u03b1\u03b2\u03b3\u3042\u3044\u3046\u3048\u304a" * (1024 * 16)
try:
print(msg, file=f_w, flush=True)
except BlockingIOError as e:
print(f"BlockingIOError.characters_written == {e.characters_written}")
written = e.characters_written

def close():
os.set_blocking(w, True)
f_w.close()
threading.Thread(target=close).start()

b = f_r.read()
f_r.close()

print(f"{written} characters correspond to {len(msg[:written].encode('utf-8'))} 
bytes in UTF-8")
print(f"{len(b)} bytes read")


Output:

BlockingIOError.characters_written == 81920
81920 characters correspond to 215040 bytes in UTF-8
81920 bytes read


I think it is confusing behavior.
If this is intended behavior, then it should be documented as such and I think 
'bytes_written' is more appropriate name.

--
components: IO
messages: 362611
nosy: msakai
priority: normal
severity: normal
status: open
title: BlockingIOError.characters_written represents number of bytes not 
characters

___
Python tracker 

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



[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-24 Thread Zhibin Dong


Zhibin Dong  added the comment:

Yes, I think you are right. In the second solution, the callback of SIGINT will 
be append to the end of one task loop. If that code is defined in a task by 
some user, KeyboardInterrupt will not be raised.

--

___
Python tracker 

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



[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Reopening so that spending time on deciding this in the future at least stays 
on my radar.

Your workaround sounds like the reasonable, if understandably not pretty 
approach for now.

--
resolution: wont fix -> remind
status: closed -> open
versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +3.4regression, 3.5regression

___
Python tracker 

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



[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Mike Frysinger


Mike Frysinger  added the comment:

to be clear, there is no Python or OS restriction that you're aware of for your 
earlier statement ?  you just want to make it into a new Popen restriction that 
didn't previously exist ?

we came across this bug as we upgraded our existing Python 2.7 codebase to 
Python 3.6.  so even if it's "been this way for a while" (which is to say, 
since the 3.4.1 release), at least some people are going to be coming across 
this for the first time as they migrate.

if the popen APIs aren't going to handle this correctly (check 
threading.active_count?), can we at least get a knob to disable it or class 
methods we can stub out ?  we never use threads, so having popen add support 
for a runtime mode we never utilize is kind of annoying.

for now i'm defining a custom subprocess.Popen class to break the lock, but 
it's kind of terrible to have to access _waitpid_lock outside of the subprocess 
module.

--

___
Python tracker 

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



[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

yes, Popen's use of a lock since that change means that Popen.wait() cannot be 
called in an asynchronous context where its own execution could be blocking the 
execution of code that would unlock the lock.

at this point we should probably just document that.

--

___
Python tracker 

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



[issue39744] asyncio.subprocess's communicate(None) does not close stdin

2020-02-24 Thread Marek Marczykowski-Górecki

Change by Marek Marczykowski-Górecki :


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

___
Python tracker 

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



[issue39744] asyncio.subprocess's communicate(None) does not close stdin

2020-02-24 Thread Marek Marczykowski-Górecki

Marek Marczykowski-Górecki  added the comment:

This is BTW similar to https://bugs.python.org/issue26848

--

___
Python tracker 

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



[issue39744] asyncio.subprocess's communicate(None) does not close stdin

2020-02-24 Thread Marek Marczykowski-Górecki

New submission from Marek Marczykowski-Górecki :

Standard subprocess's communicate() called with None input (or no argument at 
all closes process stdin. The asyncio variant does not.
This leads to issue with various processes that wait for EOF on stdin before 
terminating.

Test script attached.

--
components: asyncio
files: commmunicate-test.py
messages: 362605
nosy: asvetlov, marmarek, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.subprocess's communicate(None) does not close stdin
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48910/commmunicate-test.py

___
Python tracker 

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



[issue39743] variable quiet is not defined in function main.

2020-02-24 Thread SilentGhost


Change by SilentGhost :


--
components: +Library (Lib) -Cross-Build
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> bad input crashes py_compile library
type:  -> behavior

___
Python tracker 

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



[issue39743] variable quiet is not defined in function main.

2020-02-24 Thread Syed Habeeb Ullah Quadri


New submission from Syed Habeeb Ullah Quadri :

'quiet' is an argument of function "compile" in "pycompile.py". I do not 
understand why 'quiet' is used in function "main" when function main has 
arguments, None.
Undefined 'quiet' variable is used in "main" function of "pycompile.py" in 
lines 200, 204, 214.
This is giving error in dist-upgrade of Ubuntu 19.1.

Attaching the pycompile.tar.xz for the review.

Please fix it at the earliest.

--
components: Cross-Build
files: pycompile.tar.xz
messages: 362604
nosy: Alex.Willmer, syed007
priority: normal
severity: normal
status: open
title: variable quiet is not defined in function main.
versions: Python 3.8
Added file: https://bugs.python.org/file48909/pycompile.tar.xz

___
Python tracker 

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



[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread Mark Dickinson


Change by Mark Dickinson :


--
resolution:  -> third party
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



[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-24 Thread Enji Cooper


Change by Enji Cooper :


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



[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-24 Thread Enji Cooper


New submission from Enji Cooper :

getdtablesize({2,3}) is a wonderful library call/system call to have access to 
because it allows one to determine the descriptor limits at runtime in an 
easier manner than having to do the equivalent with os.sysconf(..):

>>> os.sysconf(os.sysconf_names["SC_OPEN_MAX"])

This has been present in *BSD since time memorial [1] and in Linux since 2010 
[2], so I think it would be a good addition to the `os` (`posix`) module.

I will submit a diff for this in a few days, if it's deemed acceptable to have 
in the `posix` module.

1. 
https://www.freebsd.org/cgi/man.cgi?query=getdtablesize&sektion=2&manpath=freebsd-release-ports
2. http://man7.org/linux/man-pages/man2/getdtablesize.2.html

--
components: Library (Lib)
messages: 362603
nosy: ngie
priority: normal
severity: normal
status: open
title: Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module
type: enhancement

___
Python tracker 

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



[issue39741] Argument Clinic name conflict

2020-02-24 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

After preparing the patch and transforming all arguments with a __clinic_ 
prefix, I saw there are some actions that are taken by relying on the parser 
code. An example;
https://github.com/python/cpython/blob/8af4712a16e4b7d1b60f1faec13cd7a88da95f6a/Objects/codeobject.c#L616-L631

In that case, self was already replaced with __clinic_self so that code doesn't 
work. IMHO there should be an identifier to distinguish these cases like; 
->co_argc etc. When we see such defaults we can just replace them with 
the prefixed version.

--

___
Python tracker 

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



[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread nono


nono  added the comment:

Okay, I will discuss this in tensorflow forum. Thanks for providing the 
information.

--

___
Python tracker 

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



[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread Mark Dickinson


Mark Dickinson  added the comment:

Hmm. I don't see anything here that would indicate that this is a core Python 
problem. This looks like something you'd need to take up with the tensorflow 
folks. (Investigations could conceivably turn up a CPython bug as the 
underlying cause, in which case a more detailed issue could be opened here, but 
as it stands there's not really much we can do with this.)

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue39741] Argument Clinic name conflict

2020-02-24 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

Argument clinic uses some extra variables (like args, or noptargs, nargs etc.) 
for parsing. But there is a catch about these names, the generated code becomes 
wrong if there are any usages of them inside the signature. Encountered with 
this problem while working on *args support (in issue 20291). 

The possible solution is prefixing every argument in the parser with __clinic_ 
(__clinic_{var}) for preventing any kind of conflict. I'll draft a PR for this 
issue.

--
components: Argument Clinic
messages: 362599
nosy: BTaskaya, larry, pablogsal
priority: low
severity: normal
status: open
title: Argument Clinic name conflict
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



[issue20291] Argument Clinic should understand *args and **kwargs parameters

2020-02-24 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
keywords: +patch
nosy: +BTaskaya
nosy_count: 9.0 -> 10.0
pull_requests: +18009
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/18609

___
Python tracker 

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



[issue39740] Select module fails to build on Solaris 11.4

2020-02-24 Thread RobHammann


New submission from RobHammann :

On an x86 Solaris 11.4 system, the standard procedure build of python from 
source fails to build the 'select' module. Make install then fails upon trying 
to import 'select'.

In the make output, while gcc is building 'select', these errors are printed:

building 'select' extension
gcc -fPIC -Wno-unused-result -Wsign-compare -g -Og -Wall -D_REENTRANT -std=c99 
-Wextra -Wno-unused-result -Wno-unused-parameter 
-Wno-missing-field-initializers -Werror=implicit-function-declaration 
-fvisibility=hidden -I./Include/internal -I./Include -I. -I/usr/local/include 
-I/root/cpython-solaris/Include -I/root/cpython-solaris -c 
/root/cpython-solaris/Modules/selectmodule.c -o 
build/temp.solaris-2.11-i86pc.64bit-3.9-pydebug/root/cpython-solaris/Modules/selectmodule.o
/root/cpython-solaris/Modules/selectmodule.c:1147:21: error: 'devpoll_methods' 
undeclared here (not in a function); did you mean 'devpoll_dealloc'?
 {Py_tp_methods, devpoll_methods},
 ^~~
 devpoll_dealloc
/root/cpython-solaris/Modules/selectmodule.c:2299:20: warning: 
'devpoll_methods' defined but not used [-Wunused-variable]
 static PyMethodDef devpoll_methods[] = {
^~~

Attached is the combined outputs of ./configure, make, and make install

--
components: Build
files: build-output.txt
messages: 362598
nosy: RobHammann
priority: normal
severity: normal
status: open
title: Select module fails to build on Solaris 11.4
type: compile error
versions: Python 3.9
Added file: https://bugs.python.org/file48908/build-output.txt

___
Python tracker 

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



[issue34033] distutils is not reproducible

2020-02-24 Thread Matej Cepl


Change by Matej Cepl :


--
nosy:  -mcepl

___
Python tracker 

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



[issue39739] Python crash every time opening pycharm, seems related to tensorflow

2020-02-24 Thread nono


Change by nono :


--
components: macOS
nosy: leo212121, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python crash every time opening pycharm, seems related to tensorflow
type: crash
versions: Python 3.7

___
Python tracker 

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



[issue39681] pickle.load expects an object that implements readinto

2020-02-24 Thread Nathan Goldbaum


Nathan Goldbaum  added the comment:

Thank you for the fix! Yes I'm planning to file an issue with flair about this 
and patch this use case in PyTorch itself.

--

___
Python tracker 

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



[issue39737] Speed up list.__eq__ by about 6%

2020-02-24 Thread SilentGhost


Change by SilentGhost :


--
nosy: +corona10, serhiy.storchaka, vstinner

___
Python tracker 

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



[issue39700] asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails

2020-02-24 Thread David


David  added the comment:

Hi asvetlov,

Thank you for your reply.

I'm currently trying to debug a network issue, but I cannot determine the root 
cause of it because of lack of logs. It would be extremely helpful for my 
debugging if we could log the error that was raised by getpeername.

I noticed that in asyncio.proactor_events._set_socket_extra there *is* some 
logging of exceptions. 

```
def _set_socket_extra(transport, sock):
transport._extra['socket'] = trsock.TransportSocket(sock)

try:
transport._extra['sockname'] = sock.getsockname()
except socket.error:
if transport._loop.get_debug():
logger.warning(
"getsockname() failed on %r", sock, exc_info=True)

if 'peername' not in transport._extra:
try:
transport._extra['peername'] = sock.getpeername()
except socket.error:
# UDP sockets may not have a peer name
transport._extra['peername'] = None
```

Although I see that there there's also a check `if transport._loop.get_debug()` 
so that it won't pollute the log. Would you like me to add that check to my 
patch too?

Thanks!

--

___
Python tracker 

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



[issue38988] Killing asyncio subprocesses on timeout?

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

asyncio doesn't kill subprocess by timeout, that's why test1() doesn't work.
The kill is done by signal sending which is asynchronous. That's why test2 may 
fail at "FAIL(3)" point sometimes. 
1-second sleep is enough to stop this case, but maybe not enough, say, under 
high load and for much more complex program than "sleep".

That's how OS works, there is nothing specific for asyncio itself.
You can observe the same using an old good sync approach, written with any 
programming language. 
Nothing to fix here.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39613] IsolatedAsyncioTestCase closes default event loop

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The behavior is intentional and follows asyncio.run() semantics.
Moreover, every test should have a separate event loop instance, this is 
stressed by IsolatedAsyncioTestCase class name

--
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread miss-islington


miss-islington  added the comment:


New changeset 1f4cf0c22b00fefb17611546755b65d3cb488330 by Miss Islington (bot) 
in branch '3.8':
bpo-39128: Added algorithm description (GH-18624)
https://github.com/python/cpython/commit/1f4cf0c22b00fefb17611546755b65d3cb488330


--

___
Python tracker 

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



[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks, Ido

--

___
Python tracker 

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



[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18008
pull_request: https://github.com/python/cpython/pull/18649

___
Python tracker 

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



[issue39128] Document happy eyeball parameters in loop.create_connection signature docs

2020-02-24 Thread miss-islington


miss-islington  added the comment:


New changeset 8af4712a16e4b7d1b60f1faec13cd7a88da95f6a by idomic in branch 
'master':
bpo-39128: Added algorithm description (GH-18624)
https://github.com/python/cpython/commit/8af4712a16e4b7d1b60f1faec13cd7a88da95f6a


--

___
Python tracker 

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



[issue33840] connection limit on listening socket in asyncio

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

For server applications, the reverse proxy in front of the application can 
limit the connection limit.
It is a good workaround because the proxy is required (and most likely is used 
already) for any non-trivial server app.

--

___
Python tracker 

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



[issue39700] asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I'm not sure.
Logging can pollute the logger and make it almost useless.
Most of mentioned errno codes are programming errors, a few may happen due 
network issues.
Would you share what reasons did you observe?

--

___
Python tracker 

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



[issue37373] Configuration of windows event loop for libraries

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

>From my understanding, the issue is still desirable but we have a lack of 
>resources.
Regarding the patch for tornado, using selectors.SelectSelector for 
implementing add_reader()/remove_reader() and add_writer()/remove_writer() in 
ProactorEventLoop looks is more robust solution IMHO.

--

___
Python tracker 

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



[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The second solution doesn't help with breaking infinite loops like 
while True:
pass

We need a more robust idea.

--

___
Python tracker 

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



[issue39681] pickle.load expects an object that implements readinto

2020-02-24 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

The regression is fixed in git master and in the 3.8 branch. However, I would 
still advice against the idiom of handling a mmap object as a regular file when 
using pickle.

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



[issue18837] multiprocessing.reduction is undocumented

2020-02-24 Thread Ronald van Elburg


Ronald van Elburg  added the comment:

Problem still exists in 3.7 documentation. It is unclear to me, even after 
inspecting issues and commits what proper usage of multiprocessing.reduction 
is. In case it is now fully internal to the module it would be reassuring to 
read that in the documentation.

My code seems to be running without explicit reference to the 
multiprocessing.reduction module. Which suggest that reduction and rising of 
connections is no longer needed or handled by the module internally.


For python 3.7 I was able to remove the following python 2.7 code:

'''python
def __reduceConnection(self):
# Reduce the connection object to enable sending it
if(sys.platform=='win32'):
self.connection = reduction.reduce_pipe_connection(self.connection)
else:
self.connection = reduction.reduce_connection(self.connection)

def riseConnection(self,logger):
if self.connectionReduced:
logger.info('Connection for subscription to {0} with channel name 
{1} has risen!'.format(self.senderKey, self.receiverKey))
red_conn = self.connection
self.connection = red_conn[0](*red_conn[1])
self.connectionReduced=False

else:
logger.info('Connection to {0} with channel name {1} had risen 
already!'.format(self.senderKey, self.receiverKey))
'''

--
nosy: +Rajve
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue25960] Popen.wait() hangs when called from a signal handler when os.waitpid() does not

2020-02-24 Thread Mike Frysinger


Mike Frysinger  added the comment:

> fundamentally: this shouldn't work anyways.
>
> You are calling wait() from a signal handler.
> That is a blocking operation.
> You cannot do that from a signal handler.

what definition/spec are you referring to here ?  is this a Python limitation ? 
 i don't see any mention in the Python documentation on the subject:
https://docs.python.org/3/library/signal.html

maybe you meant this as an OS limitation ?  it's certainly not a POSIX 
limitation as it's quite clear on the subject:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
> The following table defines a set of functions that shall be 
> async-signal-safe. Therefore, applications can call them, without 
> restriction, from signal-catching functions.
> wait()
> waitpid()

in general, the idea that a signal handler "cannot block" is weird.  i guess 
you're saying that anything that involves the OS is forbidden ?  there's no 
guarantee something as simple as a file open() or close() won't block, or 
really any syscall at all.

i bisected a similar testcase from the OP down ... python 3.4.0 works, but 
3.4.1 fails.  looks like it's due to this change:

https://github.com/python/cpython/commit/d65ba51e245ffdd155bc1e7b8884fc943048111f
Author: Gregory P. Smith 
Date:   Wed Apr 23 00:27:17 2014 -0700

subprocess's Popen.wait() is now thread safe so that multiple threads
may be calling wait() or poll() on a Popen instance at the same time
without losing the Popen.returncode value.  Fixes issue #21291.

--
nosy: +vapier

___
Python tracker 

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex

zd nex  added the comment:

Okay I have managed to crash it when exit() was called and also I am attaching 
output with -v

python3.8 -X faulthandler ce_test_2.py 
start
end
--Return--
> /home/fractal/workspace/test_py_crash/ce_test_2.py(19)()->None
-> breakpoint()
(Pdb) exit()
Traceback (most recent call last):
  File "ce_test_2.py", line 19, in 
breakpoint()
  File "/usr/lib/python3.8/bdb.py", line 92, in trace_dispatch
return self.dispatch_return(frame, arg)
  File "/usr/lib/python3.8/bdb.py", line 154, in dispatch_return
if self.quitting: raise BdbQuit
bdb.BdbQuit
Fatal Python error: Segmentation fault

Current thread 0x7f976975f740 (most recent call first):
  File "/usr/lib/python3.8/shelve.py", line 124 in __setitem__
  File "/usr/lib/python3.8/shelve.py", line 168 in sync
  File "/usr/lib/python3.8/shelve.py", line 144 in close
  File "/usr/lib/python3.8/shelve.py", line 162 in __del__
Neoprávněný přístup do paměti (SIGSEGV)
$ 


# destroy string
# cleanup[2] removing threading
# cleanup[2] removing atexit
# cleanup[2] removing logging
# cleanup[2] removing material
# cleanup[2] removing _dbm
# cleanup[2] removing dbm.ndbm
# cleanup[2] removing dbm
# destroy dbm
# cleanup[2] removing _gdbm
# cleanup[2] removing dbm.gnu
# cleanup[2] removing _ast
# cleanup[2] removing ast
# cleanup[2] removing dbm.dumb
# destroy _ast
Fatal Python error: Segmentation fault

Current thread 0x7fd5477cb740 (most recent call first):
  File "/usr/lib/python3.8/shelve.py", line 124 in __setitem__
  File "/usr/lib/python3.8/shelve.py", line 168 in sync
  File "/usr/lib/python3.8/shelve.py", line 144 in close
  File "/usr/lib/python3.8/shelve.py", line 162 in __del__
Neoprávněný přístup do paměti (SIGSEGV)

--
Added file: https://bugs.python.org/file48907/crash_pdb.txt

___
Python tracker 

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex


zd nex  added the comment:

Okay I have tried to run it with breakpoint() but it does not crash on 3.8

--

___
Python tracker 

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Yes, It's work for me

$ uname -a
Linux laptop 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 
2020 x86_64 x86_64 x86_64 GNU/Linux
$ python3.8 --version
Python 3.8.0
$ python3.8 ce_test_2.py 
start
end

Could you please write about the results of the research with pdb.

--

___
Python tracker 

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

(sorry, didn't see the GitHub comments before... I'll process those first.)

--

___
Python tracker 

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



[issue39090] Document various options for getting the absolute path from pathlib.Path objects

2020-02-24 Thread Floris Lambrechts


Floris Lambrechts  added the comment:

@ChrisBarker,

Could you review the proposed addition to the documentation?

https://github.com/florisla/cpython/commit/c146ad3d086fe9e401284c12fc670ea4f9398f3b

--

___
Python tracker 

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex


zd nex  added the comment:

Ok I will try pdb

--

___
Python tracker 

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread zd nex


zd nex  added the comment:

Hello,

well and in 3.8 it does not crash for you? Is there some devel build of 3.9 for 
ubuntu which I can try?

I have tested it on 3.7,3.8 and 3.6 and it crashed always when close was not 
present or when list was called in another function.

--

___
Python tracker 

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



[issue39738] mod operation with large number is not correct.

2020-02-24 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This is a floating point issue, not a bug. Floats inherently only have a 
limited precision available, so they are not always the exact number you think 
they are.

Using 1e9 forces the result to be a float, which introduces rounding errors 
into the calculation. If you use an exact integer, the calculation is exact:


py> 15147666057940416-15147666057940416//17 * (10**9+7)
67543367
py> 15147666057940416 % (10**9+7)
67543367


*This is not a Python bug* this is an inherent limitation of floating point 
numbers and the same issues will occur in any language that uses floats.

https://docs.python.org/3/faq/design.html#why-am-i-getting-strange-results-with-simple-arithmetic-operations

--
nosy: +steven.daprano
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39738] mod operation with large number is not correct.

2020-02-24 Thread wjzbf


New submission from wjzbf :

hello python,

  when i calculate:

15147666057940416-15147666057940416//17 * (1e9+7)

  it returns 

67534848.0

  when i calculate 

15147666057940416 % (1e9+7)

  it returns 

67536199.0

  the two values are not equal.
  how to explain it?

thanks
zbf

--
components: Windows
messages: 362574
nosy: paul.moore, steve.dower, tim.golden, wjzbf, zach.ware
priority: normal
severity: normal
status: open
title: mod operation with large number is not correct.
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue39672] SIGSEGV crash on shutdown with shelve & c pickle

2020-02-24 Thread Andrei Daraschenka


Andrei Daraschenka  added the comment:

Could you give more details for reproduce it because on the latest version 
cpython from master branch it's work
You can debug it with help pdb. Just set breakpoint:

...
test_shelve(data)
breakpoint()
data.close()
...

And try run it step-by-step (press 'S' to go to the next step and press 'll' to 
know where you are now)
https://docs.python.org/3/library/pdb.html#debugger-commands

--
nosy: +dorosch

___
Python tracker 

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



[issue39717] Fix exception causes in tarfile module

2020-02-24 Thread Vedran Čačić

Vedran Čačić  added the comment:

I guess https://bugs.python.org/issue39728 is a perfect example of "previous 
exception not adding any value". :-) And I think it isn't a coincidence that it 
happens in "your" module.

The morale: we think about exceptions in different ways, and it's hard to say 
what's the right way. Maybe we should just change the wording to imply that 
__context__ exception didn't spontaneously "occur", but was explicitly "raised" 
by a handler.

--

___
Python tracker 

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



[issue39728] Instantiating enum with invalid value results in ValueError twice

2020-02-24 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
keywords: +patch
nosy: +dorosch
nosy_count: 4.0 -> 5.0
pull_requests: +18007
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/18641

___
Python tracker 

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