Change by Eric V. Smith :
--
nosy: +ethan.furman
___
Python tracker
<https://bugs.python.org/issue45546>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I get an error with 3.8.10, but not on the main branch (3.11). I don't have
other versions handy to test.
Removing 3.6, as it's no longer getting bug fixes, and this doesn't look like a
security issue.
--
nosy: +eric.smith
versions: -Python 3.6
Eric V. Smith added the comment:
I think the only other thing that could be done is to have a special test for
"default is type.mro", and if so, don't assume it's a default value. Which
means that you could never actually use:
@dataclass
class A:
mro: object = type.mro
But it'
Eric V. Smith added the comment:
I agree on your analysis. You'll get the same error on any name that type
defines (like __class__), but "mro" looks like the only one without dunders.
I'm not sure the best way to fix this. I'll give it some thought.
Another problem is that
Change by Eric V. Smith :
--
assignee: -> eric.smith
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45531>
___
___
Python-bugs-list mai
Eric V. Smith added the comment:
As a rule, we don’t accept such wholesale changes. If there’s a performance
problem, or a bug, then we’d look at individual cases.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45485>
___
___
Eric V. Smith added the comment:
It sounds like you're using python 2.7, which is unsupported.
You've not even shown us what line produces the error you're seeing. I don't
see "type(a[0])" anywhere in the code you posted.
Lacking a way to reproduce this on our own with python 3.x,
Eric V. Smith added the comment:
If you want us to check if there's a bug in Python here, please reduce this to
5 or 10 lines, with no external dependencies. As it is, we cannot run this code.
You also need to show how you run the program, what version of Python you're
using, and what
Eric V. Smith added the comment:
Thanks for the correction, Ned!
--
___
Python tracker
<https://bugs.python.org/issue45480>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
Please provide a code snippet we can run that demonstrates the problem.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
Sorry, but since this is a 2.7 issue, I'm going to close it here. I know this
isn't the answer you wanted, but this is really the wrong venue.
I suggest you ask on StackOverflow or the python-list mailing list
(https://mail.python.org/mailman/listinfo/python
Eric V. Smith added the comment:
I think https://github.com/python/pythondotorg/issues is the correct place to
report issues with the web site.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
Can you accomplish what you want with .pth files?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
"hide" is not a good name for this.
Does attrs have anything equivalent? This seems like a pretty niche usage, so
I'm not inclined to include it without evidence of a wide-spread need for it.
--
assignee: -&g
Eric V. Smith added the comment:
You should report these problems to the numpy and tensorflow projects. I'm
assuming they don't support 3.10 yet.
--
nosy: +eric.smith
resolution: -> third party
stage: -> resolved
status: open -&g
New submission from Eric V. Smith :
Please explain what "hiding" does.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45446>
___
___
Eric V. Smith added the comment:
Can you provide a short code snippet that we can run that demonstrates the
problem?
Looking at the code, and not knowing much about it, maybe iterating over the
paths with .iterdir() is what you want?
--
nosy: +eric.smith
Change by Eric V. Smith :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
Please report this on the pandas bug tracker:
https://github.com/pandas-dev/pandas/issues
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
I was waiting for someone smarter than me to chime in on one of the discussions.
I wouldn't worry about whether it's a bug or feature, at this point. Assuming
buy-in from type checkers, I'd probably call it a bug, but I can be reasoned
with.
One thing I
Eric V. Smith added the comment:
I'm not clear why you're suggesting this change. Is this additional
functionality, or is the current example broken? Is the text wrong, or just the
code?
--
nosy: +eric.smith
___
Python tracker
<ht
Eric V. Smith added the comment:
You should report this at https://github.com/python/pythondotorg/issues
--
nosy: +eric.smith
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bug
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45384>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
The safest thing to do is never make it the default. It would always be an
opt-in behavior.
--
___
Python tracker
<https://bugs.python.org/issue42
Eric V. Smith added the comment:
What were you expecting?
I think those are correct. See:
>>> ~1
-2
>>> ~0
-1
--
nosy: +eric.smith
___
Python tracker
<https://bugs.
Change by Eric V. Smith :
--
type: compile error -> behavior
___
Python tracker
<https://bugs.python.org/issue44674>
___
___
Python-bugs-list mailing list
Un
Eric V. Smith added the comment:
That's a good idea, Raymond.
>>> [x.__hash__ is None for x in (list, dict, set, frozenset)]
[True, True, True, False]
I don't think this change would cause any backward compatibility issues, except
it would now allow a default of something
Eric V. Smith added the comment:
Please provide code that we can run that shows the problem.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
This isn't a bug. In python, the assignment doesn't make a copy, it makes ts
and s refer to the same object. So there's really only one list to change, and
you can refer to it by either name, ts or s.
--
nosy: +eric.smith
resolution: -> not a
Eric V. Smith added the comment:
Please show what result you're getting, and what result you're expecting. "will
not work" is not very helpful for us to replicate it.
--
components: -2to3 (2.x to 3.x conversion tool)
nosy: +eric.smith
Eric V. Smith added the comment:
The issue is that False is causing a read from stdin, since False == 0.
>>> open(0).readlines()
test
['test\n']
Here I typed "test", followed by Ctrl-D (end of file). readlines() then
completed and printed its result.
I think the basic an
Change by Eric V. Smith :
--
components: +Interpreter Core -Library (Lib)
title: json loads is stuck infinitely when the file name is Boolean -> Reading
from a file is stuck infinitely when the file name is Boolean
type: -> behavior
___
Eric V. Smith added the comment:
You can demonstrate this without the json module:
# python2
>>> open(False)
Traceback (most recent call last):
File "", line 1, in
TypeError: coercing to Unicode: need string or buffer, bool found
# python3
>>> open(False).read
Eric V. Smith added the comment:
When reporting a bug, please give a full example that we can run. I assume
aCounter is of type collections.Counter?
Assuming so, the "1 positional argument" is "self". The second argument is the
number 1, which is an error. So
Eric V. Smith added the comment:
For those not in front of a computer, the error is:
>>> l = l + 'de'
Traceback (most recent call last):
File "", line 1, in
TypeError: can only concatenate list (not "str") to list
Eric V. Smith added the comment:
Thanks for the improvement, @sobolevn!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
New changeset 8d8729146f21f61af66e70d3ae9501ea6bdccd09 by Nikita Sobolev in
branch 'main':
bpo-20524: adds better error message for `.format()` (GH-28310)
https://github.com/python/cpython/commit/8d8729146f21f61af66e70d3ae9501ea6bdccd09
Eric V. Smith added the comment:
I agree this should be rejected due to pointlessness and complexity.
I'll give my usual advice: if you really want to see this happen, I suggest
opening a discussion on the python-ideas mailing list. Then if there's
consensus to go ahead, this issue can
Eric V. Smith added the comment:
> log_dir = Path('logs/{date}')
> log_file = Path(str(path).format(time.strftime('%Y-%m-%d')) / 'log.txt'
(I think you're missing "date=" in the call to .format().)
Could you show what you think this would look like if Path.__format__ existed
Eric V. Smith added the comment:
This is documented in the tarfile docs:
Warning
Never extract archives from untrusted sources without prior inspection. It is
possible that files are created outside of path, e.g. members that have
absolute filenames starting with "/" or filename
Change by Eric V. Smith :
--
type: behavior -> enhancement
versions: -Python 3.10
___
Python tracker
<https://bugs.python.org/issue45165>
___
___
Python-
Eric V. Smith added the comment:
Why would you only want alignment, and not all string formatting options?
And if that's the case, just convert it to a string:
>>> f'{None!s:>8} {1:>8}'
'None1'
--
nosy: +eric.smith
___
Eric V. Smith added the comment:
Changes merged to master and 3.10. Thanks, everyone!
@pablogsal: You can merge this to 3.10.0 if you see fit, but I'm going to close
this issue.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -&g
Eric V. Smith added the comment:
Can you simplify this to not use any external libraries?
--
components: -IO, Windows
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
@pablogsal: You might want to merge this back to 3.10.0, once it's merged to
3.10. I'll merge it shortly, once the tests have run.
--
keywords: -patch
nosy: +pablogsal
stage: patch review ->
___
Python trac
Eric V. Smith added the comment:
Thanks to both of you. Unfortunately, I have to pick one PR to use, and since
dlintin had the earlier one, I'll use it.
--
___
Python tracker
<https://bugs.python.org/issue45
Eric V. Smith added the comment:
Please see the dev guide https://devguide.python.org/ for setting the
description of the PR. If it's set correctly, the PR will be attached to this
issue.
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45147>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric V. Smith :
--
keywords: +easy, newcomer friendly
___
Python tracker
<https://bugs.python.org/issue45147>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
The intent was that asdict() returns something that, if mutated, doesn't affect
the original object tree. I'd sort of like to just deprecate it, it's got a lot
of corner cases that are poorly handled.
It probably needs the same kind of controls
Eric V. Smith added the comment:
I was using str.join() as an analogy. I apologize if that was confusing.
I'll state this as clearly as I can: I don't think shlex.join() should
automatically convert any arguments to str, not even those that are Path's.
Nothing is going to be solved
Eric V. Smith added the comment:
My point is that shlex.join() shouldn’t convert any arguments to strings, no
matter their type. Just like str.join() doesn’t, and for the same reason.
Within the last few years there was a discussion on making str.join()
auto-convert it’s arguments to str
Eric V. Smith added the comment:
I disagree. In my mind, there's no more reason for shlex.join() to take Path
objects than there is for str.join() to take them, or for shlex.join() to
convert int's to str's. I'd rather shlex.join() continue to raise an exception
if passed something that's
Eric V. Smith added the comment:
Sorry I didn't notice your reference to issue 45081.
--
___
Python tracker
<https://bugs.python.org/issue45121>
___
___
Pytho
Eric V. Smith added the comment:
Per PEP 545, you should probably raise this on the doc-sig mailing list
(https://mail.python.org/mailman/listinfo/doc-sig), and/or one of the repos
https://github.com/python/python-docs-zh-cn or
https://github.com/python/python-docs-zh-cn.
I'm going
Eric V. Smith added the comment:
Possibly related to issue 45081, which ended up not having anything to do with
dataclasses (despite the title).
Can you check if that fix solves your problem?
--
nosy: +eric.smith
___
Python tracker
<ht
Eric V. Smith added the comment:
I don't think it really makes a difference, but here's some background:
For f-strings, the parser itself does not break apart the f-string into
(, ) parts. There's a custom parser (at
https://github.com/python/cpython/blob
Eric V. Smith added the comment:
I (and many others) think the error message is fine the way it is. Also, it's
hard for the error to be more specific about the method it's being called on.
But if you have some concrete suggestions that can be implemented, you can add
them to this issue
Eric V. Smith added the comment:
You said:
"""
b''.split(',') # gives strange error message.
TypeError: a bytes-like object is required, not 'str'
"""
It is not a strange error message. You passed in a str (the ','), and yo
Eric V. Smith added the comment:
This is working as designed. The error is telling you that the argument to
bytes.split() must be a string:
>>> b''.split(',')
Traceback (most recent call last):
File "", line 1, in
TypeError: a bytes-like object is required, not 'st
Eric V. Smith added the comment:
I think it's basically this error:
>>> num]
File "", line 1
num]
^
SyntaxError: unmatched ']'
Although I'd have to look at it more to see why that's the error it chose to
display, instead
Eric V. Smith added the comment:
I think the error is short for "I found a ']' without a matching '['".
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.o
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45081>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
It looks like they want to add a RatinMaze.py demo program, which solves a maze.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue45
Change by Eric V. Smith :
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue44993>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I think everyone understands, we just feel that it doesn't matter.
You can see if PEP 435 answers your question.
Changing to an enhancement request for 3.11, for the proposal to add a optional
argument to auto().
--
nosy: +ethan.furman
type
Eric V. Smith added the comment:
Other than it’s not what you expect, do you have a concrete example of what
problem this is causing you?
We’re unlikely to change anything without knowing what problem is being solved.
--
nosy: +eric.smith
Eric V. Smith added the comment:
Well, as you note, technically object.__init__ does take args and kwargs. It
just raises an exception if if finds any. What are you proposing to change here?
--
components: -Distutils, Parser
nosy: +eric.smith
Eric V. Smith added the comment:
How about making it an error to have non-NFKC normalized names in __all__?
--
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
I'd be okay with changing it to a 3.11 enhancement to normalize elements of
__all__, or maybe a request to change the documentation.
--
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
Python normalizes identifiers with NFKC (see PEP 3131):
>>> e0 = "ϵ"
>>> import unicodedata
>>> e1 = unicodedata.normalize("NFKC", e0)
>>> e0 == e1
False
>>> unicodedata.name(e0)
'GREEK LUNATE EPS
Eric V. Smith added the comment:
To be clear, by "file", you mean python source file, or I guess .pyc file if
only that exists. I can't say I've given it much thought. What about built-in
modules? Or frozen modules?
I'm not sure this is a great idea. In general, we've frown
Eric V. Smith added the comment:
I agree this doesn’t belong in the stdlib. For future reference, my principal
objections are 1) the need to manage and distribute per-language dictionaries
and 2) difficulty in determining the best algorithm for the stdlib. There are a
lot of ways to tweak
New submission from Eric V. Smith :
This has been discussed and rejected in at least issue 27295 and issue 42240,
and probably others.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
Thank you for the suggestion.
Hyphenation seems like a niche requirement to me, probably too niche and with
too many design decisions to include it in the stdlib. It's also not clear to
my why PyHyphen would be the best option for this, as opposed
Eric V. Smith added the comment:
You're importing main.py twice. The first is when you run "python main.py",
where it has the module name '__main__'. The second time is in codegen.py,
where it has the name 'main'. You create the AtomX instance as __main__.AtomX,
but the isinst
Eric V. Smith added the comment:
I get a circular import error:
Traceback (most recent call last):
File "main.py", line 1, in
import codegen
File "/cygdrive/c/home/eric/codegen.py", line 1, in
from main import AtomX
File "/cygdrive/c/h
Eric V. Smith added the comment:
This a limitation of the floating point type that python uses. See
https://docs.python.org/3/tutorial/floatingpoint.html
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -&g
Eric V. Smith added the comment:
Because this is a usage question and not a bug, you'll get more help using the
python-list mailing list or Stack Overflow, or some other Q forum.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
As to the actual problem, I think you're going to need to get out a debugger
and at least get a stack trace.
--
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
> P.S. The tarball I attached before contains the configure and make output for
> tests on multiple python version branches. I differentiated them by adding a
> version identifier suffix (_3.7, _3.8, _3.9, _3.10, _3.11)
I was referring to the two fi
Eric V. Smith added the comment:
Rather than have us wading through all of the output, can you summarize the
problem? After a brief look I don't see any actual compiler errors.
In make.out_3.9, at least, it looks like "generate-posix-vars failed", but I
can't see why. What does
.
Eric V. Smith added the comment:
Use filecontent.getvalue():
https://docs.python.org/3/library/io.html#io.BytesIO.getvalue
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracke
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41779>
___
___
Eric V. Smith added the comment:
But that's a perfectly valid filename:
$ mkdir -p adl://myblob.azuredatalakestore.net/local/abc/xyz
$ ls -R adl:
'adl:':
myblob.azuredatalakestore.net/
'adl:/myblob.azuredatalakestore.net':
local/
'adl:/myblob.azuredatalakestore.net/local':
abc/
'adl
Eric V. Smith added the comment:
pathlib is not designed to support URIs, so this behavior is not surprising.
You want to use a different library, maybe urllib.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
There's really no way we'd consider breaking possibly millions of working
programs to change the parameter names. I guess you could come up with some way
of supporting both sets of parameter names, but I doubt we'd accept that,
either.
While maybe
Eric V. Smith added the comment:
@krey: What's your suggested change? We can change neither the parameter order
nor parameter names without breaking code, so that won't happen.
You created this as a documentation issue. Do you have a suggested
documentation change?
--
nosy
New submission from Eric V. Smith :
Since this is not a bug in Python, this is not the appropriate place to ask. I
suggest you try the python-list mailing list
https://mail.python.org/mailman/listinfo/python-list
And I don't know what it means. I've never heard of that saying before
Eric V. Smith added the comment:
I don't know, and this isn't the right place to ask (since this is not a bug in
Python). I suggest you ask on a VideoCapture specific forum.
--
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
Please do no post screen captures. Copy and paste the text into the bug report.
It looks like VideoCapture has not released a 3.9 compatible wheel file on
PyPI. You should follow up with that project directly, as it is not part of
python’s standard library
Eric V. Smith added the comment:
Please show us an example that demonstrates your problem. Show us the code you
tried, what you expected to happen, and what actually happened. Otherwise we
can’t help you.
--
nosy: +eric.smith
___
Python tracker
Change by Eric V. Smith :
--
components: +Interpreter Core -Unicode
___
Python tracker
<https://bugs.python.org/issue44683>
___
___
Python-bugs-list mailin
Change by Eric V. Smith :
--
assignee: -> eric.smith
___
Python tracker
<https://bugs.python.org/issue44799>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44799>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
It's dependent on the platform's C library's strftime(). I think (but don't
promise) that we document the C89 codes, but each platform might provide
additional ones.
--
nosy: +eric.smith
___
Python tracker
<ht
Eric V. Smith added the comment:
I agree with Raymond that this should be rejected.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue44
Eric V. Smith added the comment:
I agree with Steven, but since I have this typed up I'll post it here.
Yes, iterability is another namedtuple feature. Although that would actually be
easy to add to dataclasses, so I didn't mention it.
I don't really see the point of combining them, except
Eric V. Smith added the comment:
namedtuples have features like true immutability, being smaller, and being
faster.
--
versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue44
301 - 400 of 2689 matches
Mail list logo