Alex added the comment:
Ugh, I haven't had the time to work on this, just wanted to note that this now
applies to 2.7 as well since set literals were backported.
--
___
Python tracker
<http://bugs.python.org/i
Alex added the comment:
David, I think it should use frozen set since doing it this way could actually
increase the time the operation takes (which is certainly not our goal!). Plus
marshall.c already handles frozenset, so I don't think it's that much
Alex added the comment:
The patch looks more or less right to me (but I'm far from an expert). It
needs tests in the peephole tests though.
--
___
Python tracker
<http://bugs.python.org/i
New submission from Alex :
Basically whenever you have a LOAD_CONST opcode, follwed by a LOAD_ATTR
you can replace both with a single LOAD_CONST. This optimizes things
like ", ".join or "{} {}".format (in my totally unscientific byte code
hackery it's about a 30% s
Alex added the comment:
Here's my work so far, it seems to work as described. Except for the
fact that pyc creation with anything containign something with this
optimization will give a valueerror on bad marshall data, from trying to
marshall the method I assume.
--
keywords: +
Alex added the comment:
Small update so I don't change whitespace all over the plcae.
--
Added file: http://bugs.python.org/file14099/python_const_fold.diff
___
Python tracker
<http://bugs.python.org/i
Alex added the comment:
Switch to using memset instead of a forloop.
--
Added file: http://bugs.python.org/file14100/python_const_fold.diff
___
Python tracker
<http://bugs.python.org/issue6
Alex added the comment:
I now *almost* have PyCFunctions marshalling, they seem to marhshall ok
but fail on unmarshalling. I think the whitespace stuff may have crept
back in, sorry :(
--
Added file: http://bugs.python.org/file14101/python_const_fold.diff
Alex added the comment:
Optimization now works in the shell fine, and
marshal.loads(marshal.dumps(''.join)) works fine in the shell. However
when I try to run the tests the import of collections.namedtuple causes
the ValueError bad marshal data to appear, and I don't know why.
Alex added the comment:
Fully functional.
--
Added file: http://bugs.python.org/file14106/python_const_fold.diff
___
Python tracker
<http://bugs.python.org/issue6
New submission from Alex :
We do the same thing for a BUILD_LIST followed by a COMPARE_OP (in).
--
components: Interpreter Core
messages: 106008
nosy: alex
priority: normal
severity: normal
status: open
title: BUILD_LIST followed by BINARY_SUBSCR can be optimized to a BUILD_TUPLE
if
Alex added the comment:
Gah, I lost track of this one after I realized the bug I was chasing after
(originally thought to be in PyPy's zipimpoter) was actually in Django. I'll
try to get to this over the weekend.
--
___
Python trac
Alex added the comment:
The ClearWindow.py extension works well with the specified shortcut, How can i
invoke it in my source code to clear the window ? Thanks in advance.
--
nosy: +Alex
type: enhancement -> resource usage
versions: +Python 2.7 -Python
New submission from Alex:
1. I created file ("C:\Users\Alkor\Desktop\a3434.raw") on my desktop
2. Tried to get the file name from the absolute path
Actual result:
C:\Users\Alkor>python
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on
win32
Type "
New submission from Alex:
In class HelpFormatter, class _Section, format_help(self)
(lines 199 & 200), the two lines
for func, args in self.items:
func(*args)
aren't necessary; the results of func are ignored.
"func" is applied (again) on the
New submission from Alex:
Hi!
I'm nube and just learning, but found weird thing
5 * 1.1 equals 55000.001, but that's not wright.
I'm using 3.5.1 Shell. My friend checked - his got the same result.
So is it a bug or a feature?
--
components: IDLE, Windows
m
Alex added the comment:
Wow. Thanks!
--
___
Python tracker
<http://bugs.python.org/issue25975>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alex:
This code is meant to take a filename and a list of integers as arguments. The
filename is required, the integers are optional:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('filename')
parser.add_argument('-L', metavar
Alex Waygood added the comment:
Another option for code using Python <3.11, that will work without the `from
__future__ import annotations` import, is to do something like this:
```
from graphlib import TopologicalSorter
x: 'TopologicalSorter[str]' = TopologicalSorter({&quo
Alex Waygood added the comment:
My opinion is that supporting `GenericAlias` here would be a bad idea.
Associating an implementation of the function with the argument type
`list[str]` is ambiguous. Would this implementation be called if any argument
of type `list` was supplied, or would it
Alex Waygood added the comment:
It would be well worth it to improve the error message, however:
```
>>> from functools import singledispatch
>>> @singledispatch
... def func(arg):
... raise NotImplementedError
...
>>> @func.register
... def _(arg: list[str])
Alex Waygood added the comment:
The above traceback is because the `isinstance(list[str], type)` check at
Lib/functools.py:848 evaluates to `True`. Related: #45665.
--
___
Python tracker
<https://bugs.python.org/issue46
Alex Waygood added the comment:
#46032 is related to this issue.
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45665>
___
___
Python-bug
Alex Waygood added the comment:
This is awesome! Should a note be added to the functools documentation
mentioning the new feature? (Genuine question — I'm not sure whether it's
necessary myself.)
--
___
Python tracker
<https://bu
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46013>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
The PR looks good to me. I think it's also important that we document that
these types aren't supported, as it's not mentioned anywhere at the moment.
Related: Issue34498.
--
nosy: +uriyyo
___
Change by Alex Waygood :
--
components: +Documentation
type: enhancement -> behavior
___
Python tracker
<https://bugs.python.org/issue46032>
___
___
Python-
Alex Grönholm added the comment:
OpenSSL 1.1.1 also handled EOFs strictly, but this behavior was generally
suppressed in the ssl module through the default setting of
suppress_ragged_eofs=True (thus enabling truncation attacks by default). The PR
changes the behavior of existing applications
Alex Waygood added the comment:
Closing this, as I don't think the use case I presented is strong enough, and
there are ultimately more important things to worry about.
--
resolution: -> not a bug
stage: patch review -> resolved
status: ope
Change by Alex Waygood :
--
pull_requests: +28298
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/30077
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: -AlexWaygood
___
Python tracker
<https://bugs.python.org/issue45729>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
versions: -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue45985>
___
___
Python-bugs-list mailin
Change by Alex Waygood :
--
keywords: +patch
nosy: +AlexWaygood
nosy_count: 2.0 -> 3.0
pull_requests: +28300
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30079
___
Python tracker
<https://bugs.python.org/i
Change by Alex Waygood :
--
pull_requests: +28302
pull_request: https://github.com/python/cpython/pull/30081
___
Python tracker
<https://bugs.python.org/issue45
Alex Waygood added the comment:
Thanks, Serhiy!
--
___
Python tracker
<https://bugs.python.org/issue45840>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
I can't reproduce this -- the permalink to __debug__ that I get is the same as
the one you have posted here, and works fine for me on my laptop, phone and
iPad.
--
nosy: +AlexWaygood
___
Python tracker
&
Change by Alex Waygood :
--
type: -> behavior
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issue46059>
___
___
Python-bugs-list mai
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue46066>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
Thanks for the bug report, Vivek! It should be fixed now -- it might take a day
or two for the online docs to update.
--
___
Python tracker
<https://bugs.python.org/issue46
Alex Waygood added the comment:
The proposed patch appears to have been implemented in
https://github.com/python/cpython/commit/97c1adf3935234da716d3289b85f72dcd67e90c2,
and there has been no discussion for five years. I think this can now be
closed.
--
nosy: +AlexWaygood
New submission from Alex Waygood :
The ability to add docstrings for individual attributes, by using a dictionary
for __slots__ was added in Issue36326. This is a fantastic feature, and
deserves better documentation. It appears to currently only be documented in
the "What's New&
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +28332
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30109
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
title: Broken URL in tutorial -> [doc] Broken URL in "Brief Tour of the
Standard Library"
type: -> behavior
versions: +Python 3.11, Python 3.9
___
Python tracker
<https://bugs.py
Change by Alex Waygood :
--
versions: -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue46081>
___
___
Python-bugs-list mailin
Alex Waygood added the comment:
Hi! Your message here is a little unclear. Are you proposing a new feature (an
enhancement), or filing a bug report?
In either case, I'm afraid this behavior is very unlikely to change. In
general, strings in Python are always considered truthy unless
Change by Alex Waygood :
--
nosy: +rhettinger
versions: -Python 3.8
___
Python tracker
<https://bugs.python.org/issue46085>
___
___
Python-bugs-list mailin
Alex Waygood added the comment:
I am removing 3.10 from the "versions" field, since additions to the standard
library are only considered for unreleased versions of Python.
--
nosy: +AlexWaygood, tim.peters
versions: -Python 3.10
Change by Alex Waygood :
--
nosy: -AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46086>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +AlexWaygood
versions: +Python 3.11, Python 3.9
___
Python tracker
<https://bugs.python.org/issue46092>
___
___
Python-bug
Alex Waygood added the comment:
It concerns me that help() gives very different results for some of these
functions than the signature you'll find in the documentation. I think a
beginner would find that highly confusing. If the view is that the slash
notation should not be added to
New submission from Alex Waygood :
There are a few places in the typing docs where old-style (pre-PEP 526) syntax
is used in examples. It doesn't look like these examples have been updated
since 2016; it would be good to change them so that they use the newer syntax
introduced in PE
Change by Alex Waygood :
--
keywords: +patch
pull_requests: +28368
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30148
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> behavior
___
Python tracker
<https://bugs.python
Alex Waygood added the comment:
This appears to have been fixed in PR 26560 in the main branch, but it might be
nice to backport it to 3.10 and 3.9
--
nosy: +AlexWaygood, mdk
stage: -> backport needed
type: enhancement -> behavior
versions: +Python 3.10, Python 3.9 -Pyth
Alex Waygood added the comment:
Given that there has been no activity on this issue for over three years, I am
closing this as "rejected".
--
nosy: +AlexWaygood
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Alex Waygood added the comment:
PR 30191 and PR 30192 are backports
--
___
Python tracker
<https://bugs.python.org/issue31914>
___
___
Python-bugs-list mailin
Change by Alex Waygood :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
stage: -> needs patch
type: -> enhancement
versions: +Python 3.10, Python 3.11, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python
3.8
___
Python tracker
<https://bugs.python.org/issue33
Change by Alex Waygood :
--
nosy: +mdk
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46130>
___
___
Python-bugs-list mailing list
Un
New submission from Alex Waygood :
Attempting to create an enum with __slots__ silently fails. No error is raised
if __slots__ are specified, but the usual behaviour of __slots__ does not work
as expected. Attributes that are not specified in __slots__ can be freely set:
>>>
Change by Alex Waygood :
--
pull_requests: +28424
pull_request: https://github.com/python/cpython/pull/30203
___
Python tracker
<https://bugs.python.org/issue46
Change by Alex Waygood :
--
resolution: fixed ->
stage: resolved -> patch review
status: closed -> open
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
stage: -> needs patch
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue29971>
___
___
Python-
Alex Waygood added the comment:
I am closing this issue. The original topic of discussion (Lock.acquire
documentation) has been resolved, and there were other issues opened to discuss
the more general issue. There has also been no real activity in this issue
thread for a decade
Alex Waygood added the comment:
I am closing this issue as "rejected", given the consensus that writing a patch
could be a major undertaking, the lack of such a patch, and the fact that there
has been no activity on the issue thread (or the python-ideas mailing list) for
near
Alex Waygood added the comment:
Thanks for the bug report, Landon! I think I can reproduce this with a slightly
shorter code snippet, but I don't think this is a bug:
```
>>> from dataclasses import dataclass, field
>>> @dataclass
... class Character:
... sort_
Alex Waygood added the comment:
Thanks for taking the time to review and merge :)
--
___
Python tracker
<https://bugs.python.org/issue46076>
___
___
Python-bug
Alex Waygood added the comment:
Ah, of course, I'm an idiot — I forgot that a class could not prevent the
creation of __dict__ unless the parent class also had __slots__. Thanks,
Christian.
In which case: consider this a feature request to consider adding __slots__ to
enum.Enum: for f
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Willmer :
--
nosy: -Alex.Willmer
___
Python tracker
<https://bugs.python.org/issue43424>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Gaynor :
--
components: +Interpreter Core
nosy: +Mark.Shannon, alex
___
Python tracker
<https://bugs.python.org/issue46159>
___
___
Python-bug
Change by Alex Waygood :
--
type: security -> enhancement
versions: +Python 3.11 -Python 3.10
___
Python tracker
<https://bugs.python.org/issue43424>
___
_
Change by Alex Waygood :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46172>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46162>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alex Walters :
When zero argument super is used inside a generator expression, it raises
'TypeError: super(type, obj): obj must be an instance or subtype of type'.
I can find no information on if this is working as intended, a bug, or a known
issue, and the e
Change by Alex Waygood :
--
title: urllib.requst.Request 'timeout' attribute needs to have a default ->
urllib.request.Request 'timeout' attribute needs to have a default
___
Python tracker
<https:/
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
nosy: +AlexWaygood
___
Python tracker
<https://bugs.python.org/issue46170>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alex Waygood added the comment:
Given that this issue has seen no activity for eight years, I am closing it as
"rejected".
--
nosy: +AlexWaygood
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Pyt
Alex Waygood added the comment:
The modern docs for these functions seem to:
* Document the cwd argument for these functions, following PR 1685 & PR 2253.
* Include an **other_popen_kwargs parameter for all these functions.
Nick, is there anything left to do here, or can this issue be cl
Alex Waygood added the comment:
Guido: Serhiy fixed this very recently in Issue46032.
The documentation should probably be improved, however, in my opinion; there's
currently nothing officially stating that GenericAlias/NewType/typing aliases
are unsupported.
Suppor
Change by Alex Waygood :
--
nosy: +AlexWaygood, lukasz.langa
___
Python tracker
<https://bugs.python.org/issue46191>
___
___
Python-bugs-list mailing list
Unsub
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Alex Waygood :
--
title: Clarify kwarg handing for subprocess convenience APIs -> [doc]
subprocess module: Clarify kwarg handing for convenience APIs
___
Python tracker
<https://bugs.python.org/issu
Alex Waygood added the comment:
I am closing this, as I believe it was fixed by the addition of **kwds to
EnumMeta. Feel free to reopen this if you disagree, @retnikt.
--
nosy: +AlexWaygood
resolution: -> fixed
stage: -> resolved
status: open -&g
Alex Waygood added the comment:
I like Serhiy's idea from a type-checking perspective. It would mean we could
continue to have sophisticated type inference from mypy/pyright/etc. inside
singledispatch function definitions. It would also mean people could use type
annotatio
Alex Waygood added the comment:
Yeah, I think I agree with Guido. Mypy only has partial support for
singledispatch anyway, and only achieves that through a plugin, so
special-casing by type-checkers is inevitable.
--
___
Python tracker
<ht
Alex Waygood added the comment:
```
>>> from typing import Optional, get_origin
>>> get_origin(Optional[int])
typing.Union
```
^Because of that, it will work with typing.Optional as well as typing.Union and
types.UnionType, yes.
I am planning on submitting a docs PR at
Change by Alex Grönholm :
--
nosy: +alex.gronholm
___
Python tracker
<https://bugs.python.org/issue40059>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
keywords: +patch
stage: -> patch review
versions: -Python 3.6, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue46244>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
title: Improve error message when creating an enum with `__call__` -> Improve
error message when attempting to extend an enum with `__call__`
___
Python tracker
<https://bugs.python.org/issu
Change by Alex Waygood :
--
nosy: +jaraco
___
Python tracker
<https://bugs.python.org/issue46246>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue43224>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Alex Waygood :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Alex Waygood added the comment:
`isinstance(list[int], type)` returns `True` in 3.9 as well, so the behaviour
has been around for a while. (Not a comment on whether the change is worth
making, just a note.)
--
___
Python tracker
<ht
Alex Waygood added the comment:
Yes, there are a few exceptions to that :(
```
>>> from typing import Annotated
>>> x = Annotated[int, "idk some int"]
>>> x()
0
>>> isinstance(x, type)
False
>>>
>>> from re import Pattern
>&g
Alex Waygood added the comment:
I agree with Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue45665>
___
___
Python-bugs-list mailing list
Unsub
101 - 200 of 1613 matches
Mail list logo