Eric V. Smith added the comment:
It would be good if someone could convert this to a pull request and beef up
the tests.
--
___
Python tracker
<https://bugs.python.org/issue27
Eric V. Smith added the comment:
I agree with Victor.
--
___
Python tracker
<https://bugs.python.org/issue39380>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
I agree it's not a bug. It's a known difference between Windows and Linux, due
to fork() semantics.
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
What versions of Windows were involved? Are the versions of Python the same?
What's the exact version? Best would be the 2 lines you get after running
python, like:
$ python3
Python 3.7.4 (default, Jul 21 2019, 14:43:25)
[GCC 7.4.0] on cygwin
Please pr
Eric V. Smith added the comment:
So are you saying that you see this problem on the current version of Windows
that you're running, but whether or not you see the problem depends on if the
file was created before or after you updated Windows? How are you creating
these files?
Does the
Eric V. Smith added the comment:
I don't see a problem here. Your first file has more lines, so it produces more
output than the second file. Presumably the difference in output you see when
you run your program is a result of this. But since we can't see the code, we
can'
Eric V. Smith added the comment:
I think it's important that logging has this feature for the reasons stated, so
it should be documented.
And hopefully it's also tested for, but I haven't looked.
--
assignee: -> docs@python
components: +Documentation -Library
Eric V. Smith added the comment:
The problem is that __doc__ is set at compile time, not run time. The ''.format
call (and f-strings) are evaluated at run time.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
>From the documentation:
>https://docs.python.org/3/library/stdtypes.html#str.isalpha
Alphabetic characters are those characters defined in the Unicode character
database as “Letter”, i.e., those with general category property being one of
“Lm”, “Lt
Eric V. Smith added the comment:
That last line should have been "I'm assuming those characters all have one of
these properties."
I'm going to close this issue. If you still think there's a bug here, you can
let us know why and reopen this issue.
--
resolu
Eric V. Smith added the comment:
I think it's a bad design to overload a function based on the type of am
argument. I realize the stdlib does this in a number of places, for older
functions. I don't think we'd add such a function today.
I might not object to a new pickle API
Eric V. Smith added the comment:
Thanks for the bug report! I'll mark it "fixed". If there's more to do, let us
know.
--
resolution: -> fixed
___
Python tracker
<https://
Eric V. Smith added the comment:
Note that dataclasses will break without annotations.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
In the future, please use the python-tutor or python-list mailing lists if you
need help. If you still think you've found a bug in python, then open an issue
here.
https://mail.python.org/mailman/listinfo/tutor
https://mail.python.org/mailman/listinfo/p
Eric V. Smith added the comment:
NotImplemented is documented as only being used for binary operators:
https://docs.python.org/3/library/constants.html#NotImplemented
Changing that seems like a pretty large issue. I'd suggest discussing this on
python-ideas.
Maybe better for your situ
Eric V. Smith added the comment:
Do we really want this to be just an assert, or do we want to raise another
type of exception? I think it's showing a real programming error that we
wouldn't want to throw away with -O.
--
nosy: +
Eric V. Smith added the comment:
See https://docs.python.org/3.8/tutorial/floatingpoint.html
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
Can you tell us what platform you're on? Also, please include the header that's
printed out when you run python from the command line. For example, mine shows:
$ python3
Python 3.7.6 (default, Jan 30 2020, 10:29:04)
[GCC 9.2.1 20190827 (Red Hat 9.
Eric V. Smith added the comment:
I thought that strptime is platform specific (which is why I asked for the
platform info). But, looking at the existing docs
https://docs.python.org/3.5/library/time.html#time.strptime
"But strptime() is independent of any platform and thus doe
Eric V. Smith added the comment:
This looks like a problem in zmq, pyzmq, or mysql-connector-python, not in
python itself. I'd suggest asking in a mysql-connector-python specific location
for starters.
You should also try to duplicate the problem without importing zmq, which
doesn
Eric V. Smith added the comment:
I'm going to close this. If you can provide information on how to reproduce
this and/or what you observe in the segfault dump, we will happily reopen it.
I think the best "resolution" tag is to call this "third party", but I'm
Eric V. Smith added the comment:
You probably want to bring this up on the python-ideas mailing list for
discussion. Features like this typically get discussed there first.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.
Eric V. Smith added the comment:
This basically comes down to """\u""" not being a valid string.
I'm not sure why you'd expect this to work: triple quoted strings are not
designed as a general purpose "comment out" facility, and as you'
Eric V. Smith added the comment:
This isn't a bug. See the 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
resolution: -> not a bug
stage: -> resolved
status: ope
Eric V. Smith added the comment:
I'm not sure which of the libraries is the 3d plotting library you're referring
to (maybe matplotlib?), but in any event it doesn't ship with python, so this
isn't the appropriate bug tracker to report your issue. If it is matplotlib,
th
Change by Eric V. Smith :
--
resolution: -> third party
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue40274>
___
___
Python-bugs-
Eric V. Smith added the comment:
I'm marking it as a release blocker, as I believe that's the correct priority
if it must be done before the 2.7.18 release.
--
nosy: +eric.smith
priority: normal -> release blocker
___
Python tr
Eric V. Smith added the comment:
This appears to be a problem in a third-party library: torch.
You didn't include any code example that triggers the problem. Without some way
to duplicate this issue, there's not much we can do about it.
--
nosy: +
Eric V. Smith added the comment:
Unless the original poster can provide more information (and preferably a way
to reproduce this), I'm going to close this.
--
status: open -> pending
___
Python tracker
<https://bugs.python.org
Eric V. Smith added the comment:
Thanks, Rémi.
Nino: Please don't ask help questions on the bug tracker, only report bugs
here. For general questions you can try the python-list mailing list or Stack
Overflow.
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> reso
Eric V. Smith added the comment:
FWIW, that time.struct_time value is:
>>> d
time.struct_time(tm_year=2020, tm_mon=4, tm_mday=16, tm_hour=19, tm_min=12,
tm_sec=35, tm_wday=3, tm_yday=107, tm_isdst=1)
I don't get an error on 3.7.4 from Cygwin or 3.7.6 fro
Eric V. Smith added the comment:
Agreed that shlex.quote is working as intended. It's goal is to pass something
to the shell, preserving it just as you started with it. It exists exactly
because you want to avoid shell globbing and parsing issues (consider filenames
that contain space
Eric V. Smith added the comment:
I meant to add: it's possible that this isn't well documented.
--
___
Python tracker
<https://bugs.python.o
New submission from Eric V. Smith :
RFC 3691 from 2004 adds support for the UNSELECT command as an extension
capability. https://tools.ietf.org/html/rfc3691
imaplib does not support UNSELECT.
--
components: Library (Lib)
messages: 367165
nosy: eric.smith
priority: normal
severity
Eric V. Smith added the comment:
If you have more information, please provide it and re-open this issue.
--
resolution: -> rejected
stage: -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
What would be the full specification of this? If you want to use it for column
names, what happens if the string starts with a $, or some character that can't
be used by your particular database?
I'm skeptical that this could be general purpose en
Eric V. Smith added the comment:
>From earlier in this issue: https://bugs.python.org/msg366164
> So a slightly shorter example uses ru''. This is an error because you can't
> combine the r prefix and the u prefix (in fact you can't combine anything
> with
Eric V. Smith added the comment:
I think you're right, since rb obviously works, too. I just wanted to make sure
we're covering all the bases. There's some code in either the stdlib or the
test suite where I generate all of the valid prefixes (it's something like 80
pre
Eric V. Smith added the comment:
So then it appears the snake case function couldn't be used for database column
names, without some additional processing. So, what is the use case for it?
I just don't see a lot of use for this.
--
Eric V. Smith added the comment:
I remain unconvinced, but I'm only one person. You might want to bring this up
on python-ideas to see if it can get some more support.
But be aware this is going to have much less support that the recent PEP 616
removeprefix/removesuffix discussion,
Eric V. Smith added the comment:
> One can also argue why python need to maintain str conversion at all if we
> have such good extensions in different libs.
Back when we were starting python 3.x there was discussion or removing these
from str and bytes, but it was decided that br
Eric V. Smith added the comment:
Thanks for the suggestion and the discussion. I'll close the issue.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
New submission from Eric V. Smith :
list.extend modifies the list in place. Like most mutating methods in python,
it does not return the thing being modified.
Everything is working correctly, and it's documented this way.
--
nosy: +eric.smith
resolution: wont fix -> not a b
Eric V. Smith added the comment:
aux is equal to 1. You're seeing the refcount of the number 1.
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Eric V. Smith added the comment:
You should tell us what you're seeing, and what you're expecting.
I'm adding the rest of this not because it solves your problem, but because it
might help you or someone else troubleshoot this further.
Here's a simpler reproducer:
impo
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40470>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
This is not the place to ask for help programming with python. What you're
seeing is that your attribute_set or attribute_names mapping are missing
whatever data you think should be present.
I suggest you ask for help on the python-list or python-
Eric V. Smith added the comment:
What editor are you using? What platform? What file are you trying to edit?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40
Eric V. Smith added the comment:
It would be good if there were some way of unifying existing usage with
positional-only and keyword-only parameters, and also supporting inheritance
for dataclasses that use these features at various points in the hierarchy. I
don't have any big ideas
Eric V. Smith added the comment:
I'm going to close this. @Coder436: If you have more information that points to
a python bug, please attach it and reopen this issue.
--
resolution: -> not a bug
stage: -> resolved
status: ope
Eric V. Smith added the comment:
This isn't doing what you think. Because you throw away the object after
computing its id, the same memory is reused and you get the same id. Consider:
>>> a = [1,2,3]
>>> b = [3,4,5]
>>> id(a[:]) == id(b[:])
True
There
Eric V. Smith added the comment:
sorted() does not just delegate to list.sort(): it sorts any iterable.
>>> sorted({0:1,2:3,-1:4})
[-1, 0, 2]
I think your change conflates the two by pointing to list.sort() from sorted().
--
nosy: +e
Eric V. Smith added the comment:
I still think it's a mistake to point to list.sort() from sorted(). If anything
I think it should be the other way around.
We'll see what other people think.
--
___
Python tracker
<https://bu
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue40583>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
This is not an annotations-only issue. This is no different from:
import re
class MyClass(object):
def re(self):
pass
m = re.Match
Which gives the same error. It's being evaluated at class scope.
--
nosy: +eric.
Eric V. Smith added the comment:
Wouldn't float64's __round__ method be in complete control of this? For
python's float:
>>> x = 3.4
>>> type(x.__round__(1))
>>> type(x.__round__())
And Decimal:
>>> from decimal import Decimal
>>
Eric V. Smith added the comment:
I wish the abbreviation behavior was opt-in instead of opt-out, but such is
life.
Closing as not a bug.
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: -&
Eric V. Smith added the comment:
Since this is documented behavior
(https://docs.python.org/3.8/library/json.html#infinite-and-nan-number-values),
we can't change it by default without breaking code.
What JavaScript JSON encoders and decoders specifically have a problem with
this beh
Eric V. Smith added the comment:
I think that's reasonable, although I could see someone objecting ("just use
simplejson instead").
I suggest discussing this on the python-ideas mailing list and see what people
think over there. It might help to create a PR first, if it'
Eric V. Smith added the comment:
But this is no different from every other mutable class variable in Python:
class Base:
data = {}
class Alpha(Base):
pass
class Beta(Base):
data = {}
Alpha.data['injected'] = bool
assert Alpha.data is Base.data
Beta.data['injecte
Eric V. Smith added the comment:
Perhaps it should be better documented. I don't see the behavior changing.
--
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
I don't think we want to generate output no matter what. Should datetime
instances become null instead of raising an exception?
Are there types other than float where some values are json serializable and
others a
Eric V. Smith added the comment:
Won't either one work, since "Include" is in the "search path"? Is this causing
an actual problem? You have this marked as "compile error", but haven't shown
any information about the error, such as what compiler, how
Eric V. Smith added the comment:
It's a common convention to show a function with parens, even if it can't be
called with no arguments. I don't think we want to make that table visually
more complex by including all of the message signatures. open() has 8 params,
min()
Eric V. Smith added the comment:
I think it should be closed.
--
___
Python tracker
<https://bugs.python.org/issue40633>
___
___
Python-bugs-list mailin
Eric V. Smith added the comment:
"message signatures" -> "function signatures"
--
___
Python tracker
<https://bugs.python.org/issue40646>
___
___
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue42482>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Here's the smallest reproducer I could come up with. It fails on Windows with
3.9 native(compiled locally) (Fatal Python error: _Py_CheckRecursiveCall:
Cannot recover from stack overflow), works (raises RecursionError) with cygwin
3.8.3.
import os
Eric V. Smith added the comment:
Note that changing the os.fstat line to just "raise OSError()" no longer causes
the "Fatal Python error", but rather gives the expected recursion exception.
Here's a shorter version that causes the fatal error in Windows native 3.9,
Eric V. Smith added the comment:
These changes are a big improvement. Thanks, Mark. Should this issue be closed,
or are you thinking of more changes?
Personally I think we should leave it as it is now, and open another issue if
people find fault with the new docs
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42437>
___
___
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue42506>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
This appears to be similar to issue42488, which it looks like you also
reported, with a different account.
It's not clear to me why you expect the output to be False. But in any event,
this is not a bug in Python.
>>> 100 ^ 1000
908
Please
Eric V. Smith added the comment:
Although I'm not sure the existing message needs changing, if a change is going
to be made I think listing the valid option characters might be more useful.
--
nosy: +eric.smith
___
Python tracker
&
Eric V. Smith added the comment:
I don't think making a change would be worth the risk.
--
nosy: +eric.smith
priority: low -> normal
versions: +Python 3.8 -Python 3.10
___
Python tracker
<https://bugs.python.org
Eric V. Smith added the comment:
You've not said what happens, nor what you're expecting to happen, so we cannot
help you.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.o
Change by Eric V. Smith :
--
resolution: -> out of date
stage: -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
I think this would be a type, not an action.
I'm not sure this would pass the bar of something that should be added to the
stdlib. But in any event, it should be developed on PyPI first, perhaps by
adding it to argparse-types.
--
nosy: +eric.
Eric V. Smith added the comment:
Hi, Austin.
If it's something that can be implemented in a library (which this suggestion
qualifies as), then we typically want to see it on PyPI and to gain some
traction there. I only suggested argparse-types because it also has some
argparse add-ons
Eric V. Smith added the comment:
The more I think about this, the more I think it shouldn't be in the stdlib.
paul.j3 is correct that the simple case is just type=pathlib.Path.
For something more adventurous you could start with:
@dataclass(eq=True, frozen=True)
class Argumen
Eric V. Smith added the comment:
This is a FAQ:
https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash
Raw strings can't end with an odd number of backslashes.
--
components: -Windows
nosy: +eric.smith
resolution: -> not a b
Eric V. Smith added the comment:
This code is working as expected, so I'm closing this.
--
nosy: +eric.smith
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Eric V. Smith added the comment:
And thanks, Dennis, for the explanation as to why it's the expected behavior.
--
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
This seems way too special case for the stdlib, and especially not as a
builtin. I've never seen this pattern before. Why is copy so special?
I suggest raising this on the python-ideas mailing list if you'd like to get
some traction for it.
-
Eric V. Smith added the comment:
You have the parameters to strptime backward.
>>> datetime.datetime.strptime(datetime.datetime.now().strftime("%c"), "%c")
datetime.datetime(2020, 12, 16, 20, 51, 38)
--
nosy: +eric.smith
_
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
type: -> behavior
___
Python tracker
<https://bugs.python
Eric V. Smith added the comment:
I think you could achieve this by overriding convert_arg_line_to_args.
If this were baked in to argparse, there would need to be an argument to
argparse.ArgumentParser to turn on this behavior, with the default being to not
support comments. That's be
Eric V. Smith added the comment:
Have you tried returning an empty list?
--
___
Python tracker
<https://bugs.python.org/issue42677>
___
___
Python-bugs-list m
Eric V. Smith added the comment:
New changeset 09a36cdfb7c22f44df45b44e5561776206bcedfb by sblondon in branch
'master':
bpo-41724: Explain when the conversion is not possible with detect_types
enabled (GH-23855)
https://github.com/python/cpyt
Eric V. Smith added the comment:
New changeset a34ab8188e0352e4066da4f79ed3cc24d1b61a63 by Miss Islington (bot)
in branch '3.9':
bpo-41724: Explain when the conversion is not possible with detect_types
enabled (GH-23855) (GH-23862)
https://github.com/python/cpyt
Eric V. Smith added the comment:
New changeset 24862b02dfd1e2843727f28fa2ba05828fdfa8de by Miss Islington (bot)
in branch '3.8':
bpo-41724: Explain when the conversion is not possible with detect_types
enabled (GH-23855) (GH-23863)
https://github.com/python/cpyt
Eric V. Smith added the comment:
Thanks for the PR!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
New changeset 409ce4a09e4f96ca9b251c19f5819205aae9ae34 by Miss Islington (bot)
in branch '3.9':
bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23870)
https://github.com/python/cpython/commit/409ce4a09e4f96ca9b251c19f58192
Eric V. Smith added the comment:
New changeset 81f706d2db0f57c4fdd747df6e0a4cffcbc54704 by Miss Islington (bot)
in branch '3.8':
bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23871)
https://github.com/python/cpython/commit/81f706d2db0f57c4fdd747df6e0a4c
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 documenting this with globals() and locals() is a good idea. That's the
place this is most likely to trip someone up.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
Do you have any benchmarks to show this is an actual improvement? Often times
it is not.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue42
Eric V. Smith added the comment:
@samuelmarks:
A place where there it is possible to improve performance is with f-strings
replacing %-formatting or str.format. This does move significant work to
compile time.
However, we'd be unlikely to accept a wholesale stdlib change that swaps
Eric V. Smith added the comment:
> Wait I don't understand why you wouldn't accept a wholesale replacement of
> all `%` and `format` with f-strings through the entire CPython codebase
> [master branch]?
For such a large change it's difficult to review every single
Eric V. Smith added the comment:
See https://github.com/ikamensh/flynt#dangers-of-conversion for reasons.
Would I like to see all string literal formatting done with f-strings? Yes!
Would I accept the risk and hassle of doing it blindly? No
901 - 1000 of 2699 matches
Mail list logo