[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-23 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't think the readability of the examples would be improved by triple 
quotes. In fact, I think it would be reduced.

--
nosy: +eric.smith

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



[issue42449] Adding number to a declared 2 dimension list

2020-11-23 Thread Eric V. Smith


Eric V. Smith  added the comment:

This isn't a bug. All of your nested lists are the same. See for example: 
https://stackoverflow.com/questions/44195396/initializing-an-m-x-n-array-of-0s-in-python

--
components:  -Regular Expressions
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue42436] Google use wrong "hightlight" argument

2020-11-23 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

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



[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-11-23 Thread Eric V. Smith


Eric V. Smith  added the comment:

@BTaskaya: do you think this is too similar to bogus_code_obj.py? That's the 
only crasher I can see it being similar to.

--
versions: +Python 3.10 -Python 3.6, Python 3.7

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



[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the reproducer and the research!

https://tools.ietf.org/html/rfc2616#section-3.1 says the result header is 
"HTTP", and doesn't say anything else is acceptable. I'd be interested in what 
other frameworks (probably in other languages) support. I'll do some research.

--

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



[issue42432] Http client, Bad Status Line triggered for no reason

2020-11-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

requests is a third-party library, and this isn't the right place to report 
issues with it. It looks like the requests issue tracker is at 
https://github.com/psf/requests/issues

If you can duplicate this problem with only using the python standard library, 
then please let us know and we'll take a look. I'd have to do some research 
through the standards to determine if the problem is really with your server, 
though.

--
nosy: +eric.smith

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



[issue42436] Google use wrong "hightlight" argument

2020-11-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

This seems to be a question for Google.

--
nosy: +eric.smith

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



[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2020-11-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

A few things:

- There is no %-formatting for Decimal types. They're being converted to float 
first. That's why it appears that %-formatting with 'g' works the same for 
decimal and float: you're really just calling the float version.

- The difference in 'g' formatting between float and Decimal is a known 
difference. This issue pops up every now and again, but right now I can't find 
where (or if) it's actually documented.

Mark: can you point to it? I don't think 
https://docs.python.org/3/library/string.html#format-specification-mini-language
 mentions it where it talks about Decimals. And I don't see any documentation 
for Decimal.__format__.

--
nosy: +eric.smith, mark.dickinson

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



[issue42422] Py_Decref on value crash the interpreter in Python/ceval.c:1104

2020-11-21 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

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



[issue28002] ast.unparse can't roundtrip some f-strings

2020-11-20 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution: not a bug -> fixed

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



[issue42414] unable to document fields of dataclass

2020-11-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

@property has a place to attach the docstring, dataclasses in general do not. I 
wouldn't want to add a descriptor just to have the ability to add a docstring. 
There are performance issues involved, and I'm sure some corner cases where 
functionality would change.

Maybe if you bring this up on python-ideas you can get some more ideas.

--

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



[issue42414] unable to document fields of dataclass

2020-11-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

How would you expect to extract this docstring?

I'm not sure how this would work in practice, since both of these are errors:

>>> class A:
...def __init__(self):
...self.x = 3
...self.x.__doc__ = 'foo'
...
>>> A()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 4, in __init__
AttributeError: 'int' object attribute '__doc__' is read-only
>>> class B:
...x: int = 0
...x.__doc__ = 'foo'
...
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 3, in B
AttributeError: 'int' object attribute '__doc__' is read-only

It could be stored in the dataclass-specific data attached to a class, but then 
you'd have to use a dataclass-specific function to get access to it. I'm not 
sure that's a great improvement.

I also note that attrs doesn't have this feature, probably for the same reason.

--
type:  -> enhancement
versions: +Python 3.10

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



[issue42414] unable to document fields of dataclass

2020-11-19 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith

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



[issue40998] Compiler warnings in ubsan builds

2020-11-18 Thread Eric V. Smith


Eric V. Smith  added the comment:

Too many Eric S's!

--

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



[issue40998] Compiler warnings in ubsan builds

2020-11-18 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.snow

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



[issue42379] Optional List Args Persist Across Objects

2020-11-16 Thread Eric V. Smith


Eric V. Smith  added the comment:

This is defined behavior in the language, so it's not a bug. The "pythonic" way 
to deal with this is usually:

def funct(self, array = None):
if array is None:
 array = []

--
components: +Interpreter Core -ctypes
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm changing from "crash" to "behavior". We use "crash" for a segfault or 
equivalent. I realize that most people are unlikely to know this, but we 
consider "crash" to be more alarming, so I want to make sure it's correct.

Also: when this happens, is it always for file 127, or does it change on each 
run?

--
nosy: +eric.smith
type: crash -> behavior

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



[issue42356] Dict inline manipulations

2020-11-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think you should bring this up on the python-ideas mailing list if you'd like 
to see it discussed. It will likely also require a PEP, similar to PEP 584.

--
nosy: +eric.smith

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



[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 4defeb007195d2d17ea404b0b6291d1d233010f4 by Miss Islington (bot) 
in branch '3.9':
bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) 
(GH-23270)
https://github.com/python/cpython/commit/4defeb007195d2d17ea404b0b6291d1d233010f4


--

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



[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset cb2b2035ca752529755440990c4073d5164e80df by Miss Islington (bot) 
in branch '3.8':
bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264) 
(GH-23269)
https://github.com/python/cpython/commit/cb2b2035ca752529755440990c4073d5164e80df


--

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



[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset bbeb2d266d6fc1ca9778726d0397d9d6f7a946e3 by Jürgen Gmach in 
branch 'master':
bpo-42344: Improve pseudo implementation for SimpleNamespace (GH-23264)
https://github.com/python/cpython/commit/bbeb2d266d6fc1ca9778726d0397d9d6f7a946e3


--

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



[issue42344] SimpleNamespace: update documentation regarding comparison

2020-11-13 Thread Eric V. Smith


Eric V. Smith  added the comment:

If the implementation compares the classes, then I think the "roughly 
equivalent" version should, too.

--
nosy: +eric.smith

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



[issue42269] Add ability to set __slots__ in dataclasses

2020-11-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

It would figure it out automatically. See 
https://github.com/ericvsmith/dataclasses/blob/master/dataclass_tools.py for a 
decorator that already does this.

I'll have a PR ready soon, I hope.

--

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



[issue42302] [Turtle] Add clockwise and anticlockwise method as alias to right and left

2020-11-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think having two ways to do the same thing in a module targeted toward 
beginners would be too confusing.

--
nosy: +eric.smith

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



[issue42278] Remove usage of tempfile.mktemp in stdlib

2020-11-06 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

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



[issue42274] Imaplib hangs up infinitely when performing append operation

2020-11-06 Thread Eric V. Smith


Eric V. Smith  added the comment:

The bug tracker isn't the appropriate place to ask for help. 

Your problem is most likely with your code, or possibly with the server you're 
talking to. But you haven't provided us any way of knowing which.

I suggest you ask for help on the python-list mailing list, or maybe on Stack 
Overflow. But no matter where you ask for help, you'll need to show the code 
that is causing your problem. You'll want to reproduce the problem with a small 
example. You should remove any code that doesn't relate to reproducing the 
problem, and preferably without using any third party libraries.

If you can show that this is a bug in Python, then you can re-open this issue.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue42269] Add ability to set __slots__ in dataclasses

2020-11-05 Thread Eric V. Smith


New submission from Eric V. Smith :

I resisted adding the ability to set __slots__ in the first version of 
dataclasses, since it requires that instead of modifying an existing class, an 
entirely new class is returned.

But I think this feature would be useful enough that I'm now willing to add it. 
I have the code ready, I just need to work on tests and documentation.

--
assignee: eric.smith
components: Library (Lib)
messages: 380416
nosy: eric.smith
priority: normal
severity: normal
status: open
title: Add ability to set __slots__ in dataclasses
type: behavior
versions: Python 3.10

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



[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-11-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

I don't think we should backport them. It's definitely a new feature, and our 
policy is no new features in micro versions.

--

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



[issue42265] Remove binhex module following PEP-594

2020-11-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

PEP 594 hasn't been accepted yet.

--
nosy: +eric.smith

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



[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

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



[issue42209] Incorrect line reported in syntax error

2020-10-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

The line number has been fixed in python 3.9:

  File "...\foo.py", line 5
(**kwargs)
 ^
SyntaxError: f-string: invalid syntax

The error message should improve when we move parsing of f-strings into the 
parser. I doubt we'd put in the effort to do anything before then.

--
nosy: +eric.smith

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



[issue42061] Document __format__ method for IPv[46]Address

2020-10-29 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the contribution, @John-Ted!

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

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



[issue42156] Currency not correct for all locales

2020-10-29 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue42168] Question about deserializing some numbers (bug??)

2020-10-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

Or stated differently: if you pass random byte strings to pickle.loads(), 
sometimes it might succeed and produce a random object because you've managed 
to create a valid pickle. But most often it will fail.

--

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



[issue42168] Question about deserializing some numbers (bug??)

2020-10-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

I explained this in https://bugs.python.org/issue42165#msg379755

This is not a bug in python, it's a bug in your code. You should not expect to 
unpickle something that wasn't created by pickling it.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

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



[issue42165] closed (reopen with other issue)

2020-10-27 Thread Eric V. Smith


Eric V. Smith  added the comment:

To answer the question:

> "can anyone explain why "pickle.loads(np.float64(0.34104))" prints "True"

You can use pickletools.dis:

>>> bytes(np.float64(0.34104))
b'\x88.\xa8o\x99\xd3\xd5?'

>>> pickletools.dis(bytes(np.float64(0.34104)))
0: \x88 NEWTRUE
1: .STOP

Note that pickle ignores anything after the end of the pickle (the STOP 
opcode), so only the first 2 bytes are being used.

As Serhiy said, it's just chance that the bytes returned by numpy happen to be 
a valid pickle for some values. You should not be trying to .loads() something 
that isn't a valid pickle stream. It's not clear why you think a byte string 
returned by np.float64 would be a valid pickle.

--
nosy: +eric.smith
stage: resolved -> 
status: closed -> open

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



[issue42156] Currency not correct for all locales

2020-10-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

And just to show that python is doing the right thing, if the locale is set up 
correctly, I'll show the following hack:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'en_US')
'en_US'
>>> locale.currency(24.99)
'$24.99'
>>> locale._override_localeconv["p_cs_precedes"] = 0
>>> locale.currency(24.99)
'24.99$'

Notice the change from '$24.99' to '24.99$' when I change p_cs_precedes to 0.

WARNING: you really, really shouldn't use _override_localeconv. It looks like 
it exists just for testing, but I'm using it here to show that currency 
formatting does respect p_cs_precedes.

On the other hand, I've often wanted to build up a locale programmatically and 
then use it, so maybe we should support that use case.

--

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



[issue42156] Currency not correct for all locales

2020-10-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

p_cs_precedes == 1 means "the currency_symbol or int_curr_symbol strings should 
precede the value of a monetary amount", per 
https://www.gnu.org/software/libc/manual/html_node/Currency-Symbol.html (I 
couldn't find a more authoritative source, but I think this is okay).

So it looks like Python is following the rules correctly. I don't know how 
you'd adjust the locale values.

--

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



[issue42156] Currency not correct for all locales

2020-10-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

What does locale.localeconv() return?

>>> locale.localeconv()
{'int_curr_symbol': '', 'currency_symbol': '', 'mon_decimal_point': '', 
'mon_thousands_sep': '', 'mon_grouping': [], 'positive_sign': '', 
'negative_sign': '', 'int_frac_digits': 127, 'frac_digits': 127, 
'p_cs_precedes': 127, 'p_sep_by_space': 127, 'n_cs_precedes': 127, 
'n_sep_by_space': 127, 'p_sign_posn': 127, 'n_sign_posn': 127, 'decimal_point': 
'.', 'thousands_sep': '', 'grouping': []}
>>>

In particular, the values of p_cs_precedes and n_cs_precedes.

--
nosy: +eric.smith

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



[issue42148] floating point representation issues

2020-10-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for double-checking the other languages, Steven.

--

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



[issue42148] floating point representation issues

2020-10-25 Thread Eric V. Smith


Eric V. Smith  added the comment:

This isn't a bug. It's due to the base 2 representation of floating point 
numbers. See for example: See 
https://docs.python.org/3/tutorial/floatingpoint.html

It's possible, depending on your use case, you might want to use the decimal 
module. But that has it's own issues that you should be aware of. For example, 
1/7 is not exactly representable in either floats or Decimals.

--
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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



[issue42118] TypeError gives wrong reserved name

2020-10-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

Unfortunately there's not much that can be done about this. The code that 
writes that error message only knows about objects, which don't have names, 
only types and values.

--

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



[issue42118] TypeError gives wrong reserved name

2020-10-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

I should point out that this is the same as doing:

>>> ''()
:1: SyntaxWarning: 'str' object is not callable; perhaps you missed a 
comma?
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'str' object is not callable

Except for the SyntaxWarning part, where the compiler is trying to be helpful.

--

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



[issue42118] TypeError gives wrong reserved name

2020-10-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

You've rebound "int" to a string. I think the error message is correct.

Here's a simpler case:

>>> int = ''
>>> int
''
>>> int()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'str' object is not callable

What do you expect to gain with the "int = ''" statement?

--
nosy: +eric.smith

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



[issue33754] f-strings should be part of the Grammar

2020-10-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Just some notes to consider before work starts on this in earnest:

We need to decide what sort of changes we'll accept, if any. For at least the 
first round of this, I'm okay with "absolutely no change will be acceptable".

For example, here's a good change (IMO): allowing f'{"\n" if cond else ""}'. 
I'd like to be able to use backslashes inside strings that are in an expression.

A questionable change: f'{'foo'}'. Nesting the same type of quotes.

I think we should be explicit about what we will accept, because editors, etc. 
will need to adapt. In msg318550 I mention that some external tools use the 
same lexer they use for strings to lex f-strings. Are we okay with break that?

And the f-string '=' feature maybe be hard to support. Although if we are able 
to support it, then I think the same solution will be applicable to string 
annotations without unparsing them.

--
nosy: +emilyemorehouse, pablogsal

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



[issue41747] dataclasses: generated method's using the wrong qualname

2020-10-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the PR!

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

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



[issue41747] dataclasses: generated method's using the wrong qualname

2020-10-21 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset c7437e2c0216e05fbf17bf96294cb20954e36e48 by Batuhan Taskaya in 
branch 'master':
bpo-41747: Ensure all dataclass methods uses their parents' qualname (GH-22155)
https://github.com/python/cpython/commit/c7437e2c0216e05fbf17bf96294cb20954e36e48


--

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



[issue42091] strftime returns empty string for -d, -I 3.8.3

2020-10-19 Thread Eric V. Smith

Eric V. Smith  added the comment:

Can you tell us what the expected behavior is?

>From the strftime docs: "The full set of format codes supported varies across 
>platforms, because Python calls the platform C library’s strftime() function, 
>and platform variations are common. To see the full set of format codes 
>supported on your platform, consult the strftime(3) documentation."

You're probably just seeing platform-specific behavior.

On cygwin, I get an empty string.

--
nosy: +eric.smith

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



[issue42081] Consider fast_double_parser for faster str->double

2020-10-19 Thread Eric V. Smith


Eric V. Smith  added the comment:

This was proposed in issue 41310.

--
nosy: +eric.smith

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



[issue42068] For macOS, package the included Tcl and Tk frameworks in a rational way.

2020-10-18 Thread Eric V. Smith


Eric V. Smith  added the comment:

It sounds like your solution is macOS only, where as Python needs to be cross 
platform.

Further, I assume there are good reasons that it's implemented the way it is. 
Perhaps there was no alternative when it was initially developed? And we're 
constrained by backward compatibility to at least some extent.

I'm sure that we'd accept contributions that used a more modern approach, if 
they were cross platform and didn't break anything.

By the way, getting volunteers to pay attention to your issue isn't helped by 
using words like "pretty crazy" and "random noise".

--
nosy: +eric.smith

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



[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

I've created issue 42061 for the documentation. Hopefully marking that issue as 
easy and newcomer friendly will attract some attention.

Thanks ewosborne and Serhiy for adding this feature, and everyone for their 
input.

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

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



[issue42061] Document __format__ method for IPv[46]Address

2020-10-17 Thread Eric V. Smith


New submission from Eric V. Smith :

This feature was added in issue 32820, but was never documented.

--
assignee: docs@python
components: Documentation
keywords: easy, newcomer friendly
messages: 378812
nosy: docs@python, eric.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: Document __format__ method for IPv[46]Address
type: enhancement
versions: Python 3.10, Python 3.9

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



[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

At this point, it's a documentation-only issue. This new feature isn't 
documented.

It might be less confusing to close this issue and open a new one. I'll do that 
shortly.

--
versions: +Python 3.10

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



[issue32820] Add and document __format__ method for IPv[46]Address

2020-10-16 Thread Eric V. Smith


Eric V. Smith  added the comment:

Re: backporting

A quick test shows this feature is not in 3.8. We can't add new features to 
3.8, so I'd say "no, it doesn't need to be backported".

--

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



[issue42007] Line continuation after Boolean operation

2020-10-12 Thread Eric V. Smith


Eric V. Smith  added the comment:

Agreed that this isn't likely to change.

If you have a concrete proposal for how the language parsing rules would change 
in order to support this, you should post it to the python-ideas mailing list.

If that discussion results in a consensus, then we can re-open this issue. But 
unless you have a very compelling rationale, I don't expect any language 
changes here.

--
nosy: +eric.smith
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

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



[issue41996] Should `make install` still install to /usr/bin/python3?

2020-10-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

There's a PEP for this: PEP 394. If you want to change this, I suggest 
discussing it on the python-dev mailing list. If that leads to changes in the 
PEP, this issue can be re-opened.

Personally I don't see this change happening until there are no systems left 
that install python2 as /usr/bin/python. Which is unfortunate, but such is 
life. Myself, I have a shell alias for python that points to python3. That 
solves 95% of my problems.

--
nosy: +eric.smith
resolution:  -> postponed
stage:  -> resolved
status: open -> closed

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



[issue41992] Unable to install lxml using pip in Python 3.9

2020-10-10 Thread Eric V. Smith


Eric V. Smith  added the comment:

Closing as third party.

--
nosy: +eric.smith
resolution:  -> third party
stage:  -> resolved
status: open -> closed

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



[issue33894] tempfile.tempdir cannot be unset

2020-10-08 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue41967] Handle annotations in the parser to avoid the need for roundtrip

2020-10-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

It's true that f-string expressions can't contain newlines.

f-strings are definitely easier, because the tokenizer has already tokenized 
the string from the input, so I'm just remembering pointers inside the 
tokenized string.

I was thinking that maybe you could get access to the buffer that the tokenizer 
is using. I'd have to check to see if it's guaranteed to all be in one 
contiguous buffer or not.

Anyway, since the problem is at least superficially similar (at least to me!), 
I thought I'd mention how f-strings handle it. There might not be anything of 
value here to take away.

--

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



[issue41967] Handle annotations in the parser to avoid the need for roundtrip

2020-10-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

For what it's worth, here's how f-strings with the "=" feature work:

I remember the char* pointer where the expression starts, then I parse the 
expression into an AST, then I note the char* pointer where the expression 
ended. The text between those is what's output before the equal sign []. This 
is how I preserve all of the whitespace inside the expression.

In my case I keep the AST to use when the expression gets evaluated, but in the 
string annotation case you'd throw it away. I don't think it would be very 
complicated to make this approach work across newlines.

[] Actually, I keep the equal sign itself and whitespace to the right of it, 
which is how f'{ x = }' produces " x = 42", instead of "x=42".

--
nosy: +eric.smith
resolution: rejected -> 
stage: resolved -> 
status: closed -> open

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



[issue41947] Tests When Building Python

2020-10-05 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-05 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> rejected

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



[issue41947] Tests When Building Python

2020-10-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

You could try setting EXTRATESTOPTS, although I haven't tried it.

This question is probably better asked on python-list or StackOverflow.

--

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



[issue41947] Tests When Building Python

2020-10-05 Thread Eric V. Smith


Eric V. Smith  added the comment:

>From the test.regrtest help:

  -j PROCESSES, --multiprocess PROCESSES
run PROCESSES processes at once

So, if you want to run 4 processes in parallel:
./python -m test.regrtest -j4

--
nosy: +eric.smith

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



[issue41934] Add `has` method to `pathlib.Path` class.

2020-10-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

Isn't this just:
(project_path / "main.py").exists()
?

I don't think .has would be any more efficient.

--
nosy: +eric.smith

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



[issue41907] Regression in IntFlag behaviour in f-string

2020-10-02 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

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



[issue41905] add update_abstractmethods function to update an ABC's abstract methods

2020-10-01 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

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



[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-10-01 Thread Eric V. Smith


Eric V. Smith  added the comment:

I can't say how ElementTree works without more checking, but this solution 
cannot work in general. Given a pointer to an object that's in a list, how 
would you get to the next item? Say the parent list-like object has a C array 
of pointers to the objects it contains, and removing one of the objects 
re-shuffles that list. How would keeping a pointer to the current object help 
you?

In any event, I don't think this behavior is going to change.

--

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



[issue41899] Poor example for Element.remove()

2020-09-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

As you've seen, the example is correct. I made the same mistake earlier today.

For others: see also #41891 for a suggestion to improve the documentation.

As was pointed out in that issue, it's generally true in Python that you should 
not mutate a sequence while iterating over it.

--
nosy: +eric.smith

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



[issue41893] remove() method is not working as expected(Hard to explain)

2020-09-30 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

The example is iterating over the list returned by root.findall(), but removing 
from a different data structure in root, so it won't have a problem.

--

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



[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

Ah, good point. I agree the example should make that clear. And I think a note 
in .remove() about using it while iterating would be a good idea, too.

--

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



[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think the only action here is to improve the documentation. That example is 
especially problematic.

--

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



[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Eric V. Smith


Eric V. Smith  added the comment:

I assume that ElementTree doesn't support mutation while iterating.

However, the docs at 
https://docs.python.org/3/library/xml.etree.elementtree.html#modifying-an-xml-file
 show removing an item while iterating. It probably only works because the 
child being removed is the last one.

--
nosy: +eric.smith

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



[issue41885] Unexpected behavior re.sub() with raw f-strings

2020-09-29 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue41885] Unexpected behavior re.sub() with raw f-strings

2020-09-29 Thread Eric V. Smith


Eric V. Smith  added the comment:

f-strings are indeed evaluated when the value of the string is needed. Your 
example is equivalent to:

>>> re.sub(r'([a-z]+)', fr"\112345", 'something')
'J345'

As always with regexes, you need to be careful when dynamically composing them.

--
nosy: +eric.smith

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



[issue41838] Value error is showing in docset python (class)

2020-09-28 Thread Eric V. Smith

Eric V. Smith  added the comment:

If you can provide the information requested, please reopen this issue. In the 
meantime, I’m closing it.

--
resolution:  -> rejected
stage:  -> resolved
status: pending -> closed

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-09-27 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue41799] splunklib.client does not handle Unicode characters

2020-09-26 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> third party
stage:  -> resolved
status: pending -> closed

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



[issue41838] Value error is showing in docset python (class)

2020-09-24 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

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



[issue41838] Value error is showing in docset python (class)

2020-09-23 Thread Eric V. Smith


Eric V. Smith  added the comment:

It would be helpful if you can:
- simplify the example
- attach the simplified code to this issue
- show how the code runs with no errors, and how you invoke it
- show how you invoke the code when it does have errors

Please do no attach images: they are not friendly to users using accessibility 
software, and they're impossible to copy/paste/search.

--
nosy: +eric.smith

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



[issue41827] 2D array issue

2020-09-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks, Serhiy. That's a better section than I found.

I'm going to close this. @jeetshahj12375: If you can show that this is a bug in 
python, please re-open this issue.

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

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



[issue41827] 2D array issue

2020-09-22 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

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



[issue41828] No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py

2020-09-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

No problem. Good luck!

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

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



[issue41836] Improve ctypes error reporting with missing DLL path

2020-09-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

My understanding is that Windows doesn't tell you which DLL is missing. I think 
the best we could do is append something to the error message saying "or one 
its dependencies".

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

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



[issue41828] No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py

2020-09-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

This seems like a Django specific error, in which case this isn't the correct 
bug tracker to report the problem.

Can you reproduce a problem with just straight Python, without using Django?

--
nosy: +eric.smith

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



[issue41827] 2D array issue

2020-09-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Your example is too complex to work through in my head, but I suspect this is 
the issue you're seeing: 
https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x

In any event, this is almost certainly not a bug in Python, but rather in your 
code. You might want to ask this question on the python-list mailing list 
https://mail.python.org/mailman/listinfo/python-list or on Stack Overflow, 
which are more appropriate venues than the bug tracker.

--

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



[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-09-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for doing the research, Bas! It sounds like adding back in NoneType, 
NotImplementedType, and EllipsisType is appropriate, then.

+1

The commit should have a comment about the reason: for type checkers which 
can't use type(Ellipsis), etc. I'll add a comment on the PR about adding a 
similar note to the blurb.

--

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



[issue41820] ipaddress allows "00" in ipv4 address octets

2020-09-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

The first point should have been "RFC 790 uses 000 in examples, so I think 
ipaddress is doing the correct thing already."

--

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



[issue41820] ipaddress allows "00" in ipv4 address octets

2020-09-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm going to close this, for two reasons:
- RFC 790 uses 000 in examples, do I think ipaddress is doing the correct thing 
already.
- We'd be unlikely to change this in any event, for fear of breaking existing, 
working code.

@anudeepballa07: if you find an RFC or other authoritative source that says 00 
or 000 are not to be used, feel free to reopen this issue and we can discuss 
next steps.

I'm also changing the title to make it easier to search for this issue in the 
future.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: ipaddress Library gives me incorrect results -> ipaddress allows "00" in 
ipv4 address octets

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



[issue41827] 2D array issue

2020-09-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Please provide the output you see and the output you expect.

And it would be better if you could just post the code into the comment window. 
I, for one, cannot run your .ipynb file.

--
nosy: +eric.smith

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



[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-09-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Does anyone know why types.EllipsisType was removed to begin with? I just want 
to make sure we're not repeating some mistake of the past.

--
nosy: +eric.smith

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



[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

Given that RFC 790 uses 000 as an octet (thanks Serhiy), I think the bug here, 
if there is one, is in the other validator that you're using. Without a 
standard saying not to accept 00 or 000, I think we won't make any change here.

--

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



[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

Please do not include screen shots in bug reports. They've unfriendly to people 
who use screen readers or other accessibility software. Instead, please copy 
and paste (or retype, if needed) the text into the comment section.

> '172.16.254.00' *is not* equivalent to '172.16.254.0'

Do you have an RFC or other document that makes that clear? I've never seen an 
IP address library that makes a distinction between '00' and '0'. But I'm happy 
to learn something new, if you can point to a standard.

If this were going to be an error, it would be in the call to 
ipaddress.ip_address() or its equivalent. It would raise ValueError, like it 
does for other strings that don't represent valid addresses. But for backward 
compatibility reasons, unless there's a standard that explicitly disallows .00, 
I doubt we'd change the code to raise an exception. And even if there were a 
standard that says .00 is not a valid address, I'd be reluctant to make a 
change here. We could potentially break people's code, and we'd need a very 
good reason to do that.

Also, is this causing you a practical problem? Is there somewhere you're 
getting a .00 address and you'd like to treat it as being invalid?

--

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



[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Eric V. Smith


Eric V. Smith  added the comment:

Simplified:
>>> import ipaddress
>>> print(ipaddress.ip_address('172.16.254.00').version)
4

So your concern is that you think '172.16.254.00' (or equivalently, 
'172.16.254.0') shouldn't be treated as a valid IPv4 address. Is that correct?

Can you tell us why you think it's not a valid IPv4 address? I think everything 
is working correctly here.

--
nosy: +eric.smith

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



[issue29526] Documenting format() function

2020-09-20 Thread Eric V. Smith


Change by Eric V. Smith :


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

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



[issue41803] Robots.txt

2020-09-17 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

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



[issue41803] Robots.txt

2020-09-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

It's not clear what bug you're describing, or how it relates to Python. Can you 
provide more information, and show what behavior your seeing, and what behavior 
you're expecting?

--
nosy: +eric.smith

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



[issue41799] splunklib.client does not handle Unicode characters

2020-09-16 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

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



  1   2   3   4   5   6   7   8   9   10   >