Eric V. Smith added the comment:
There's too much for us to look at here. Can you create a small example which
demonstrates the problem?
It should include the input, the code, the actual output, and the expected
output.
--
nosy: +eric.
Change by Eric V. Smith :
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issue46617>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
It looks like you're missing dependencies required to compile yarl. Since this
isn't a bug with Python, I'm going to close this.
I suggest you ask the yarl community for help. Their home page is
https://github.com/aio-libs/yarl/
Good luck!
Eric V. Smith added the comment:
Ah. longintrepr.h is an internal Python file, not meant for external
consumption. This file moved in Python 3.11. So this is still a yarl issue:
they'll need to adjust how they read that file. But my recommendation is that
they find another way to do
Eric V. Smith added the comment:
I'm not sure what you're trying to accomplish here, but long and unichr are not
available in python 3.
2to3 has been deprecated and is no longer supported.
--
nosy: +eric.smith
___
Python track
Eric V. Smith added the comment:
I guess the technically correct term is positional-or-keyword, but that seems
like too much: https://docs.python.org/3/glossary.html
I think dropping "positional" doesn't increase the precision of the error
message, but I'll admit I can
Eric V. Smith added the comment:
Given this current behavior:
>>> def foo(a, /, b): pass
...
>>> foo()
Traceback (most recent call last):
File "", line 1, in
TypeError: foo() missing 2 required positional arguments: 'a' and 'b'
What would y
Eric V. Smith added the comment:
Where did you get the tarball?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue46683>
___
___
Python-bug
Change by Eric V. Smith :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue46683>
___
___
Python-bugs-
New submission from Eric V. Smith :
You need to provide more information.
Is your concern that re.match objects aren't matched like dicts are, despite
looking like a mapping?
import re
def f(map):
print(f'input={m["one"]} {m["two"]}')
match ma
Change by Eric V. Smith :
--
components: +Interpreter Core
___
Python tracker
<https://bugs.python.org/issue46692>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
Oops, slight bug in my code. Use this:
import re
def f(map):
print(f'input={map["one"]} {map["two"]}')
match map:
case {'one': x, 'two': y}:
print(f"match {x} {y}")
Eric V. Smith added the comment:
Looking at PEP 634, the obvious way to add support for this is to have the
re.Match object specify Py_TPFLAGS_MAPPING. But I tried that, and then I get
this error when using an re.Match object in a match statement:
case {'one': x
Eric V. Smith added the comment:
Good catch, @xtreak. I think something like the discussed (but not implemented)
custom matching protocol would be required here. __match_args__ won't work,
because it's a special attribute only checked on classes, not instances.
Of course, I'm
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue46693>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I believe dataclasses uses repr() of the members, not str(). Can you try using
specifying __repr__ in Teacup? Just __repr__ = __str__ should work.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
Thanks, Henry Schreiner!
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Eric V. Smith added the comment:
I'll close it.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Eric V. Smith added the comment:
Please report bug tracker bugs at https://github.com/python/bugs.python.org
Although to be honest I doubt this will be fixed, since we're moving to Github
issues.
--
nosy: +eric.smith
resolution: -> third party
stage: -> resolved
s
Eric V. Smith added the comment:
I agree with Mark. It's identical to:
>>> () == ()
True
As for the non-dataclass version, that's a normal object identity comparison if
no __eq__ is defined:
https://docs.python.org/3/reference/datamodel.html#object.__eq__
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue46739>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Eric V. Smith :
--
components: +Library (Lib) -Parser
type: crash -> behavior
___
Python tracker
<https://bugs.python.org/issue46735>
___
___
Python-
Eric V. Smith added the comment:
Are you running from bash (or another cygwin shell), or from cmd.exe, or
something else?
How did you install the version of python you're executing in the examples you
provided? To my knowledge, cygwin's installer doesn't have a 3.9 availabl
Eric V. Smith added the comment:
>:) Citing myself:
>> Trying this *bash* command line:
Oops, sorry for missing that.
As for 3.9: it's not available through the 64 bit installer (at least, I don't
see it there). I'll look and see what's involved in installin
Eric V. Smith added the comment:
Good catch! I'll have a patch tonight.
--
___
Python tracker
<https://bugs.python.org/issue46762>
___
___
Python-bugs-l
Change by Eric V. Smith :
--
keywords: +patch
pull_requests: +29515
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31365
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
New changeset ffd9f8ff84ed53c956b16d027f7d2926ea631051 by Eric V. Smith in
branch 'main':
bpo-46762: Fix an assert failure in f-strings where > or < is the last
character if the f-string is missing a trailing right brace. (#31365)
https://g
Eric V. Smith added the comment:
Sure, have a go at it!
Any testing of pprint.pprint() would be an improvement, but ideally all options
should be tested.
It would probably be worthwhile to restructure the tests to run both pformat
and pprint tests from the same logic, so that we only need
Eric V. Smith added the comment:
This looks like an issue with ruamel.yaml, which is a third party package. You
should report it to them.
Good luck!
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue46
Change by Eric V. Smith :
--
title: Indentation now preserved with ruamel.yaml.round_trip_dump ->
Indentation not preserved with ruamel.yaml.round_trip_dump
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
I'm not crazy about adding a method to every dataclass just for the 0.1% of the
times it's needed.
I think using hasattr or catching the exception is a better way to go.
--
___
Python track
Eric V. Smith added the comment:
The fact that it's never been needed in the years that dataclasses and attrs
have existed tell me it's kind of a niche requirement.
This does not seem like the ugliest code I've ever seen:
if hasattr(super(), "__post_init__&
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue46757>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I'm going to close this issue. As Raymond says, it's a breaking change, and the
workaround is easy enough.
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Change by Eric V. Smith :
--
pull_requests: +29650
pull_request: https://github.com/python/cpython/pull/31523
___
Python tracker
<https://bugs.python.org/issue46
Eric V. Smith added the comment:
I'm adding a test that mimic's Raymond's example of the proposed addition being
a breaking change. This way, if we ever decide to actually add this feature,
we'll break this test. If we do decide to continue and make the change anyway,
Eric V. Smith added the comment:
New changeset 288af845a32fd2a92e3b49738faf8f2de6a7bf7c by Eric V. Smith in
branch 'main':
bpo-46757: Add a test to verify dataclass's __post_init__ isn't being
automatically added. (GH-31523)
https://github.com/p
Eric V. Smith added the comment:
Please show us how they fail.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue46856>
___
___
Python-bug
Eric V. Smith added the comment:
Probably so. You could step through the code to make sure that's what's going
on.
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
>From https://github.com/python/cpython/blob/main/Python/marshal.c:
41 is:
#define TYPE_SMALL_TUPLE')'
The difference between 41 and 169 is 128:
#define FLAG_REF'\x80' /* with a type, add obj to index */
S
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue46904>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric V. Smith :
--
nosy: +mark.dickinson
___
Python tracker
<https://bugs.python.org/issue46904>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
> I was running one python script
Again: you need to show us the script that's causing this problem. I (and
millions of others) run scripts all the time which do not fail in the way you
describe. Unless you show us a script that causes the problem, w
Eric V. Smith added the comment:
I understand. Then I'm going to close this issue, since there's nothing we can
do.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs
Eric V. Smith added the comment:
I don’t have Ubuntu to test on. Plus the steps to reproduce are too much for
the average volunteer to work through. I don’t think we’ll be able to help.
--
___
Python tracker
<https://bugs.python.org/issue46
Eric V. Smith added the comment:
I think this is a bug in the code. I'll have a PR ready shortly.
But since it's a non-trivial change, I'm going to target it for 3.11 only.
--
assignee: docs@python -> eric.smith
versions: -Pytho
Eric V. Smith added the comment:
Yeah, I've come to the conclusion that it's not so simple, either. I'm also
thinking that advising to call the base __init__ is a mistake.
--
___
Python tracker
<https://bugs.pyt
Eric V. Smith added the comment:
As others have noted, the behavior is intentional, so I'm closing this.
--
nosy: +Dennis Sweeney, Jelle Zijlstra, eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Eric V. Smith added the comment:
If you go with the second idea, I'd say something like f"More than {2 *
tracebacklimit} additional stack frames not shown". It seems handy to know the
magnitude of the problem.
--
nosy: +eric.smith
___
Change by Eric V. Smith :
--
components: +Regular Expressions -Library (Lib)
nosy: +ezio.melotti, mrabarnett
___
Python tracker
<https://bugs.python.org/issue46
Changes by Eric V. Smith:
--
versions: +Python 2.6
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1009>
__
___
Python-bugs-list mailing list
Unsubs
Eric V. Smith added the comment:
Closed, code was checked in revision 57444.
--
versions: +Python 3.0 -Python 2.6
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
Eric V. Smith added the comment:
I tried to close it, without success. Possible tracker issue, I'll
investigate.
It should be closed!
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python
Eric V. Smith added the comment:
It's a nit, but there are a few other comments that should be changed to
mention %f in addition to %z/%Z.
* giving special meanings to the %z and %Z format codes via a preprocessing
/* Scan the input format, looking for %z and %Z escapes, bui
New submission from Eric O. LEBIGOT :
When creating a .pyo file (either with -O or -OO) and removing any .pyc or .py
original file, import complains with "No module called
". The import does work with .pyc files.
I'm not sure that this is the correct behavior, as the documen
Eric O. LEBIGOT added the comment:
Indeed. Thanks. I wish it had been in the documentation. :) This is yet
another reason for me to check how I can submit patches to the doc. :)
I also found out that renaming the .pyo file as .pyc makes Python happy upon
import. That's the solut
Eric V. Smith added the comment:
See also issue 12191, where there was a brief discussion of this.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue13
Eric V. Smith added the comment:
Thanks for the report. Fixed in 9a9bd05b9fca.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
Eric V. Smith added the comment:
Can you post some example code?
I would not expect disconnecting the network cable to close any TCP
connections, unless you are transmitting data and/or you have keepalives turned
on.
--
nosy: +eric.smith
Eric V. Smith added the comment:
Assuming that you're unplugging the cable when the code is in the loop that
occurs after the line "self.pcPart.write(cmdx)", and also assuming that you
haven't turned on keepalives, then the behavior you see is expected.
You're just
Changes by Eric V. Smith :
--
nosy: +eric.smith, jason.coombs
___
Python tracker
<http://bugs.python.org/issue13143>
___
___
Python-bugs-list mailing list
Unsub
Changes by Eric G. Barron :
--
nosy: +ericography
___
Python tracker
<http://bugs.python.org/issue11457>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
nosy: +bethard, eric.smith
___
Python tracker
<http://bugs.python.org/issue13271>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue13314>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
If I understand it correctly, this change request is to change os.fstat(obj)
(and probably other functions) to call obj.fileno(), instead of the caller
doing that?
If so, -1. Keep os.fstat() as a thin wrapper around fstat.
--
nosy: +eric.smith
Eric V. Smith added the comment:
Since the flags are OR'd together, I don't see what other value the "no flags"
parameter could have, other than zero. That said, I don't feel strongly about
it, and if it helps re
Eric V. Smith added the comment:
To your last point, I think it's important to specify the default value
placeholder (basically a sentinel) in the documentation. For example, if a
function takes -1 to mean "all occurrences", then the caller needs to know how
what value to pass
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue13410>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
nosy: +eric.smith, jason.coombs
___
Python tracker
<http://bugs.python.org/issue13412>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
I think this must be a change between 2.5 and 2.6.
In 2.5.1 non-debug (Linux) I consistently see:
>>> print '%d' % y
Traceback (most recent call last):
File "", line 1, in
TypeError: int argument required
In 2.6.5 (Windo
Eric V. Smith added the comment:
I don't think you're going to want those print statements in a test. You could
just evaluate '%d' % y.
--
___
Python tracker
<http://bug
Eric V. Smith added the comment:
With an unpatched 2.7, this fails for me:
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -289,6 +289,17 @@
else:
raise TestFailed, '"%*d"
Eric V. Smith added the comment:
Interesting! Same here.
Using eval() fails with or without -v:
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -289,6 +289,18 @@
else:
raise TestFailed, '"%*d"%(maxsize, -127) should fail'
+
Eric V. Smith added the comment:
I just ran across the other reason that having the actual default values
documented is important. Sometimes I want to do this:
some_func(param if some_condition else )
If some_condition is False, I want the default behavior, if not, I want to pass
in a
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue13433>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I'm not sure why this is being reopened. Unless there's been a discussion I'm
not aware of, the change is still not worth the disruption it would cause.
And in any event, it can only be addressed in new (as yet unreleased) versions
of python.
Eric V. Smith added the comment:
I'm -1 on this change. I think all the core devs who have commented on it here
are -1 or -0. If you really want to lobby for this change, I suggest starting a
discussion on python-dev.
My position is that I think it would indeed look nicer, but the bre
Changes by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<http://bugs.python.org/issue13450>
___
___
Python-bugs-list mailing list
Unsubscri
Eric V. Smith added the comment:
I don't think the existing tests have any value. I might leave one of them, but
I think I'll just use your new tests instead.
akira: I'd like to add your name to the Misc/ACKS file, if it's not already
there. What's your full name?
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue13535>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Eric V. Smith :
--
assignee: -> eric.smith
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue13579>
___
___
Python-bugs-list mai
Eric V. Smith added the comment:
This bug is assigned to me. Sometimes it takes a while before a committer has
time to review a bug and act on it. I can assure you that I will review this
before the next release of Python.
Thank you for the bug report, and especially thanks for the patch
Changes by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<http://bugs.python.org/issue12014>
___
___
Python-bugs-list mailing list
Unsubscri
Eric V. Smith added the comment:
This is because the help text support substitution, as mentioned here:
http://docs.python.org/dev/library/argparse.html#help
It's possible this documentation could be improved.
--
assignee: -> docs@python
components: +Documentation -None
nos
Eric V. Smith added the comment:
In case I wasn't clear, I mean that the help string supports %-formatting
variable expansion, such as "%(default)s". I think it would be good if a
sentence were added to the end of the "help" section, saying something like:
Because
Eric V. Smith added the comment:
I assume this is left over from the PEP 393 changes. I think the right thing to
do is delete this code from line 277 of formatter_unicode.c:
if (format->fill_char > 127 || format->align > 127 ||
format->sign > 127) {
Changes by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<http://bugs.python.org/issue13718>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Eric V. Smith :
--
assignee: -> rhettinger
___
Python tracker
<http://bugs.python.org/issue13742>
___
___
Python-bugs-list mailing list
Unsubscri
Eric V. Smith added the comment:
Good point. I hadn't looked at the string closely enough. Closing.
--
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyth
Eric V. Smith added the comment:
It seems like a set would make more sense than a tuple. And if tuples, why not
lists?
Not that it matters much, since I doubt it's worth changing in either case.
It's easy enough for the caller to convert.
--
nosy: +
Eric V. Smith added the comment:
This is a duplicate of issue 13706.
--
nosy: +eric.smith
resolution: -> duplicate
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Eric V. Smith added the comment:
Sorry for the off-the-cuff diagnosis. I had assumed this was the unintended
result of the conversion, but of course I'm wrong.
I'd like to fix this.
--
nosy: +Jim.Jewett
___
Python tracker
<http://bu
New submission from Eric V. Smith :
http://docs.python.org/library/decimal.html
In 9.4.2, "Decimal objects", some of the methods mention the first and second
parameters, when really it should be "self" and the argument, usually named
"other" and sometimes
Changes by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue12188>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
As a new feature, it can't be added to 2.7.
--
nosy: +eric.smith
___
Python tracker
<http://bugs.python.org/issue12191>
___
___
Eric V. Smith added the comment:
I'm not talking about the method itself but rather the descriptive text. For
example:
copy_sign(other)
Return a copy of the first operand with the sign set to be the same as the
sign of the second operand.
There is no second operand, unles
Eric V. Smith added the comment:
PEP 3101 defines format strings as intermingled character data and markup.
Markup defines replacement fields and is delimited by braces. Only after markup
is extracted does the PEP talk about interpreting the contents of the markup.
So, given "{0[a}b]}
Eric V. Smith added the comment:
The intermingling of character data and markup is far from irrelevant: that's
exactly what str.format() does! I don't see how it can be irrelevant to a
discussion of how the string is parsed.
Note that there are no restrictions, in general, on w
Eric V. Smith added the comment:
>From the PEP: "Format strings consist of intermingled character data and
>markup."
--
___
Python tracker
<http://bugs.py
Eric V. Smith added the comment:
"""
>>> d = {"{0}": "spam"}
>>> # a matched pair of braces. What's inside is considered markup.
...
>>> "{0}".format(d)
"{'{0}': 'spam'}"
>>> # a
4001 - 4100 of 6702 matches
Mail list logo