[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-15 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +17093
pull_request: https://github.com/python/cpython/pull/17623

___
Python tracker 

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



[issue39035] Travis CI fail on backports: pyvenv not installed

2019-12-15 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +17092
pull_request: https://github.com/python/cpython/pull/17622

___
Python tracker 

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



[issue38904] "signal only works in main thread" in main thread

2019-12-15 Thread Richard Warfield


Richard Warfield  added the comment:

Thanks for looking into this.  Changing the behavior of the
"threading" module to be consistent with the runtime and "signal" module
would be sufficient, at least for my particular case.  If the "if
threading.current_thread() is threading.main_thread()" guard worked as
expected it would be clear how to resolve the problem.

On Sat, Dec 14, 2019 at 6:25 AM Eric Snow  wrote:

>
> Eric Snow  added the comment:
>
> Before 3.8, the "signal" module checked against the thread in which the
> module was initially loaded, treating that thread as the "main" thread.
> That same was true (and still is) for the "threading" module.  The problem
> for both modules is that the Python runtime may have actually been
> initialized in a different thread, which is the actual "main" thread.
>
> Since Python 3.8 we store the ID of the thread where the runtime is
> initialized and use that in the check the "signal" module does.  However,
> the "threading" module still uses the ID of the thread where it is first
> imported.  So your check against "threading.main_thread()" must be in code
> that isn't running in the same thread where you ran Py_Initialize().  It
> probably used to work because you imported "signal" and "threading" for the
> first time in the same thread.
>
> So what next?
>
> First, I've created issue39042 to address the current different meanings
> of "main thread".  That should resolve the discrepancy between the signal
> and threading modules.
>
> Second, what can we do to help embedders make sure they are running their
> code in the main thread (e.g. when setting signals)?  Is there any C-API we
> could add which would have helped you here?
>
> --
> nosy: +eric.snow, vstinner
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters


Tim Peters  added the comment:

Sorry, but I'm not replying here any more:  the issue tracker is not for asking 
questions or brainstorming ideas.  Take this to python-ideas, please.  If a 
concrete proposal that gains traction results, _then_ the issue tracker may be 
an appropriate place (but a new issue - this issue is closed).

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla


Marco Sulla  added the comment:

Excuse me, I had an epiphany.

NaN returns False for every comparison.

So in teory any element of the iterable should result minor that NaN.

So NaN should treated as the highest element, and should be at the end of the 
sorted result!

Indeed this is the behavior in Java. NaNs are in the end of the sorted iterator.

On the contrary, Python sorting does not move the NaN from its position.

Why?

--

___
Python tracker 

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



[issue39058] argparse should preserve argument ordering in Namespace

2019-12-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread Abhilash Raj


Abhilash Raj  added the comment:

Thanks for the pointer, David! I created a PR for the fix, would you be able to 
review it please?

--

___
Python tracker 

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



[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread Abhilash Raj


Change by Abhilash Raj :


--
pull_requests: +17090
pull_request: https://github.com/python/cpython/pull/17620

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters


Tim Peters  added the comment:

Ah, so you're proposing a hack that would catch some, but not all, cases where 
a total ordering doesn't exist.  Why?  The issue tracker isn't a suitable place 
to discuss it regardless, so if you want to pursue it I'd suggest taking it to 
python-ideas.  If you do, some points to think about in advance:

- As above, it only catches some cases.  For example, given list [a, b], where 
a < b and b < a, no total ordering exists but the hack won't detect anything 
amiss.

- As has been said twice already, list.sort() promises to use only "<".  This 
isn't disposable.  User-written classes _rely_ on it, which was the point:  for 
instances to participate in sorting, the class only needs to define __lt__ 
(and, although it's not currently documented, they can also participate in the 
`bisect` and `heapq` module facilities, which also restrict themselves to "<" 
compares).

- Assuming "a < b" is false about half the time, the hack would require sorting 
to do about 50% more comparisons.  That's a huge expense.  All in all, I've 
spent at least a year of my life minimizing the number of compares Python's 
sort needs to do, and that would more than wipe out all the progress I've made 
since 1991 ;-)

--

___
Python tracker 

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



[issue23041] csv needs more quoting rules

2019-12-15 Thread Yoong Hor Meng


Yoong Hor Meng  added the comment:

There is a real requirement for csv to handle an empty field vs a empty string 
.  csv.QUOTE_NOTNULL could be useful.

--
nosy: +yoonghm
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread R. David Murray


R. David Murray  added the comment:

The example you want to look at is get_unstructured.  That shows both lookback 
and modification of the parse tree to handle the whitespace between encoded 
words.

--

___
Python tracker 

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



[issue39033] zipimport raises NameError: name '_boostrap_external' is not defined

2019-12-15 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset 79f02fee1a542c440fd906fd54154c73fc0f8235 by Nick Coghlan (Xtreak) 
in branch 'master':
bpo-39033: Fix NameError in zipimport during hash validation (GH-17588)
https://github.com/python/cpython/commit/79f02fee1a542c440fd906fd54154c73fc0f8235


--
nosy: +ncoghlan

___
Python tracker 

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



[issue39040] Wrong attachement filename when mail mime header was too long

2019-12-15 Thread Abhilash Raj

Abhilash Raj  added the comment:

I tried to take a look at the code to see where the fix needs to be and I 
probably need some help.

I looked at the parse tree for the header and it looks something like this:

ContentDisposition([Token([ValueTerminal('attachment')]), ValueTerminal(';'), 
MimeParameters([Parameter([Attribute([CFWSList([WhiteSpaceTerminal(' ')]), 
ValueTerminal('filename')]), ValueTerminal('='), 
Value([QuotedString([BareQuotedString([EncodedWord([ValueTerminal('Schulbesuchsbestättigung.')]),
 WhiteSpaceTerminal(''), EncodedWord([ValueTerminal('pdf')])])])])])])])


The offending piece of code, which seems to be working as designed is 
get_bare_quoted_string() in email/_header_value_parser.py. 

while value and value[0] != '"':
if value[0] in WSP:
token, value = get_fws(value)
elif value[:2] == '=?':
try:
token, value = get_encoded_word(value)
bare_quoted_string.defects.append(errors.InvalidHeaderDefect(
"encoded word inside quoted string"))
except errors.HeaderParseError:
token, value = get_qcontent(value)
else:
token, value = get_qcontent(value)
bare_quoted_string.append(token)

It just loops and parses the values. We cannot ignore the FWS until we know 
that the atom before and after the FWS are encoded words. I can't seem to find 
a clean way to look-ahead (which can perhaps be used in get_parameters()) or 
look-back (which can be used after parsing the entire bare_quoted_string?) in 
the parse tree to delete the offending whitespace. 

Any example of such kind of parse-tree manipulation in the code base would be 
awesome!

--
versions: +Python 3.9 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2019-12-15 Thread Martin Panter


Martin Panter  added the comment:

Another workaround might be to set the new "block_on_close" flag (Issue 33540) 
to False on the server subclass or instance.

Victor: Replying to  "What do I 
think of also using a weakref?", I assume you mean maintaining "_threads" as a 
WeakSet rather than a list object. That seems a nice way to solve the problem, 
but it seems redundant to me if other code such as Maru's proposal was also 
added to clean up the list.

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla


Marco Sulla  added the comment:

> No idea what "are minor that another object" could possibly mean.

Oh my god... a < b?

> I don't know what purpose would be served by checking ">=" too

Well, it's very simple. Since the sorting algorithm checks if a < b, if this 
check fails, I propose to check also a >= b. If this is false too, the iterable 
contains an unorderable object. From this point, the check will never done 
again, an unorderable object is sufficient to raise the warning.

The check a >= b is *not* for ordering the iterable, is only for checking if 
the elements are orderable or not, and raise the warning.

Furthermore, I suppose that if someone is sure that its iterable is 
unorderable-free and want a fine-grained boost to speed, a flag can added. If 
true, sorting will not use the algorithm with the check, but the old algorithm.

> You haven't addressed any of the points he (Dickinson) raised

Dickinson said you have to check for total preorder. If you have understood my 
idea, this is not needed at all.

--

___
Python tracker 

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



[issue39058] argparse should preserve argument ordering in Namespace

2019-12-15 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Currently, Namespace() objects sort the attributes in the __repr__.  This is 
annoying because argument order matters and because everywhere else in the 
module we preserve order (i.e. users see help in the order that arguments are 
added).

Note, the docs do not promise that Namespace is displayed with a sort.  This is 
likely just an artifact of older dictionaries having arbitrary or randomised 
ordering.


>>> from argparse import ArgumentParser
>>> parser = ArgumentParser()
>>> _ = parser.add_argument('source')
>>> _ = parser.add_argument('destination')

# Order matters to the user inputing the arguments 
# (source must go first and destination must go last
>>> args = parser.parse_args(['input.txt', 'output.txt'])

# Order is preserved internally
>>> vars(args)
{'source': 'input.txt', 'destination': 'output.txt'}

# Despite this, the Namespace() repr alphabetizes the output
>>> args
Namespace(destination='output.txt', source='input.txt')

# Order is preserved in help()
>>> parser.parse_args(['-h'])   
usage: [-h] source destination

positional arguments:
  source
  destination

optional arguments:
  -h, --help   show this help message and exit

--
components: Library (Lib)
messages: 358455
nosy: rhettinger
priority: normal
severity: normal
status: open
title: argparse should preserve argument ordering in Namespace
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



[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-12-15 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset d587272fe3b0fcad2f23a490e76f9f82ca7d64ef by Victor Stinner 
(Batuhan Taşkaya) in branch 'master':
 bpo-38316: Fix co_stacksize documentation (GH-16983)
https://github.com/python/cpython/commit/d587272fe3b0fcad2f23a490e76f9f82ca7d64ef


--
nosy: +vstinner

___
Python tracker 

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



[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-12-15 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset cb8b946ac10386e6cab1376945f64f683b5b16d3 by Victor Stinner 
(Batuhan Taşkaya) in branch 'master':
bpo-38629: implement __floor__ and __ceil__ for float type (GH-16985)
https://github.com/python/cpython/commit/cb8b946ac10386e6cab1376945f64f683b5b16d3


--
nosy: +vstinner

___
Python tracker 

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



[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-12-15 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Batuhan Taşkaya for the implementation, and thanks Ran Benita for the 
feature request :-)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters


Tim Peters  added the comment:

Marco, your

> I suppose the sorting function checks if the objects of
> the iterable are minor that another object

was incoherent to me.  No idea what "are minor that another object" could 
possibly mean.

As Mark explained, the mathematical meaning of "orderable" is more expensive to 
check than it is to do sorting.

Mark also explained that list.sort() guarantees to use only "<" (__lt__) 
comparisons.  Because your message was incoherent to me (see above), I don't 
know what purpose would be served by checking ">=" too, but if there _is_ a 
coherent purpose, list.sort() cannot use ">=" regardless.

Reply to Mark's message instead of this one?  You haven't addressed any of the 
points he raised, and they're all deal-breakers.

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla


Marco Sulla  added the comment:

Anyway, Java by default puts NaNs at the end of the iterable:

https://onlinegdb.com/SJjuiXE0S

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

I probably unintentionally deleted some necessary files here on my machine. I 
closed the issue and marked 'not a bug'.

Thanks

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Change by Rafael Dominiquini :


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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

I reinstall python here from scratch and now is working. But I need to delete 
the remaining files after the uninstall. When I tried to uninstall and 
reinstall holding the existing directories (\Lib\site-packages), the installer 
fail to copy the missing files to the installation directory.

Thanks

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla


Marco Sulla  added the comment:

Excuse me, but have you, Dickinson and Peters, read how I propose to check if 
the object is orderable or not? 

I explained it in a very detailed way, and this does not change the float 
comparison. And does not need to check first if the iterable it totally 
preordered.

Can you please read my post?

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

1) I tried to clear the value of the variable 'PYTHONPATH', and the error keeps 
happening!
2) In my installation directory, I don't have the file 
'C:\Developing\Python\python38.zip', neither the directory 
'C:\Developing\Python\python-3.8.0.amd64\'. I don't know why this message 
appears!
3) I use the installer from python.org 
(https://www.python.org/downloads/release/python-380/), but I got the 64-bit 
installer!

I will try to do a clear install later.

Thanks

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Tim Peters


Tim Peters  added the comment:

Closing as Mark suggested, but as "not a bug" rather than "won't fix".  That 
floats aren't totally ordered is a consequence of IEEE 754 semantics, not 
Python's whim.  As Mark said, if people want a total_ordering function for 
floats, that should be opened as a different issue - we're not going to change 
the default float comparison logic.

--
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7 -Python 3.8

___
Python tracker 

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



[issue39057] Issues with urllib.request.proxy_bypass_environment

2019-12-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39057] Issues with urllib.request.proxy_bypass_environment

2019-12-15 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

There are several issues with urllib.request.proxy_bypass_environment:

1. Leading dots are ignored in the proxy list, but not in the checked hostname. 
So ".localhost" does not matches ".localhost" in the proxy list.

2. A single trailing \n in the checked hostname is ignored, so "localhost\n" 
passes the check if the proxy list contains "localhost". But "localhost\n\n" 
and "localhost " do not pass. This is an artifact of using $ in the regular 
expression.

--
components: Library (Lib)
messages: 358444
nosy: orsenthil, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Issues with urllib.request.proxy_bypass_environment
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



[issue36095] Better NaN sorting.

2019-12-15 Thread Mark Dickinson


Mark Dickinson  added the comment:

Tim, Raymond: I propose that we close this issue as "won't fix". The suggestion 
to add `math.total_ordering` could be broken out into a separate issue.

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Mark Dickinson


Mark Dickinson  added the comment:

> IMHO sorting functions should emit a warning if they contains an unorderable 
> objects

How do you define "unorderable", and how do you propose to detect "unorderable 
objects" efficiently in practice within the sorting algorithm?

What you propose isn't practical in full generality. The case in which `sorted` 
can't give a well-defined result is the case where the collection of elements 
being sorted, under the given ordering, is not a total preorder. Being a total 
preorder is a property of the whole collection being sorted, not of individual 
objects: it's not necessarily true that if the collection is not totally 
preordered then there's any one item you can point to as being "unorderable".

Checking for a total preorder is much more expensive than simply sorting (at 
best it would be a quadratic time post-sort check), so that's not a reasonable 
check to make.

So by checking for unorderable objects, whatever those are, you're only solving 
a small part of the overall problem, at the expense of extra computation. 
You're also likely breaking the existing guarantees (depending on how you do 
this checking) that `sort` and `sorted` only rely on `<` comparisons; that 
would be a backwards compatibility break.

--

___
Python tracker 

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



[issue39056] Issues with handling the -W option

2019-12-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla


Marco Sulla  added the comment:

Excuse me, a little errata:

> After the current object a is checked against the object b, if 
> `all_orderables` is true [...]

must be change to

> After the current object a is checked against the object b, ***if the check 
> returns false and*** if `all_orderables` is true [...]

--

___
Python tracker 

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



[issue36095] Better NaN sorting.

2019-12-15 Thread Marco Sulla


Marco Sulla  added the comment:

I'm in favor of a `math.total_ordering` function, but IMHO sorting functions 
should emit a warning if they contains an unorderable objects.

This can be done easily: I suppose the sorting function checks if the objects 
of the iterable are minor that another object. And soon or later, this check 
will be done for all objects in the iterable.

What I propose is simply to add a flag `all_orderables`, true by default.

After the current object a is checked against the object b, if `all_orderables` 
is true, another check will be performed: `a >= b`?

If this return false, `all_orderables` will be set to false.

At the end of sorting, if `all_orderables` is false, a warning will be emitted.

This way, no old code will break, but developers will be informed of the 
problem. Because "Errors should never pass silently" :)

--
nosy: +Marco Sulla

___
Python tracker 

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



[issue39056] Issues with handling the -W option

2019-12-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

There are some issues with handling the -W option:

1. A traceback is printed for some invalid category names.

$ ./python -Wignore::0
'import warnings' failed; traceback:
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 542, in 
_processoptions(sys.warnoptions)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 208, in _processoptions
_setoption(arg)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 224, in _setoption
category = _getcategory(category)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 271, in _getcategory
if not issubclass(cat, Warning):
TypeError: issubclass() arg 1 must be a class

$ ./python -Wignore::0a 
'import warnings' failed; traceback:
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 542, in 
_processoptions(sys.warnoptions)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 208, in _processoptions
_setoption(arg)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 224, in _setoption
category = _getcategory(category)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 256, in _getcategory
cat = eval(category)
  File "", line 1
0a
 ^
SyntaxError: unexpected EOF while parsing

$ ./python -Wignore::=
'import warnings' failed; traceback:
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 542, in 
_processoptions(sys.warnoptions)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 208, in _processoptions
_setoption(arg)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 224, in _setoption
category = _getcategory(category)
  File "/home/serhiy/py/cpython/Lib/warnings.py", line 264, in _getcategory
m = __import__(module, None, None, [klass])
ValueError: Empty module name

In normal case Python just complains:

$ ./python -Wignore::unknown
Invalid -W option ignored: unknown warning category: 'unknown'

2. For non-ascii warning names Python complains about a module and strips the 
last character:

$ ./python -Wignore::Wärning
Invalid -W option ignored: invalid module name: 'Wärnin'

3. The re module is always imported is the -W option is used, even if this is 
not needed.

--
components: Library (Lib)
messages: 358439
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Issues with handling the -W option
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



[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2019-12-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue39055] base64.b64decode() with validate=True does not raise for a trailing \n

2019-12-15 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

If validate=True is passed to base64.b64decode(), it should raise a 
binascii.Error if the input contains any character not from the acceptable 
alphabet.

But it does not raise if the input ends with a single \n. It raises if the 
input ends with a multiple \n or with any other whitespace character. Only a 
single \n is accepted.

This is an implementation artifact. A regular exception ending with $ is used 
to validate an input. But $ matches not only end of string. It matches also an 
empty string before the trailing \n.

Similar errors are also occurred in other sites. I'll open separate issues for 
different cases.

--
components: Library (Lib)
messages: 358438
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: base64.b64decode() with validate=True does not raise for a trailing \n
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



[issue36595] IDLE: Add search to textview.ViewWindow

2019-12-15 Thread Zackery Spytz


Zackery Spytz  added the comment:

I have created a pull request for this issue.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue36595] IDLE: Add search to textview.ViewWindow

2019-12-15 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +17086
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/17614

___
Python tracker 

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



[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-15 Thread Nick Coghlan


Nick Coghlan  added the comment:

Thanks for your patience Michael!

I made some cosmetic changes to the error handling logic that you may want to 
include in the PyPA patches. (I'd intended to make it so that a malformed build 
date resulted in the "Unknown" "9898" build date being used, rather than 
triggering a ValueError on import of the AIX support module, but my except 
clause was too narrow. A PR to widen it to trap ValueError as well would 
definitely be acceptable).

For detection of tag variants, counting hyphens has the benefit of being able 
to distinguish more variants than just two, but checking the final field would 
indeed work for distinguishing the current two formats.

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



[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-12-15 Thread Nick Coghlan


Nick Coghlan  added the comment:


New changeset 39afa2d3147e4b05a1161cc90dbf09b95072c2bb by Nick Coghlan (Michael 
Felt) in branch 'master':
bpo-38021: Modify AIX platform_tag so it covers PEP 425 needs (GH-17303)
https://github.com/python/cpython/commit/39afa2d3147e4b05a1161cc90dbf09b95072c2bb


--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Paul Moore


Paul Moore  added the comment:

Can you also confirm that the installation of Python was done with the standard 
Python installer from the python.org website, and is not another distribution 
(such as Anaconda)?

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Paul Moore


Paul Moore  added the comment:

> sys.path = [
>'C:\\Developing\\Python\\python38.zip',
>'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\',
>'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\lib-tk',
>'C:\\Developing\\Python\\python-3.8.0.amd64\\DLLs\\',
>'C:\\Developing\\Python',

The subdirectory python-3.8.0.amd64 in the various paths above should not be 
present, and would not be in a normal clean Python installation. It appears 
that somehow your installation has been corrupted.

I would recommend a clean install. if that doesn't work, it's likely that some 
environment variables or registry paths in your system are set incorrectly (or 
at least, in ways the standard installation is not expecting).

--

___
Python tracker 

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



[issue34215] streams.py:IncompleteReadError is message is unclear when expected is None

2019-12-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +asvetlov, yselivanov
stage:  -> patch review
versions: +Python 3.9 -Python 3.5

___
Python tracker 

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



[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Géry

Géry  added the comment:

Thanks @ncoghlan, it perfectly answered my question on Stack Overflow: 
https://stackoverflow.com/questions/59322585/what-is-the-exact-try-statement-equivalent-of-the-with-statement-in-python

--

___
Python tracker 

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



[issue36589] Incorrect error handling in curses.update_lines_cols()

2019-12-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Eryk Sun


Eryk Sun  added the comment:

> * PYTHONPATH = 'C:\Developing\Python;C:\Developing\Python\Scripts;
> C:\Developing\Python\Lib;C:\Developing\Python\Lib\site-packages;
> C:\Developing\Python\DLLs;'

FYI, none of this should set here. For a standard configuration, the 
installation directory should never be in the PYTHONPATH environment variable 
-- including the standard library (Lib & DLLs), site-packages, and Scripts.

> I haven't tried reinstalling again since I didn't want to have to 
> reinstall all packages I currently have installed using 'pip'

The existing site-packages and Scripts directories should remain if you 
reinstall to "C:\Developing\Python". Either way, you don't really have a 
choice. The installation is broken.

--
nosy: +eryksun

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

In this folder ("C: \ Developing \ Python \ Lib") there are only the folders I 
have listed. No other files...

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

I don't tried clean install! I tried to use the option "Repair" from the 
installer.
Later I will try to completely uninstall and install from scratch.

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki


Inada Naoki  added the comment:

Many files and directories in the "C:\Developing\Python\Lib" are disappeared.
I don't know why.  But since you tried clean install, I suppose your antivirus 
killed Python.

--

___
Python tracker 

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



[issue34000] Document when compile returns a code object v. AST

2019-12-15 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thank you for the bug report and thank you @BTaskaya for finding the other 
issue.  I'm closing this as a duplicate of #27119.

--
nosy: +cheryl.sabella
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> `compile` doesn't compile into an AST object as specified

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

There are other Python installations on my computer, embedded in other 
application installations (GIMP, etc ...), and these seem to be working 
normally. But they are all older versions of Python...
I haven't tried reinstalling again since I didn't want to have to reinstall all 
packages I currently have installed using 'pip'

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

"C:\Developing\Python" is where I installed Python, selecting it in the 
installer. This directory is where the binary 'python.exe' is located!
"C:\Developing\Python\Lib" have the folders:

idlelib
site-packages
test
tkinter
turtledemo

When I unset both variables, the same error occurs:

-
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Developing\\Python\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Developing\\Python\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
'C:\\Developing\\Python\\python38.zip',
'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\',
'C:\\Developing\\Python\\python-3.8.0.amd64\\Lib\\lib-tk',
'C:\\Developing\\Python\\python-3.8.0.amd64\\DLLs\\',
'C:\\Developing\\Python',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the 
filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x60e8 (most recent call first):

-

--

___
Python tracker 

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



[issue38720] Logging failure with timestamp messages

2019-12-15 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I'm going to close this pending additional information from the OP.  @xtobes, 
please reopen if you are able to provide a minimally reproducing example.  
Thank you!

--
nosy: +cheryl.sabella
resolution:  -> works for me
stage:  -> test needed
status: open -> closed

___
Python tracker 

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



[issue37292] _xxsubinterpreters: Can't unpickle objects defined in __main__

2019-12-15 Thread Nick Coghlan


Nick Coghlan  added the comment:

There's a reason multiprocessing in spawn mode jumps through the hoops that it 
does: it's the only way to get __main__ pickling to work when you're not 
forking the entire process.

You also don't want to naively re-run __main__ in the subprocess for the same 
reason multiprocessing doesn't: doing so would also re-run the script parts, 
not just the class and function definition parts.

So while I don't think it should be implicit the way it is for multiprocessing 
spawn mode, I do think it would make sense to offer a way to explicitly opt-in 
to re-running __main__ in a child interpreter as "__si_main__", aliasing the 
subinterpreter's __main__ module to that, and also aliasing "__si_main__" to 
"__main__" in the parent interpreter.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue39054] Add an parameter to list.remove()

2019-12-15 Thread SilentGhost


SilentGhost  added the comment:

Again, please start proposal discussion at python-ideas. Also, it is not 
sufficient just to post there, you need to engage with the people asking 
question to justify whatever new feature you're advocating.

--
components: +Interpreter Core
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
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



[issue36375] PEP 499 implementation: "python -m foo" binds the main module as both __main__ and foo in sys.modules

2019-12-15 Thread Nick Coghlan


Nick Coghlan  added the comment:

Leaving the relationship between pickle and __name__ alone wasn't an oversight, 
as folks already rely on that to gracefully transition from single-file modules 
to multi-file packages without breaking pickle compatibility in either 
direction. The trick is to do a "from ._submodule import *" in the package's 
__init__.py (exposing all the names), and then a "__name__ = __package__" in 
the submodule itself.

Thus the second snippet above, as a way to port code that was specifically 
relying on the double import to provide pickle compatibility without risking 
introducing other unintended incompatibility problems.

--

___
Python tracker 

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



[issue39054] Add an parameter to list.remove()

2019-12-15 Thread Lovi


New submission from Lovi <1668151...@qq.com>:

I think the list can add a parameter to remove():

remove(value, appear_time=1, /)

The parameter appear_time indicates the number of times the value appears in 
the list.


I want this effect:

>>> list1 = [1, 2, 3, 2, 1, 2, 1]
>>> list1.remove(2, 2)
>>> list1
[1, 2, 3, 1, 2, 1]
>>> list1.remove(1, 3)
>>> list1
[1, 2, 3, 1, 2]

--
messages: 358420
nosy: lovi
priority: normal
severity: normal
status: open
title: Add an parameter to list.remove()
type: enhancement
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



[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan


Change by Batuhan :


--
pull_requests: +17085
pull_request: https://github.com/python/cpython/pull/17613

___
Python tracker 

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



[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Nick Coghlan


Nick Coghlan  added the comment:

It's a matter of historical timing: PEP 343 was written before 
try/except/finally was allowed, when try/finally and try/except were still 
distinct statements.

However, PEP 341 was *also* accepted and implemented for Python 2.5, allowing 
for the modern try/except/finally form: 
https://docs.python.org/dev/whatsnew/2.5.html#pep-341-unified-try-except-finally

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki


Inada Naoki  added the comment:

Where did you install the portion?

What is in the C:\Developing\Python and C:\Developing\Python\Lib?

What happen when you unset both environment variables?

Do you use any antivirus software?

--

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Rafael Dominiquini


Rafael Dominiquini  added the comment:

* PYTHONHOME = (not set)
* PYTHONPATH = 
'C:\Developing\Python;C:\Developing\Python\Scripts;C:\Developing\Python\Lib;C:\Developing\Python\Lib\site-packages;C:\Developing\Python\DLLs;'

-- I try to set the variable 'PYTHONHOME=C:\Developing\Python', but the same 
error appear!

Thanks

--

___
Python tracker 

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



[issue39037] Fix the trial order of the __exit__ and __enter__ methods in the with statement documentation

2019-12-15 Thread Géry

Géry  added the comment:

@gvanrossum

By the way, is there any particular reason why the ``try`` statement 
implementation equivalent to the ``with`` statement given in PEP 343 puts the 
finally clause in an outer ``try`` statement instead of in the inner ``try`` 
statement? (cf. 
https://www.python.org/dev/peps/pep-0343/#specification-the-with-statement)

In other words, couldn't we simplify this:

```
mgr = (EXPR)
exit = type(mgr).__exit__  # Not calling it yet
value = type(mgr).__enter__(mgr)
exc = True
try:
try:
VAR = value  # Only if "as VAR" is present
BLOCK
except:
# The exceptional case is handled here
exc = False
if not exit(mgr, *sys.exc_info()):
raise
# The exception is swallowed if exit() returns true
finally:
# The normal and non-local-goto cases are handled here
if exc:
exit(mgr, None, None, None)
```

into that?

```
mgr = (EXPR)
exit = type(mgr).__exit__  # Not calling it yet
value = type(mgr).__enter__(mgr)
exc = True
try:
VAR = value  # Only if "as VAR" is present
BLOCK
except:
# The exceptional case is handled here
exc = False
if not exit(mgr, *sys.exc_info()):
raise
# The exception is swallowed if exit() returns true
finally:
# The normal and non-local-goto cases are handled here
if exc:
exit(mgr, None, None, None)
```

--

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2019-12-15 Thread Batuhan


Change by Batuhan :


--
pull_requests: +17084
pull_request: https://github.com/python/cpython/pull/17612

___
Python tracker 

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



[issue39053] Hide manually raised exception formatting

2019-12-15 Thread SilentGhost


SilentGhost  added the comment:

This sounds like it needs at least some discussion on python-ideas. For 
example, just reading your description I can't imagine what is supposed to 
happen when an error occurs when producing argument to the exception.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue39051] Python not working on Windows 10

2019-12-15 Thread Inada Naoki


Inada Naoki  added the comment:

The most common cause of this error is the PYTHONPATH and PYTHONHOME 
environment variables.

You can see what environment variables are set by the "set" command.

--
nosy: +inada.naoki

___
Python tracker 

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



[issue39053] Hide manually raised exception formatting

2019-12-15 Thread YoSTEALTH


New submission from YoSTEALTH :

class Some_Class:

def error(self):
if not getattr(self, 'boo', None):
raise Exception(f'`class {self.__class__.__name__}:` raised some 
error!')


something = Some_Class()
something.error()


# This is how Error looks
# ---
Traceback (most recent call last):
  File "/test.py", line 9, in 
something.error()
  File "/test.py", line 5, in error
raise Exception(f'`class {self.__class__.__name__}:` raised some error!')
Exception: `class Some_Class:` raised some error!


# This is how Error should look
# -
Traceback (most recent call last):
  File "/test.py", line 9, in 
something.error()
  File "/test.py", line 5, in error
raise Exception(...)
Exception: `class Some_Class:` raised some error!


When a developer manually raises an error they want the user/developer 
debugging the error to see the final, nicely formatted error message itself 
"Exception: `class Some_Class:` raised some error!" not the ugly formating of 
the error message itself "raise Exception(f'`class {self.__class__.__name__}:` 
raised some error!')" which can also lead to confusion, thus it should be 
hidden as "raise Exception(...)"

It could also be said that "raise Exception(...)" shouldn't even be shown but 
what raises this error condition "if not getattr(self, 'boo', None):" but this 
seems more work so i am keeping it simple by saying lets just hide the ugly 
formatting part.

--
components: Interpreter Core
messages: 358413
nosy: YoSTEALTH
priority: normal
severity: normal
status: open
title: Hide manually raised exception formatting
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