Eric V. Smith added the comment:
Thanks, Pablo!
--
___
Python tracker
<https://bugs.python.org/issue44655>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
It's obviously not super important, but it would be nicer if the version with
the suggestion were more like the version without the suggestion. Specifically,
mentioning the object type:
>>> class E:
... __slots__=('a')
...
>>> E()
Eric V. Smith added the comment:
Also, the dot after the first 'b' was confusing to me: I thought it had
something to do with an attribute of b. And the quotes around the second 'b'
were also confusing, but that's mostly because the original example initialized
a class variable named 'b
Eric V. Smith added the comment:
I created issue 44655 for the confusing error message.
The problem with dataclasses is that the instance variable 'b' needs to be
initialized, instead of the current dataclasses behavior where it relies on the
class variable when reading 'b
New submission from Eric V. Smith :
This is related to issue 44649. This is the simplest non-dataclasses case I
could come up with.
Given:
class Example:
__slots__ = ('a', 'b')
def __init__(self, a):
self.a = a
obj = Example(42)
print(obj.b)
I get this in 3.10 and main
Change by Eric V. Smith :
--
assignee: -> eric.smith
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44649>
___
___
Python-bugs-list mai
Eric V. Smith added the comment:
Yes, thank you Leonardo!
There are probably places in the stdlib where changing to f-strings would be a
performance improvement. Of course finding those places is the challenge!
--
nosy: +eric.smith
___
Python
Eric V. Smith added the comment:
As the author of PEP 420, I think having test discovery support namespace
packages is a mistake, at least in the sense of pretending every directory is a
namespace package.
--
nosy: +eric.smith
___
Python tracker
Eric V. Smith added the comment:
> As a side note, I think making the install restrictive is more work than
just let it install where user wants to install. The restrictions need to
be coded - don't they? :)
Well at this point, the restrictions already exist! So change it
Eric V. Smith added the comment:
Can you provide a short code example that reproduces this, preferably without
using any third party libraries?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
This is not a bug, but expected floating point behavior. See
https://docs.python.org/3/tutorial/floatingpoint.html
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: -&
Eric V. Smith added the comment:
I agree this should be closed (and I'm closing it). I don't see any reason why
this function should do something other than raise TypeError if given bs=None.
If you want that behavior, write a small wrapper function.
The "if not bs" che
Change by Eric V. Smith :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Eric V. Smith :
--
components: +Windows
nosy: +eric.smith, paul.moore, steve.dower, tim.golden, zach.ware
title: subprocess.run gets stuck indefinitely -> On Windows, subprocess.run
gets stuck indefinitely
___
Python tracker
<
Eric V. Smith added the comment:
Clarifying the title.
--
nosy: +eric.smith
title: exception is thrown if bs = None -> In Lib/urllib/parse.py
quote_from_bytes, exception is thrown if bs = None
___
Python tracker
<https://bugs.pyth
Change by Eric V. Smith :
--
assignee: -> eric.smith
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue44475>
___
___
Python-bugs-
Eric V. Smith added the comment:
You should bring this up on the python-ideas mailing list if you want some
discussion.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44496>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I don't think there's any action to be done here, so I'm going to close this.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
Please give a complete example that we can execute.
--
___
Python tracker
<https://bugs.python.org/issue44475>
___
___
Pytho
Eric V. Smith added the comment:
Thanks, Irit.
I'm closing this as "won't fix".
--
resolution: out of date -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bug
Eric V. Smith added the comment:
I tend to agree with Mark: any change would be disruptive, and it doesn't seem
to be causing any real problem.
Irit: did you come across this because it's causing a problem somewhere?
--
___
Python tracker
<ht
Eric V. Smith added the comment:
I'm going to close this. If you can reproduce it with a smaller program that we
can test, please attach the information and re-open this issue.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: -&
Eric Snow added the comment:
FWIW, I've wrapped up the key parts that I wanted to get done here
(co_localplusnames/kinds, MAKE_CELL, eliminate unused fast local
for arg cells). I'm leaving this open for now as there are a few
things I didn't do that seem part of the original intention
Change by Eric V. Smith :
--
title: dataclass looks up default on the class, not the class's __dict__ ->
dataclass looks up field default value on the class, not the class's __dict__
___
Python tracker
<https://bugs.python.org/issu
Change by Eric V. Smith :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue3>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Eric V. Smith :
--
title: dataclass looks up default on the class, not the classes __dict__ ->
dataclass looks up default on the class, not the class's __dict__
___
Python tracker
<https://bugs.python.org/issu
New submission from Eric V. Smith :
Consider:
class FtpHelper(ftplib.FTP):
host: str
baz: str = 'baz default'
>>> FtpHelper.host
''
>>> FtpHelper.baz
'baz default'
>>> getattr(FtpHelper, "host")
''
>>> getattr(FtpHelper, "baz
Eric V. Smith added the comment:
I was thinking about something like:
@dataclass
class FtpHelper(ftplib.FTP):
my_host: str
my_user: str
lookup_password: InitVar[Callable]
def __post_init__(self, lookup_password):
super().__init__(host=self.my_host, user=self.my_user
Eric V. Smith added the comment:
This is probably not a python bug. But if you can demonstrate it without
needing to install the Oracle software, we can take a look at it. You've also
not explained how you're using multiprocessing. We need an complete, short,
working example program
Change by Eric Phenix :
--
keywords: +patch
pull_requests: +25336
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26751
___
Python tracker
<https://bugs.python.org/issu
New submission from Eric Phenix :
Suggested functionality:
> python -m uuid
> b9aa5a06-e2cd-4c26-b26b-1590f01ea996
--
messages: 395906
nosy: ephenix
priority: normal
severity: normal
status: open
title: Add command-line functionality to uuid module
type: enhancement
versions:
Eric Snow added the comment:
New changeset ac38a9f2dfbba95f5d4338eb11a0221d38ef9328 by Eric Snow in branch
'main':
bpo-43693: Eliminate unused "fast locals". (gh-26587)
https://github.com/python/cpython/commit/ac38a9f2dfbba95f5d4338eb11a022
Eric V. Smith added the comment:
I suggest you close it. If you want some broader discussion, you should bring
it up on the python-ideas mailing list, but I don't expect you'll get much
support.
--
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
Changing versions: this could only be added to 3.11.
I think the ship has sailed on this. The old names could never be removed so
we'd have to support both names forever. I think it's not worth the hassle.
--
nosy: +eric.smith
versions: -Python 3.10
Eric V. Smith added the comment:
That's the documented behavior: "A user may need to set the limit higher when
they have a program that requires deep recursion and a platform that supports a
higher limit. This should be done with care, because a too-high limit can lead
to a crash.&qu
Eric V. Smith added the comment:
I'm not sure directly calling __post_init__ is a good pattern. Why would not
calling __init__, like you would with any other class, not be the preferred
thing to do?
--
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
The example was added in https://github.com/python/cpython/pull/25967
When reviewing it, I think I missed the fact that the base class is a
dataclass. The example and text make more sense if Rectangle isn't a dataclass.
Still, I don't like the example at all
Eric Snow added the comment:
I've merged the changes for __file__. Thanks, furkanonder!
The fixes in the types module remain to be done, though now I see 4 of the
relevant attributes instead of 2. (missing: __path__, __file__, __cached__
Eric Snow added the comment:
> According to the documentation for types.SimpleNamespace,
> `repr(SimpleNamespace())`
> should return `"SimpleNamespace()"`, but in actuality returns `"namespace()"`.
Note that I purposefully wrote "roughly" in the
Eric Snow added the comment:
I'm not sure what to think about this.
The type is explicitly exposed to Python code "SimpleNamespace" via the types
module. However, that's the same as how other builtin types are exposed in
that module. For example, the builtin `P
Eric Snow added the comment:
This was my bad. I only partially fixed original problem when un-reverting
3fa63e in gh-26609. I've merged the rest of the fix in gh-26626. Sorry about
that.
--
nosy: +eric.snow
___
Python tracker
<ht
Eric V. Smith added the comment:
Agreed that that's not a good (or even workable) example. Thanks for pointing
it out.
I'll come up with something better.
--
assignee: docs@python -> eric.smith
versions: +Python 3.10, Python 3.11, Python
Eric Snow added the comment:
New changeset e6e34e45222b9c7a63ba92386612acf768082ba0 by Eric Snow in branch
'main':
bpo-43693: Do not check co_cell2arg if a non-cell offset. (gh-26626)
https://github.com/python/cpython/commit/e6e34e45222b9c7a63ba92386612acf768082ba0
Change by Eric Snow :
--
pull_requests: +25212
pull_request: https://github.com/python/cpython/pull/26626
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
See msg395383 for how it's an incompatible change even to .format().
In the 15 years since I implemented .format(), this is the first I've ever
heard of someone being confused by adding extra spaces. I don't think it's
worth changing
Eric V. Smith added the comment:
The problem with this change is that it wouldn't be backward compatible. I'm
not sure how many people it would affect, but probably more than zero.
>>> str.format('{ 0 }', **{' 0 ': 42})
'42'
>>> str.format('{ }', **{' ': 43})
'43'
Does
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44355>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 3e1c7167d86a2a928cdcb659094aa10bb5550c4c by Eric Snow in branch
'main':
bpo-43693: Un-revert commit f3fa63e. (#26609)
https://github.com/python/cpython/commit/3e1c7167d86a2a928cdcb659094aa10bb5550c4c
Change by Eric Snow :
--
pull_requests: +25192
pull_request: https://github.com/python/cpython/pull/26609
___
Python tracker
<https://bugs.python.org/issue43
Eric Snow added the comment:
Thanks, Pablo!
--
___
Python tracker
<https://bugs.python.org/issue43693>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric Snow added the comment:
New changeset 165c884154901deae46b5e328a6414d130e6bfff by Eric Snow in branch
'main':
bpo-43693: Silence some compiler warnings. (gh-26588)
https://github.com/python/cpython/commit/165c884154901deae46b5e328a6414d130e6bfff
Change by Eric Snow :
--
pull_requests: +25173
pull_request: https://github.com/python/cpython/pull/26588
___
Python tracker
<https://bugs.python.org/issue43
Change by Eric Snow :
--
pull_requests: +25172
pull_request: https://github.com/python/cpython/pull/26587
___
Python tracker
<https://bugs.python.org/issue43
Eric Snow added the comment:
New changeset 631f9938b1604d4f893417ec339b9e0fa9196fb1 by Eric Snow in branch
'main':
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets.
(gh-26396)
https://github.com/python/cpython/commit/631f9938b1604d4f893417ec339b9e0fa9196fb1
Eric Snow added the comment:
New changeset 2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6 by Eric Snow in branch
'main':
bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)
https://github.com/python/cpython/commit/2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6
Change by Eric Snow :
--
pull_requests: +25165
pull_request: https://github.com/python/cpython/pull/26577
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
The code you've attached doesn't generate the error you provided.
--
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
No, I'm sorry that I don't. The example is too large for me (or probably any of
our volunteers) to look through and reason about. I think asking on a forum
like Stack Overflow is your best bet, but even there they will ask for a
simpler example. Or maybe try
Eric V. Smith added the comment:
If you can't provide any more information, we can't help you and I'll have to
close this issue.
--
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
Python 3.6 is no longer supported. Please try to reproduce this with python 3.8
or 3.9.
Without seeing the code that causes the failure, it's not possible for us to
provide any help. Please try to reproduce the code with the smallest possible
example
Eric V. Smith added the comment:
> _uploaded_by: str = dataclasses.field(alias="uploaded_by", default=None,
> init=False)
That's an interesting idea. I'll play around with it. I'm not sure "alias"
feels quite right, as it only applies to __init__ (if I'm u
Eric Snow added the comment:
Thanks Pablo. I'll get this sorted out. Sorry for the pain.
--
___
Python tracker
<https://bugs.python.org/issue43693>
___
___
Eric Snow added the comment:
New changeset b2bf2bc1ece673d387341e06c8d3c2bc6e259747 by Mark Shannon in
branch 'main':
bpo-43693: Compute deref offsets in compiler (gh-25152)
https://github.com/python/cpython/commit/b2bf2bc1ece673d387341e06c8d3c2bc6e259747
Eric Snow added the comment:
New changeset 2c1e2583fdc4db6b43d163239ea42b0e8394171f by Eric Snow in branch
'main':
bpo-43693: Add new internal code objects fields: co_fastlocalnames and
co_fastlocalkinds. (gh-26388)
https://github.com/python/cpython/commit
Eric V. Smith added the comment:
I'm not sure the original version needs improving.
This sounds like a problem understanding how warnings work.
Do you really want to say that for warnings, they're sometimes handled by the
warning machinery and therefore don't get passed along to the calling
Eric V. Smith added the comment:
See https://bugs.python.org/issue25124 for a discussion on why MSI won't be
supported going forward.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric Snow added the comment:
New changeset 9f494d492944c3a6a7a7471b4ad3a025dc7de289 by Eric Snow in branch
'main':
bpo-43693: Add _PyCode_New(). (gh-26375)
https://github.com/python/cpython/commit/9f494d492944c3a6a7a7471b4ad3a025dc7de289
Change by Eric Snow :
--
pull_requests: +24989
pull_request: https://github.com/python/cpython/pull/26396
___
Python tracker
<https://bugs.python.org/issue43
Change by Eric Snow :
--
pull_requests: +24981
pull_request: https://github.com/python/cpython/pull/26388
___
Python tracker
<https://bugs.python.org/issue43
Change by Eric Snow :
--
pull_requests: +24967
pull_request: https://github.com/python/cpython/pull/26375
___
Python tracker
<https://bugs.python.org/issue43
Change by Eric Snow :
--
pull_requests: +24955
pull_request: https://github.com/python/cpython/pull/26364
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
I agree with Raymond: I've never seen this behavior anywhere. In general, I
think being looser with allowed inputs is not a good idea.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
This was reported a few hours ago at
https://github.com/paramiko/paramiko/issues/1856.
I'm closing this as a third party issue.
--
nosy: +eric.smith
resolution: -> third party
stage: -> resolved
status: open -&g
Eric V. Smith added the comment:
> It is a pretty-targeted optimization, so I don't expect it to speed up the
> macro benchmarks. Though that shouldn't be a blocker for small, targeted
> optimizations.
In the past we've rejected optimizations that make the code more complex a
Eric V. Smith added the comment:
The example is correct. The result is sorted by the second item (index=1) of
each tuple:
four
one
three
two
Maybe the text could make it more clear that that's the desired output.
--
nosy: +eric.smith
___
Python
Eric V. Smith added the comment:
To be pedantic, f-strings don't "cast" to a string, they call format(obj) on
the argument. Typically this is the same as str(obj), but it need not be. I
guess if all of the arguments are already exact strings then this distinction
doesn't matte
Eric V. Smith added the comment:
No, iteration is explicitly a non-goal of PEP 557. See the section on
namedtuple for why:
https://www.python.org/dev/peps/pep-0557/#why-not-just-use-namedtuple
--
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
There's no actual code associated with the "else" line, so there's no way to
get the line number. dis.dis(sample_data) might give you some insight.
Since this all works as designed, I'm going to close this issue. You might get
more help on Sta
Eric V. Smith added the comment:
Since this is working as designed, I'm going to close it.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Eric Snow :
--
pull_requests: +24865
pull_request: https://github.com/python/cpython/pull/26258
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
It's in the AST.
>>> tree.body[0].orelse[0].orelse[0].lineno
7
To see it with dump, use: ast.dump(tree, include_attributes=True)
Which, after some reformatting, gives:
Module(body=[If(test=Compare(left=Name(id='num', ctx=Load(), lineno=2,
col
Eric V. Smith added the comment:
Formatting the result, I get:
Module(body=[If(test=Compare(left=Name(id='num', ctx=Load()),
ops=[Gt()],
comparators=[Constant(value=0, kind=None)]),
body=[Expr(value=Call(func=Name(id
Change by Eric Snow :
--
nosy: +eric.snow
nosy_count: 4.0 -> 5.0
pull_requests: +24833
pull_request: https://github.com/python/cpython/pull/26216
___
Python tracker
<https://bugs.python.org/issu
Change by Eric V. Smith :
--
nosy: -eric.smith
___
Python tracker
<https://bugs.python.org/issue44171>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Please report this to the Cython bug tracker:
https://github.com/cython/cython/issues/
When you do that, you'll want to show the actual code you're having a problem
with. You're using both "//" and "/" here. As Pablo said, you're probab
New submission from Eric V. Smith :
If this is really a Cython issue, you should report it on the Cython bug
tracker. This bug tracker is for CPython.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
Maybe the XXX comment in ceval.c should be removed? If we wouldn't change the
code to use a dictionary, then that comment seems incorrect.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
I agree with Raymond: a more useful example would use dataclasses or
typing.NamedTuple. The use of class variables is unusual, and it took me a
while to understand how it would work.
--
nosy: +eric.smith
Eric V. Smith added the comment:
In the future, if you get an error, please tell us what the error is. It makes
responding to bugs easier.
'{::>10d'.format(5)
Gives me an error with 3.10:
>>> '{::>10d'.format(5)
Traceback (most recent call last):
File "", line 1,
Eric V. Smith added the comment:
"If it ran in 1.98 secs then the new patch would theoretically measure
1.96 (original - 0.22)"
That difference is 0.02 seconds, or about 1%, correct?
I'm just trying to understand what we're meas
Eric V. Smith added the comment:
"there's an increase in speed by 0.22 or something like that"
0.22 what? Seconds? Percent? A factor of 0.22?
What are you measuring, and how are you measuring it?
--
nosy: +eric.smith
___
Python track
Eric V. Smith added the comment:
As you note, some of these likely cannot be improved.
There was talk last year about moving f-string's bespoke lexer/parser/compiler
into the normal Python grammar. But I'm not sure if that ever got anywhere. If
we did make that change, it would be easier
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44123>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue43176>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
Thanks, @dhoekstra!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
New changeset f47305aa1fa41c38f744e9a16ae33b74c6fd45e7 by Miss Islington (bot)
in branch '3.10':
bpo-43558: Add note about base class initialization to dataclasses doc
(GH-25967) (GH-26018)
https://github.com/python/cpython/commit
Eric V. Smith added the comment:
New changeset 4d532d3f8f7970493442d7c217220f60312f92e1 by Miss Islington (bot)
in branch '3.9':
bpo-43558: Add note about base class initialization to dataclasses doc
(GH-25967) (GH-26019)
https://github.com/python/cpython/commit
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue44083>
___
___
Eric V. Smith added the comment:
Also: How are you executing this code? From IDLE? From the command line?
--
status: pending -> open
___
Python tracker
<https://bugs.python.org/issu
801 - 900 of 6681 matches
Mail list logo