Eric V. Smith added the comment:
Could you provide code which demonstrates the problem?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
You'll need to explain what behavior you're seeing, and how that differs from
what you expect.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Change by Eric V. Smith :
--
Removed message: https://bugs.python.org/msg374930
___
Python tracker
<https://bugs.python.org/issue37625>
___
___
Python-bugs-list m
Eric V. Smith added the comment:
Thanks, Terry. That was my fault, trying to cherry pick manually. I'm not sure
why the original backport failed, and once I did the manual cherry pick as
suggested I got called away for real work. As you say, I should have tried
deleting the tag and re
Eric V. Smith added the comment:
New changeset 52f98424a55e14f05dfa7483cc0faf634a61c9ff by Eric L. Frederich in
branch 'master':
bpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736)
https://github.com/python/cpython/commit/52f98424a55e14f05dfa7483cc0faf634a61c9ff
Eric V. Smith added the comment:
As a rule, we don't put a lot of effort into handling malformed pickle input.
Is this causing some practical problem?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
You're mutating the list while iterating over it, which is causing the behavior
you're seeing. This isn't a bug.
See for example
https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list
Also, when reporting bugs
Eric V. Smith added the comment:
I think deleting the last sentence is sufficient.
--
keywords: +newcomer friendly
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
I think it should be in a new section. But I'd put it as a 16.1.2 and push the
others down. It seems like a more important piece of information than shebangs
and startup files in interactive mode. Or maybe I'd even put it first.
That said, I'm not terribly
Eric V. Smith added the comment:
I think it should be mentioned in
https://docs.python.org/3/tutorial/appendix.html#tut-interac, since that's the
link that https://docs.python.org/3/tutorial/interpreter.html#interactive-mode
uses for it's "for more information" link. This seems li
Eric V. Smith added the comment:
I think this is an excellent idea. The main f-string docs being in a section
titled "Lexical Analysis" never seemed very user-friendly.
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
As an example of why it's not possible for the compiler to treat this as a
syntax error: I use python for my config files. Before I load these files, I
inject names into the builtins, so that the config files can reference them.
Some of these are constants
Eric V. Smith added the comment:
I agree that the example is okay as-is.
Plus, I can't see us using __import__ in examples. "import" is the preferred
way to load modules.
Although now that I think about it, maybe __import__ would fit in with the
subject "Is it possible to w
Eric V. Smith added the comment:
I haven't checked to see what's documented. I'm sure we'd accept a patch that
improves the documentation if it's lacking.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
It would help if you could pare this down to a simpler example, hopefully
removing the '$'.
For example, does the problem still occur if you '$'s? What if you make all of
the non-numeric strings 1 character long? What if you delete the non-numeric
strings
Eric V. Smith added the comment:
I don't think there's a python-level api to find out the "kind", but I can't
say I've looked closely. And there are no doubt problems with doing so and
alternate implementations other than CPython. I'm not sure we want to expose
this implementat
Eric V. Smith added the comment:
> AIUI (though I could be misunderstanding things) `str` objects do use some
> kind of typed array of unicode characters (either 16-bit narrow or 32-bit
> wide).
It's somewhat more complicated. The string data is stored differently depending
on th
Eric V. Smith added the comment:
I'm going to close this as not a python bug. If someone gets some evidence to
the contrary, we can re-open it.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: -> behavior
__
Eric V. Smith added the comment:
This doesn't appear to be a Python bug, but rather an issue with how you're
using PyTorch. I suggest you ask for help on a PyTorch support forum, or maybe
try StackOverflow.
--
nosy: +eric.smith
status: open -> pend
Eric V. Smith added the comment:
I suggest you discuss this on python-ideas, since we'll need to reach consensus
there, first.
--
components: +Interpreter Core -IO, Library (Lib)
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
I agree with Raymond that it's unlikely that this will work, as a practical
matter. In addition to the other problems mentioned, there's the issue of the
many parameters to control pprint.
And I agree with pprint, or a replacement, needing a redesign. I
Eric V. Smith added the comment:
I don't think we'd want to fall back to strtod, but rather to the code we
already use (Gay's). So this would increase our maintenance burden.
I'm also not convinced that we actually spend a lot of time in this code, but
of course profiling would be needed
Change by Eric V. Smith :
--
title: OverflowError still raised when int limited in sys.maxsize ->
sys.setrecursionlimit: OverflowError still raised when int limited in
sys.maxsize
___
Python tracker
<https://bugs.python.org/issu
Change by Eric V. Smith :
--
nosy: +eric.smith, mark.dickinson
___
Python tracker
<https://bugs.python.org/issue41310>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
I think your best bet will be to write a small C extension to find out what's
supported by the processor.
--
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
@rishi93: yes, please do!
--
___
Python tracker
<https://bugs.python.org/issue41045>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
It's using normal %-formatting, so the rules applied are in
https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting
The last line of the last table in that section mentions literal % characters.
I realize it's sort of hard to dig
Eric V. Smith added the comment:
Did you try doubling the % char?
help='%%-age of the value'
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
What would you use this information for, if it were available from Python code?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
You should bring this up on the python-ideas mailing list so that it gets more
visibility.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
Changing versions to those that are currently receiving support.
--
nosy: +eric.smith
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
This appears to just be a misunderstanding: -s is a flag to "unittest
discover", not to "unittest" itself. I think this is clear from the help text,
so I'm closing this.
If I'm incorrect, let me know.
--
nosy: +eric.smith
resol
Eric V. Smith added the comment:
This bug tracker is for reporting bugs in python, not for getting help using
python.
I suggest asking for help on the python-list mailing list:
https://mail.python.org/mailman/listinfo/python-list
Or, since this sounds like you're having problems
Change by Eric V. Smith :
--
components: +email
nosy: +barry, r.david.murray
___
Python tracker
<https://bugs.python.org/issue41145>
___
___
Python-bugs-list m
Change by Eric V. Smith :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41254>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
The formatting specification language is already complicated enough without
adding even more to it. As PEP 378 says "It is not the goal to replace the
locale module, to perform internationalization tasks, or accommodate every
possible convention."
Change by Eric V. Smith :
--
versions: +Python 3.10 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue33754>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
This is a limitation of the parser: the entire f-string is first evaluated as a
string.
Just as
'Hey, {' this quote is wrong.'}'
or
r'Hey, {' this quote is wrong.'}'
are not valid strings, neither is
f'Hey, {' this quote is wrong.'}'
See issue 33754
Eric V. Smith added the comment:
Agreed that this is a duplicate, so I'm closing it.
--
nosy: +eric.smith
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> eval() function in List Comprehension
Eric V. Smith added the comment:
I think waiting until we decide what to do with the parser makes sense. This
problem has been around for a while, and while it's unfortunate I don't think
it's worth heroic measures to fix.
--
___
Python tracker
Eric V. Smith added the comment:
I still see this problem with 3.10, which I thought might have fixed this.
@lys.nikolaou: any ideas on this?
--
components: +Interpreter Core -Library (Lib)
nosy: +lys.nikolaou
versions: +Python 3.10 -Python 3.7, Python 3.8
Change by Eric V. Smith :
--
keywords: +newcomer friendly -patch
___
Python tracker
<https://bugs.python.org/issue41199>
___
___
Python-bugs-list mailin
Change by Eric V. Smith :
--
pull_requests: -20437
___
Python tracker
<https://bugs.python.org/issue41199>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric V. Smith :
Is strnlen() supported by all of the compilers we care about?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
Ned: what are your thoughts on backporting this as a security issue?
https://nvd.nist.gov/vuln/detail?vulnId=CVE-2020-14422
--
nosy: +ned.deily
___
Python tracker
<https://bugs.python.org/issue41
Change by Eric V. Smith :
--
assignee: -> eric.smith
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
Eric V. Smith added the comment:
New changeset b30ee26e366bf509b7538d79bfec6c6d38d53f28 by Ravi Teja P in branch
'master':
bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface
(GH-21033)
https://github.com/python/cpython/commit/b30ee26e366bf509b7538d79bfec6c6d38d53f28
Eric V. Smith added the comment:
AFAIK, we don't guarantee the stability of error messages, so I think
backporting is fine. It's all the better that this is just prefixing something
to an existing error message.
--
___
Python tracker
<ht
Eric V. Smith added the comment:
I think backporting to 3.8 would be okay.
--
___
Python tracker
<https://bugs.python.org/issue41132>
___
___
Python-bugs-list m
Eric V. Smith added the comment:
I don't think I put any thought into it. It was probably just in an example I
was copying from.
I'm not familiar with the difference between those allocators. Why would
pymalloc be preferred?
--
___
Python
Change by Eric V. Smith :
--
components: +macOS
nosy: +ned.deily, ronaldoussoren
___
Python tracker
<https://bugs.python.org/issue41126>
___
___
Python-bug
Eric V. Smith added the comment:
I think it's a good idea.
My only reservation would be: if the parsing of f-strings is moved into the
parser, would it be possible to maintain the error new messages?
--
___
Python tracker
<ht
Eric V. Smith added the comment:
To spoil it for other readers: the linked page says to create a file named
CACHEDIR.TAG with a specific first line.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41064>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Eric V. Smith :
The feature of f-strings using '=' for "debugging" formatting is not documented.
>>> foo = 'bar'
>>> f'{foo=}'
"foo='bar'"
I'm not sure where this should fit in to the documentation, but it needs to be
in there s
Eric V. Smith added the comment:
You should just be using "import index". By using "import index.py", you're
telling the interpreter to first import index, execute the code in it, then
look for a sub-module named "py" (full name: index.py). Since no such
Eric V. Smith added the comment:
Please provide a small script that demonstrates this behavior.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
To be unpickle-able, the code for f needs to be imported, which it can't be
from the repl. Windows has this same issue, due to also not using fork().
>From
>https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled:
> "Thu
Eric V. Smith added the comment:
Changing versions to where the fix would be applied.
--
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue41
Change by Eric V. Smith :
--
keywords: +easy
___
Python tracker
<https://bugs.python.org/issue41004>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Good catch. Your approach seems like a good one.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue41
Eric V. Smith added the comment:
Re-opening this because issue39949 is about match objects, not compiled re
objects.
Still, I don't think the repr "rule" about being eval-able is hard and fast.
Although changing the repr to be in brackets wouldn't be unreasonable just to
drive
Eric V. Smith added the comment:
Ah, I see. I missed that this issue was only about match objects. I apologize
for the confusion.
That being the case, I'll re-open the other issue.
--
___
Python tracker
<https://bugs.python.org/issue39
Eric V. Smith added the comment:
There was a discussion in issue40984 that the repr must be eval-able. I don't
feel very strongly about this, mainly because I don't think anyone ever does
eval(repr(some_regex)). I'd be slightly sympathetic to wanting the eval to fail
if the repr had
Eric V. Smith added the comment:
Any change to the repr should take place on the other issue. I don't feel very
strongly that the repr must be eval-able, but in any event it should be raised
on issue39949 if you feel strongly about it.
I do think it's reasonable to say that if the repr
Change by Eric V. Smith :
--
components: +Regular Expressions -Library (Lib)
nosy: +ezio.melotti, mrabarnett
resolution: not a bug ->
stage: resolved -> needs patch
status: closed -> open
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
I agree with Raymond. There's no real harm being caused here.
--
resolution: -> wont fix
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
What type of changes are you proposing to make?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
You should probably bring this up on the python-ideas mailing list.
--
nosy: +eric.smith
type: -> enhancement
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
I wouldn't have a problem with isinstance(obj, str) for a string check in
strict mode. If you want to write something like a Path, convert it to a string
yourself. That's exactly the behavior I'd like enforced by strict: only accept
numbers and actual
Eric V. Smith added the comment:
I'd prefer a new module just for this. As for names, I like toposort over
topsort.
I already have a library on PyPI named toposort. Personally, I don't have a
problem with the stdlib taking over that name, and I'd just deprecate mine at
3.9, or whatever
Eric V. Smith added the comment:
That seems like a good plan.
--
___
Python tracker
<https://bugs.python.org/issue40825>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
Losing Decimal would be a problem. I use those a lot in CSV files, and I assume
others do, too.
--
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
I guess an isinstance check against numbers.Number would be the best way to
check if an argument is a number. I'm not sure how convenient that is from C
code.
--
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
For backward compatibility, strict would have to default to False.
--
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
I've created issue40825 for adding a "strict" parameter.
--
___
Python tracker
<https://bugs.python.org/issue40762>
___
__
New submission from Eric V. Smith :
Currently, the csv library calls str() on each value it writes. This can lead
to surprising behavior, see issue40762 for example.
On the other hand, for writing the documentation says that the values must be
strings or numbers.
The proposed "s
Eric V. Smith added the comment:
No problem!
It can't reorder fields, because you might not be passing them by name. There's
some discussion about requiring keyword-only parameters, in which case what
you're doing would work (as long as they were keyword-only params).
--
resolution
Eric V. Smith added the comment:
Isn't this error that you're providing a field without a default value after
one with a default value?
What's the exception look like?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
I see. Not sure how I overlooked that. Thanks.
At first blush, I think your approach would work.
--
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
Hmm. That's a regression, at least from 3.7, which is the only version I have
ready access to:
$ python3
Python 3.7.3 (default, Mar 27 2019, 13:36:35)
[GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)] on linux
Type "help", "copyright", "credi
Eric V. Smith added the comment:
> Short of outright banning the use of bytes (raise a TypeError), I think
> the current behaviour is least-worst.
I agree.
I'd like to see the TypeError raised for everything that's not a string or
number (since the docs say that's what's ac
Eric V. Smith added the comment:
To my knowledge, dataclasses works with `from __future__ import annotations`.
If there are specific examples of problems, I'd like to hear about it: please
open a separate issue.
There is a hack (discussed at PyCon 2018 with all of the relevant players
Change by Eric V. Smith :
--
title: str.format() handles trailing zeros inconsistently in “general” format
-> float.__format__() handles trailing zeros inconsistently in “general” format
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
I think I'd just do 3.9 and master. It does seem subtle for a minor release,
when people are less likely to be looking at the release notes.
--
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
For completeness, here's the output using just format, which I prefer over
str.format because there's less going on: it removes all of the str.format
machinery and basically directly calls obj.__format__.
>>> format(1504, '.3g')
'1.5e+03'
>&g
Change by Eric V. Smith :
--
nosy: +mark.dickinson
___
Python tracker
<https://bugs.python.org/issue40780>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
FWIW, which is probably not much with ".g" formatting, this is how Decimal
behaves:
>>> from decimal import Decimal as D
>>> format(D(1504), '.3g')
'1.50e+3'
>>> format(D(1505), '.3g')
'1.50e+3'
>>> format(D(1506
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40780>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Thanks for clarifying, Giampaolo. I'll accept this PR once it's cleaned up.
--
___
Python tracker
<https://bugs.python.org/issue39
Eric V. Smith added the comment:
That's not what I see:
$ python3.8
Python 3.8.0b4 (default, Sep 15 2019, 15:56:44)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> some_dict = {3:4}
&
Eric V. Smith added the comment:
Thanks, @DahlitzFlorian!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
New changeset 983b17ca1319adf9f06d5f2779a44450241eba54 by Miss Islington (bot)
in branch '3.9':
bpo-40730: Remove redundant 'to' (GH-20316) (GH-20318)
https://github.com/python/cpython/commit/983b17ca1319adf9f06d5f2779a44450241eba54
Eric V. Smith added the comment:
Yes, please go ahead.
--
___
Python tracker
<https://bugs.python.org/issue40730>
___
___
Python-bugs-list mailing list
Unsub
New submission from Eric V. Smith :
https://docs.python.org/3.9/whatsnew/3.9.html#optimizations has this sentence:
"Unlike to the := operator this idiom does not leak a variable to the outer
scope.". I'm not exactly sure what it should be. Probably the first "to"
Eric V. Smith added the comment:
Thanks for the info.
It's weird that this is just showing up for you, and I assume works everywhere
else. How are you invoking the compiler, via make, or something else?
And, what's the gcc command line look like when this specific file fails?
I grepped
Eric V. Smith added the comment:
https://stackoverflow.com/questions/7116889/is-module-file-attribute-absolute-or-relative
and https://bugs.python.org/issue18416 might help explain behavior. I agree
it's working as designed.
--
nosy: +eric.smith
Eric V. Smith added the comment:
This is almost surely a problem in your environment, and not a bug in python.
This bug tracker is for reporting bugs in python.
I suggest you look for help elsewhere, such as the python-list mailing list
(https://mail.python.org/mailman/listinfo/python-list
Eric V. Smith added the comment:
"message signatures" -> "function signatures"
--
___
Python tracker
<https://bugs.python.org/issue40646>
___
___
901 - 1000 of 2689 matches
Mail list logo