Eric V. Smith added the comment:
I'm not suggesting they use cygwin. I'm saying that if they do use cygwin that
something they currently do would stop working. There would be no way to pass a
command line parameter of "*" to python, at least without adding more es
Eric V. Smith added the comment:
> I dont't know. But what difference does it make, after all?
I just want to make sure it's something that happens automatically and wouldn't
require a change to python's C code.
To the other point, someone who currently uses:
python &
Eric V. Smith added the comment:
Don't call both start() and run(). From the documentation, start() arranges for
run() to be called. After the call to start(), 'abc' is printed.
--
components: +Extension Modules -Build
nosy: +eric.smith
resolution: -> invalid
statu
Eric V. Smith added the comment:
\x00 is used as a flag internally meaning "use the default fill character".
That's clearly a bug. I'll look at fixing it.
I think there are other places in the built in __format__ functions where
special values are used instead of flags.
Eric V. Smith added the comment:
Patch looks good at first glance. I'll review it some more today and commit it.
Thanks!
--
stage: needs patch -> commit review
___
Python tracker
<http://bugs.python.org
Changes by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<http://bugs.python.org/issue12579>
___
___
Python-bugs-list mailing list
Unsubscri
Eric V. Smith added the comment:
If you want to look at this, I think there's a missing check for args being
non-null in string_format.h, line 515.
I'd have to think to see if there are other possible failure scenarios.
Thanks for
Eric V. Smith added the comment:
Actually that's probably not the place to catch it. Let me look at it closer.
Of course, patches welcome!
--
___
Python tracker
<http://bugs.python.org/is
Eric V. Smith added the comment:
I think KeyError for "{foo}".format(12) is correct. It's looking up "foo" in
the empty dict of **kwargs.
--
___
Python tracker
<http:
Eric V. Smith added the comment:
I think the issue is that it should be an error in any string used for
format_map() to have a positional argument. So the right thing to do is detect
this case in get_field_object (index != -1 and args is NULL). So I think a new
test near line 515 really is
Eric V. Smith added the comment:
Changing the title to reflect the real problem.
You get a SystemError even when using a mapping, if you have a format string
with positional arguments:
>>> '{}'.format_map({'a':0})
Traceback (most recent call last):
File &quo
Eric V. Smith added the comment:
I definitely agree it should be a ValueError.
How about including in your patch adding your name to Misc/ACKS, if it isn't
already there? I don't have your full name.
I might play with the exception wording and add a few more comments. Thanks for
Eric V. Smith added the comment:
I finally got around to reviewing the patch. A couple of comments:
1. There should be some tests for str.__format__, not just str.format. This is
really a bug with str.__format__, after all. I can add those.
2. The bigger issue is that the other built in
Eric V. Smith added the comment:
On 8/17/2011 6:30 AM, Ezio Melotti wrote:
> OK, so in 2.7/3.2 I'll put them in unicodeobject.c, and in 3.3 I'll move them
> in unicodeobject.c.
I believe the second file should be unicodeo
Eric V. Smith added the comment:
The 4th parameter to re.sub() is a count, not flags.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue11
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue11967>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
This patch seems okay to me, as far as it goes. I'd like to hear Martin's
feedback, but I think it should be committed.
And I realize the rest of this message doesn't apply to the patch, but it does
address other problems in summary_getprope
Eric V. Smith added the comment:
Could you incorporate the test into Lib/test/test_zipfile?
Thanks!
--
components: +Library (Lib)
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue12
Eric V. Smith added the comment:
I haven't had time to completely review this, I will do so later today.
But let me just say that the string is first parsed for replacement strings
inside curly braces. There's no issue with that, here.
Next, the string is parsed for conv
Eric V. Smith added the comment:
> but makes me think that treating "!" and ":" in the index field separately is
> definitely wrong.
But it doesn't know they're in an index field when it's doing the parsing for
':' or '!'.
It mig
Eric V. Smith added the comment:
Note also that the nested expansion is only allowed in the format_spec part,
per the documentation. Your last examples are attempting to do it in the
field_name, which leads to the errors you see. Your very last example doesn't
look right to me. I'
Eric V. Smith added the comment:
Yes, I think this should be committed. I think the API is reasonable, which is
the primary concern. If there are implementation bugs, they can be addressed as
they're found.
--
___
Python tracker
Changes by Eric V. Smith :
--
nosy: +eric.smith, jaraco
___
Python tracker
<http://bugs.python.org/issue12084>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue12127>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I don't buy the "confusion with other languages" argument. It's a different
language. People know that.
I'd like to see leading zeros allowed for integer literals, but I don't feel
strongly about it, so +0. I'd mainly use
Eric V. Smith added the comment:
The PEP 3101 float formatting code (in Objects/stringlib/formatter.h)
uses PyOS_ascii_formatd for all specifier codes except 'n'. So applying
the patch would fix the issue that was originally brought up in msg58485.
I think the approach of the patch (
Eric V. Smith added the comment:
In what way does it break? You haven't shown an error.
Why are you deepcopying the logger?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
This appears to be due to dataclasses needing to create a new class in order to
set __slots__. I'll look at it, but I doubt there's anything that can be done.
attrs has the same issue:
File "x/.local/lib/python3.8/site-packages/attr/_mak
Eric V. Smith added the comment:
The documentation doesn't say that assert statements are the only place
AssertionError is raised, so I don't think it's incorrect.
> From this, one can infer the guarantee "the -O flag will suppress
> AssertionError exceptions fr
Eric V. Smith added the comment:
> I would argue that "The reference documentation for X states that it gets
> raised under condition Y" generally should be understood as "this is a
> guarantee that also includes the guarantee that it is not raised under other
&
Eric V. Smith added the comment:
This is expected behavior. A set has no defined order. If you convert a set to
a list, and you want some specific order, you'll need to sort it yourself.
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: ope
Eric V. Smith added the comment:
I agree it's not worth fixing in 3.9 and 3.10.
--
___
Python tracker
<https://bugs.python.org/issue44799>
___
___
Pytho
Eric V. Smith added the comment:
What is the flag you mention? What would it do?
This sounds like a new feature, which can only go in to 3.11.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue46
Eric V. Smith added the comment:
What would the presence of "<<" do? You haven't described your proposal.
--
___
Python tracker
<https://bu
Eric V. Smith added the comment:
What would x be equal to here:
def get_something_string():
return textwrap.dedent("""\
test text2
test text3
test text4""")
x = f"""\
test text1
{get_something_string()
Eric V. Smith added the comment:
I’m sorry, I don’t understand your proposal. Please answer my question about
what “x” would be equal to under your proposed change.
--
___
Python tracker
<https://bugs.python.org/issue46
Eric V. Smith added the comment:
Here's a simplified reproducer:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--utc", choices=["-1:00"])
args = parser.parse_args()
I assume this is related to argparse guessing if an argumen
Eric V. Smith added the comment:
Jelle gives the correct reason for what you're seeing.
Also note:
>>> math.nan == math.nan
False
>>> float('nan') == float('nan')
False
If there's some specific part of the documentation that you think is
mi
Eric V. Smith added the comment:
In case it helps anyone:
On Windows 3.11.0a5+ the full traceback is:
$ ./python.bat demo.py
Running Debug|x64 interpreter...
Traceback (most recent call last):
File "...\demo.py", line 23, in
sys.exit(main())
^^
Fil
Eric V. Smith added the comment:
Isn't '\s' covered by: " Unknown escapes of ASCII letters are reserved for
future use and treated as errors"
(https://docs.python.org/3/library/re.html#re.sub)?
--
nosy: +eric.smith
_
Eric V. Smith added the comment:
@frenzy: I'm not sure what your fix would do. You could either describe it in
rough terms (if you'd like a pre-PR opinion on the approach), or I'm happy to
wait to see your PR.
--
___
Python
Change by Eric V. Smith :
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> Incorrect exception highlighting for fstring format
___
Python tracker
<https://bugs.python
Eric V. Smith added the comment:
child is not an attribute of a Parent instance, but rather of the Parent class.
So it's not going to be saved when you dump "parent", which is an instance of
Parent.
I'm not sure what you're doing when you create a Parent.__init_
Eric V. Smith added the comment:
You're probably doing something like:
parent.i = 3
instead of:
parent.child.field = 0.6
In the first one, you're setting an instance attribute on parent, on the
second, you're modifying an attribute of the class attribute.
In any event,
Eric V. Smith added the comment:
Serhiy: Could you point to some documentation on __slotnames__? I see a few
references in the code to it, but it's not set on simple test class.
>>> class A:
... __slots__=('a',)
...
>>> A.__slotnames__
Traceback (most rec
Change by Eric V. Smith :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue47023>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
Is there any reason to keep this issue open? The PR was merged.
--
___
Python tracker
<https://bugs.python.org/issue46
Eric V. Smith added the comment:
Yes, I assume that's what the OP intended, but then stumbled across the error
with '\s'.
In any event, I don't think there's a bug here so I'm going to close this.
@siddheshsathe: if you disagree, please respond here.
--
Eric V. Smith added the comment:
I don't have a problem saying that for a class to be used as a base class for a
dataclass, its __slots__ must not be an iterator that's been exhausted. That
doesn't seem like a very onerous requirement.
I'm also not concerned about peopl
Eric V. Smith added the comment:
I agree the error message could be better. Also, "s.error('bad escape %s' %
this, len(this))" should probably be "from None", since as @mrabarnett notes
the KeyError is an implementation detail.
--
Eric V. Smith added the comment:
I thought there was an existing issue that covered this, but now I can't find
it.
I'd prefer #2, create a separate issue.
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
Since those releases are no longer supported, I don't think there's any place
you could put this that would be seen. And we wouldn't want to put a note in a
current release about a bug in a non-supported version that was fixed in
anothe
Eric V. Smith added the comment:
New changeset 82e9b0bb0ac44d4942b9e01b2cdd2ca85c17e563 by Arie Bovenberg in
branch 'main':
bpo-46382 dataclass(slots=True) now takes inherited slots into account
(GH-31980)
https://github.com/python/cpython/commit/82e9b0bb0ac44d4942b9e01b2cdd2c
Eric V. Smith added the comment:
Thanks for all of your work, @ariebovenberg!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue47073>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I'm not convinced this is an improvement. I don't think someone trying '!' in
an f-string expression happens often enough to worry about that specific error
message.
And a generic "optional specifier" isn't great. If
Eric V. Smith added the comment:
>From a suggestion by @Jelle on the python discord server: how about just
>"f-string: expression required before '!'"?
--
___
Python tracker
<https
Change by Eric V. Smith :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue46992>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I agree with Jelle here: dataclasses shouldn't be calling get_type_hints().
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Eric V. Smith added the comment:
A simpler reproducer is:
codeop.compile_command('[' * 100)
Verified I get MemoryError on cygwin PYthon 3.8.12. A length of 99 does not
show a problem.
On Windows 3.11.0a5+, I get:
>>> codeop.compile_command('[' * 201)
Tra
Change by Eric V. Smith :
--
nosy: +pablogsal
title: MemoryError -> MemoryError in codeop.compile_command
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
New changeset 7b44ade018cfe6f54002a3cee43e8aa415d4d635 by Maciej Górski in
branch 'main':
bpo-47129: Add more informative messages to f-string syntax errors (32127)
https://github.com/python/cpython/commit/7b44ade018cfe6f54002a3cee43e8a
Eric V. Smith added the comment:
Thanks, @macgors!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> behavior
___
Python tracker
<https://bugs.python
Change by Eric V. Smith :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue47137>
___
___
Eric V. Smith added the comment:
Yes, they should update Python. A lot of work went in to fixing these issues,
and won't be backported.
--
resolution: -> out of date
stage: needs patch -> resolved
status: open -> closed
___
Python t
Change by Eric V. Smith :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue39971>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
If you don’t look it up every time, how do you deal with DNS timeouts?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue47
Eric V. Smith added the comment:
> Do you mean expiring the IP address when the TTL is reached?
Yes, that's what I mean. Isn't the resolver library smart enough to cache
lookups and handle the TTL timeout by itself?
--
___
Python tr
Eric V. Smith added the comment:
Hmm. I'm not sure we should try to work around a bad resolver issue. What's
your platform, and how did you install Python?
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
> I blame the lack of standard POSIX functions for doing DNS lookups
> asynchronously and in a way that provides TTL information to the client.
I totally agree with that!
And I agree it would be nice to have some way of doing non-blocking lookups
wh
Eric V. Smith added the comment:
This is an FAQ:
https://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue47
Eric V. Smith added the comment:
There's also this StackOverflow question about it:
https://stackoverflow.com/questions/38344244/tuples-operator-throws-exception-but-succeeds
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type
Eric V. Smith added the comment:
My personal usage of a topological sort are restricted to maybe 100 entries
max, so I can't really test this in any meaningful way.
That, and the project that uses it is stuck on 3.6, so I haven't switched to
the graphlib v
Eric V. Smith added the comment:
Same question as Alex: what does the TypeAlias being inside the class offer
that being at module level doesn't?
--
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
I'm going to close this. If you have a more concrete proposal, either re-open
this or bring it up on python-ideas.
--
resolution: -> rejected
stage: -> resolved
status: pending -> closed
___
Eric V. Smith added the comment:
As Jelle says, this can't be a runtime Exception.
At best mypy or a linter could make iterating over an known empty list (like a
literal []) a warning, not an error as suggested by the OP. I sometimes
"comment out" loops by doing something
Change by Eric V. Smith :
--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
___
Python tracker
<https://bugs.python.org/issue47
Eric V. Smith added the comment:
Here's the error without dataclasses:
--
from typing import Protocol
class SomeProtocol(Protocol):
@property
def some_value(self) -> str: ...
class SomeClass(SomeProtocol):
def __init__(self, some_value):
self.some_value = so
Change by Eric V. Smith :
--
title: Inheritance from Protocol with property in class makes them
non-instantiatable -> Inheritance from base class with property in class makes
them non-instantiatable
___
Python tracker
<https://bugs.pyth
Eric V. Smith added the comment:
What would dataclasses do that's different from a regular class?
--
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
I think this is a duplicate of #46782.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue47247>
___
___
Change by Eric V. Smith :
--
assignee: -> eric.smith
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue37868>
___
___
Python-bugs-list mai
Eric V. Smith added the comment:
I'm guessing I'm looking up the attribute on the instance, not the class.
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
Yeah, I agree it's not an awesome design to work with classes or instances, but
it's documented that way. As soon as I write some tests I'll check this in.
--
___
Python tracker
<https://bugs.pyt
Eric V. Smith added the comment:
I think Serhiy means 1.e-8 is not valid.
The spec says that at least one digit is required in the "frac" part, after the
decimal.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.o
Change by Eric V. Smith :
--
keywords: +patch
pull_requests: +15042
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15325
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
New changeset b0f4dab8735f692bcfedcf0fa9a25e238a554bab by Eric V. Smith in
branch 'master':
bpo-37868: Improve is_dataclass for instances. (GH-15325)
https://github.com/python/cpython/commit/b0f4dab8735f692bcfedcf0fa9a25e
Change by Eric V. Smith :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
I think I'd prefer "... Python uses the usual flow control statements known
from other languages ..."
It's not just syntax, after all.
--
keywords: +newcomer friendly
nosy: +eric.smith
st
Eric V. Smith added the comment:
The lexer sees an f-string:
f'some text {something.split('
next to a normal string:
')}'
The first of those is not a valid f-string because of the unmatched left brace,
so it's an error.
I'm contemplating making the f-strin
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue37948>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I agree that we should close this and not implement a function to draw a circle
centered on the turtle. The fundamental abstraction with turtle graphics is
that the turtle is holding a pen. To have the pen draw elsewhere, where the
turtle does not go, breaks
Eric V. Smith added the comment:
It's turtle.circle:
https://docs.python.org/3.5/library/turtle.html#turtle.circle
@Yehuda: this isn't the appropriate place for help on how the turtle module
works. Please consider the python-tutor list. See
https://mail.python.org/mailman/list
Eric V. Smith added the comment:
When you convert the integer to a float (because of the 'f' in the first format
spec), you're losing precision. See:
https://docs.python.org/3/tutorial/floatingpoint.html and
https://docs.python.org/3/faq/design.html#why-are-floating-point-
Eric V. Smith added the comment:
Can you provide the code that caused the segfault?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue38
Eric V. Smith added the comment:
This forum is for reporting bugs in python, not for getting help with writing
python programs.
I suggest you ask about this on the python-tutor mailing list:
https://mail.python.org/mailman/listinfo/tutor
Good luck!
--
nosy: +eric.smith
resolution
Eric V. Smith added the comment:
This is almost certainly not a bug in Python. This forum is for reporting bugs
in Python, not for getting help on using Python. I suggest you try the
python-tutor mailing list: https://mail.python.org/mailman/listinfo/tutor
--
nosy: +eric.smith
Eric V. Smith added the comment:
New changeset 7a2f68776a77c782c0abf40dc9e3fb687787e730 by Eric V. Smith (Miss
Islington (bot)) in branch '3.8':
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234)
https://github.com/python/cpyt
Eric V. Smith added the comment:
New changeset 8b907a8875d1b22d8f060dee9430cc82d471e86b by Eric V. Smith (Miss
Islington (bot)) in branch '3.7':
bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16235)
https://github.com/python/cpyt
Change by Eric V. Smith :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
201 - 300 of 2699 matches
Mail list logo