Aaron Gallagher <_...@habnab.it> added the comment:
sigh.. adding myself to nosy here too in the hope that this gets any traction
--
nosy: +habnabit
___
Python tracker
<https://bugs.python.org/i
Aaron Gokaslan added the comment:
The frame object I am referring to was:
PyFrameObject *frame = PyThreadState_GetFrame(PyThreadState_Get());
This frame can not be used with PyObject_GetAttrString. Is there anyway to get
the PyObject* associated with a PyFrameObject*? It seems weird that
Aaron Gokaslan added the comment:
I saw the latest Python 3.11 5A release notes on the frame API changes. Do the
notes mean the only officially supported way of accessing co_varnames is now
through the Python interface and the inspect module? By using
PyObject_GetAttrString?
Also, the
Aaron Gokaslan added the comment:
`PyCodeObject_GetVariableName()` and `PyCodeObject_GetVariableKind()` work?
- Some public-gettters such as these functions would be ideal.
OOI, how do you cope with non-local self?
- We only care about checking self to prevent an infinite recursion in our
Aaron Gokaslan added the comment:
We didn't want to read colocalsplus directly because we were worried about the
stability of that approach and the code complexity / readability. Also, I
wasn't aware that colocalsplus would work or if that was lazily populated as
well.
The func
aaron added the comment:
'@reprlib.recursive_repr' decorator to 'events.Handle.__repr__()'
could you tell me which file should I change? and why?
--
___
Python tracker
<https://bug
aaron added the comment:
"When running code in debug mode" means we're debug the code. We have used both
vscode and pycharm. Same result.
--
___
Python tracker
<https://bugs.pyt
New submission from aaron :
When running code in debug mode, asyncio sometimes enter into infinite loop,
shows as the following:
```
Current thread 0x7f1c15fc5180 (most recent call first):
File "/root/miniconda3/envs/omicron/lib/python3.9/asyncio/events.py", line 58
in __rep
New submission from Aaron Gokaslan :
Hello, I am a maintainer with the PyBind11 project. We have been following the
3.11 development branch and have noticed an issue we are encountering with
changes to the C-API.
Particularly, we have an edge case in our overloading dispatch mechanism that
Aaron Gallagher <_...@habnab.it> added the comment:
I will note, Raymond, that I’ve wanted this for years before discovering
this bpo issue, and I found it because you linked it on Twitter. ;)
On Wed, Dec 8, 2021 at 19:08 Raymond Hettinger
wrote:
>
> Raymond Hettinger added
Change by Aaron Meurer :
--
nosy: +asmeurer
___
Python tracker
<https://bugs.python.org/issue42109>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Koch added the comment:
Are there any other names that you would contemplate besides `from_name` and
`from_value`? My reading of your response indicates that you are fundamentally
opposed to the addition of class methods, since they would limit the space of
possible instance methods
New submission from Aaron Koch :
Documentation: https://docs.python.org/3/library/enum.html#creating-an-enum
Current behavior:
SomeEnum[name] is used to construct an enum by name
SomeEnum(value) is used to construct an enum by value
Problem:
As a user of enums, it is difficult to remember
Aaron Smith added the comment:
I encountered the similar behavior unexpectedly when dealing with LEGB scope of
names. Take the following example run under Python 3.9.2:
def doSomething():
x = 10
del x
print(x)
x = 5
doSomething()
This produces a UnboundLocalError at print(x
Aaron added the comment:
What should the behavior be if an exception is raised in a pool worker during
bootstrapping / initialization function execution? I think an exception should
be raised in the process owning the Pool, and in the fix I'm tinkering around
with I just ra
Aaron added the comment:
I ran into this bug answering this question on Stack Overflow:
https://stackoverflow.com/questions/68890437/cannot-use-result-from-multiprocess-pool-directly
I have minimized the code required to replicate the behavior, but it boils down
to: when using "spaw
Aaron Meurer added the comment:
When talking about making exit only work when typed at the interpreter,
something to consider is the confusion that it can cause when there is a
mismatch between the interactive interpreter and noninteractive execution,
especially for novice users. I've
Aaron Meurer added the comment:
A quick glance at the source shows that it still imports __main__ at the
top-level. I have no idea how legitimate it is that the App Engine (used to?)
makes it so that __main__ can't be imported.
--
nosy: +asm
New submission from Aaron Meurer :
$ ./python.exe -m compileall doesntexist
Listing 'doesntexist'...
Can't list 'doesntexist'
$ echo $?
0
It's standard for a command line tool that processes files to exit nonzero when
given a directory that doesn't exist
Aaron Gallagher <_...@habnab.it> added the comment:
This is definitely not windows-specific. On macos:
$ python3.9
Python 3.9.4 (default, Apr 5 2021, 01:47:16)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "lic
Aaron Gallagher <_...@habnab.it> added the comment:
@daniel.urban would you kindly resubmit your patch as a PR to the cpython repo?
I've learned out-of-band from someone else that putting patches on bpo is
considered obsolete. you can use the PR I've submitted
(https://g
Aaron Gallagher <_...@habnab.it> added the comment:
@daniel.urban I'm attempting to move this patch along, but since the
contributing process has changed in the years since your patch, you'll need to
sign the CLA. Are you interested in picking this back up at all? I haven
Change by Aaron Gallagher :
--
nosy: +Aaron Gallagher
nosy_count: 20.0 -> 21.0
pull_requests: +24811
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/26194
___
Python tracker
<https://bugs.p
Aaron Meurer added the comment:
I'm surprised to hear that the "typical use-case" of Fraction is fractions
converted from floats. Do you have evidence in the wild to support that?
I would expect any application that uses fractions "generically" to run into
the sam
Change by Aaron Meurer :
--
nosy: +asmeurer
___
Python tracker
<https://bugs.python.org/issue43420>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Meurer added the comment:
To reiterate some points I made in the closed issues
https://bugs.python.org/issue42819 and https://bugs.python.org/issue32019.
A simple "fix" would be to emulate the non-bracketed paste buffering. That is,
accept the input using bracketed paste, bu
Aaron Meurer added the comment:
Instead of enabling it by default, why not just keep it but emulate the old
behavior by splitting and buffering the input lines? That way you still get
some of the benefits of bracketed paste, i.e., faster pasting, but without the
hard work of fixing the REPL
Aaron Meurer added the comment:
Is find_executable() going to be extracted from distutils to somewhere else?
It's one of those functions that is useful outside of packaging, and indeed,
I've seen it imported in quite a few codes that aren't related to packaging. If
so, the pa
Aaron Meurer added the comment:
Neither of those things preclude the possibility of the traceback module doing
a better job of printing tracebacks for exceptions where __traceback__ = None.
--
___
Python tracker
<https://bugs.python.
Aaron Meurer added the comment:
I don't think it's helpful to make such a literalistic interpretation. Just
because the variable is called "traceback" doesn't mean it should apply only to
the things that are *technically* a traceback (and I don't agree anyway
Aaron Meurer added the comment:
I think I found another way to achieve what I was trying to do, which is why I
never pursued this. But I still think it's a bug.
__traceback__ = None isn't documented anywhere that I could find, so I was only
able to deduce how it should work from r
Aaron Meurer added the comment:
> It's not entirely clear to me what you are trying to do (what is the output
> you are hoping to get?) but this looks more like a question than a bug
> report, so I am closing this issue. If this is still relevant, I'd suggest
> you a
Aaron Meurer added the comment:
The same thing occurs with specifiers like {a!r}.
--
nosy: +asmeurer
___
Python tracker
<https://bugs.python.org/issue35
New submission from Aaron Meurer :
This discussion started at https://github.com/python/cpython/pull/19503
(actually on Twitter https://twitter.com/asmeurer/status/1289304407696261120),
but Guido asked me to move it bpo.
Alongside the implementation of Python 3.9's new PEG parser,
New submission from Aaron Lichtman :
It would be useful if the http.server module had an option for colored logging
to help users visually parse the HTTP traffic logs.
$ python3 -m http.server 80 --color is along the lines of what I'm thinking.
--
components: Library (Lib)
mes
Aaron Black added the comment:
joseph.hackman
I don't think that the 63 character limit on a label is the problem
specifically, merely it's application.
The crux of my issue was that credentials passed with the url in a basic-authy
fashion (as some services require) count a
Aaron Meurer added the comment:
Related issue https://bugs.python.org/issue32019
--
nosy: +asmeurer
___
Python tracker
<https://bugs.python.org/issue39
New submission from Aaron Meurer :
This is tested in CPython master. The issue also occurs in older versions of
Python.
>>> ast.dump(ast.parse('f"{x}"'))
"Module(body=[Expr(value=JoinedStr(values=[FormattedValue(value=Name(id='x',
Aaron Hall added the comment:
Another obvious way to do it, but I'm +1 on it.
A small side point however - PEP 584 reads:
> To create a new dict containing the merged items of two (or more) dicts, one
> can currently write:
> {**d1, **d2}
> but this is neither o
New submission from Aaron Ecay :
I have discovered that InitVar's are passed in a surprising way to the
__post_init__ method of python dataclasses. The following program illustrates
the problem:
=
from dataclasses import InitVar, dataclass
@dataclass
class Foo:
bar: InitVa
Aaron Meurer added the comment:
Are there issues tracking the things I mentioned, which should IMO happen
before this becomes a hard error (making the warnings reproduce even if the
file has already been compiled, and making warning message point to the correct
line in multiline strings
Aaron Meurer added the comment:
This seems related. It's also possible I'm misunderstanding what is supposed to
happen here.
If you create test.py with just the 2 lines:
"""
a
and run python test.py from CPython master, you get
$./python.exe test.py
File &quo
Aaron Meurer added the comment:
Well paradoxically, the bugs that this prevents are the ones it doesn't warn
about. If someone writes '\tan(x)' thinking it is a string representing a LaTeX
formula for the tangent of x, they won't realize that they actually created a
st
Aaron Meurer added the comment:
Raymond, are you in agreement that these warnings should at some point
eventually become syntax errors?
--
___
Python tracker
<https://bugs.python.org/issue32
Aaron Meurer added the comment:
This looks like the same issue I mentioned here
https://bugs.python.org/msg344764
--
nosy: +asmeurer
___
Python tracker
<https://bugs.python.org/issue37
Aaron Meurer added the comment:
I agree. Please someone else do that. I don't know what already has issues and
I unfortunately don't have time right now to help out with any of this.
I simply mentioned all these things as arguments why Python should not (yet)
make these warni
Aaron Hurst added the comment:
I believe this bug can be closed now that the following have landed:
New changeset 408a2ef1aceff1f4270c44552fa39ef93d9283e3 by Benjamin Peterson
(aaronpaulhurst) in branch 'master':
closes bpo-35184: Fix XML_POOR_ENTROPY option that breaks makesetup
Aaron Meurer added the comment:
I agree with Raymond that third party libraries are not ready for this.
My biggest issue is that the way Python warns about this makes it very
difficult for library authors to fix this. Most won't even notice. The problem
is the warnings are only shown
New submission from Aaron Hall :
I've written three (or more) answers on Stack Overflow about how to use the
functions in the traceback module, and I code Python all day long.
Embarrassing confession: I just recommended the wrong traceback function in
email to fix the incorrect usa
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue34648>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hurst added the comment:
Hi Ned,
Thanks for testing this. I also observe that macOS compiles "without error"...
but it's still broken... and silently.
This is because the pyexpat line isn't being turned into the expected set of
source compilation rules, but
Aaron Hurst added the comment:
Hi Ned,
>From a fresh checkout of master on Ubuntu 18.04, I uncomment the pyexpat line
>in Modules/Setup and run:
cpython$ ./configure
...
cpython$ make
Makefile:273: *** missing separator. Stop.
Here is the offending section of the resulting Makefile
Aaron Hurst added the comment:
Sorry for my misunderstanding of the process, and thanks for explaining. I
resubmitted the PR against the master branch.
--
___
Python tracker
<https://bugs.python.org/issue35
Change by Aaron Hurst :
--
pull_requests: +12981
___
Python tracker
<https://bugs.python.org/issue35184>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hurst added the comment:
This is the same issue as https://bugs.python.org/issue35184
I can reproduce this issue by uncommenting the pyexpat line in Setup.dist and
compiling.
The issue is with -DXML_POOR_ENTROPY=1. The equals character causes the line
to be incorrectly interpreted
Aaron Hurst added the comment:
I can reproduce this issue by uncommenting the pyexpat line in Setup.dist and
compiling.
The issue is with -DXML_POOR_ENTROPY=1. The equals character causes the line
to be incorrectly interpreted as a macro definition by makesetup. This results
in an
Change by Aaron Hurst :
--
keywords: +patch
pull_requests: +12827
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35184>
___
___
Py
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue36551>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue35625>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
No need to keep this open, I agree with the core developers this shouldn't be
changed.
--
status: open -> closed
___
Python tracker
<https://bugs.python.org
Change by Aaron Hall :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue26103>
___
___
Pyth
New submission from Aaron Meurer :
I am getting a Fatal Python error: Cannot recover from stack overflow. running
the SymPy tests on a branch of mine where the tests fail. I have reproduced
this in Python 3.6.7, as well as CPython master
(fc96e5474a7bda1c5dec66420e4467fc9f7ca968).
Here are
Aaron Meurer added the comment:
You can download the branch for a pull request even if the repo is deleted
using this https://stackoverflow.com/a/28622034/161801. That will let you keep
the original commits intact.
--
nosy: +asmeurer
___
Python
Aaron Meurer added the comment:
Is it expected behavior that comments produce NEWLINE if they don't have a
newline and don't produce NEWLINE if they do (that is, '# comment' produces
NEWLINE but '# comment\n' does not
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue35059>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Meurer added the comment:
I see. I haven't dug much into the argoarse source, so I don't have a good feel
for how feasible such a tool would be to write. Such refactoring would also be
useful for generating HTML or RST for the help. I've previously used help2man
Aaron Meurer added the comment:
Couldn't such a tool exist outside the standard library. I'm thinking a
function that you would import and wrap the parser object, similar to how
argcomplete works (https://argcomplete.readthedocs.io/en/latest/index.html).
The downside is that
Aaron Meurer added the comment:
I would suggest adding this to the what's new document
https://docs.python.org/3.7/whatsnew/3.7.html. The change affects user-facing
code (the exact_type attribute of TokenInfo is OP for ... and -> tokens prior
to this patch).
I would also point
Aaron Hall added the comment:
Should pydoc treat a partial object like a function?
Should a partial be an instance of a function?
Should we be able to add all the nice things that functions have to it?
If we want that, should we simply instantiate a function the normal way, with a
new
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue30129>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Aaron Hall :
--
nosy: +Aaron Hall
___
Python tracker
<https://bugs.python.org/issue32400>
___
___
Python-bugs-list mailing list
Unsubscribe:
Aaron Hall added the comment:
>From a design standpoint, I'm fairly certain the sort_keys argument was
>created due to Python's dicts being arbitrarily ordered.
Coercing to strings before sorting is unsatisfactory because, e.g. numbers sort
lexicographically instead of by nu
Aaron Hall added the comment:
Now that dicts are sortable, does that make the sort_keys argument redundant?
Should this bug be changed to "won't fix"?
------
nosy: +Aaron Hall
___
Python tracker
<https://bugs.pyt
Aaron Hall added the comment:
> What is wrong with just using shutil.rmtree()?
0. It's awkward to import just for demonstrations.
1. It's harder for new pythonists to discover.
2. A method provides discoverability in an object's namespace.
3. rmtree is a method of paths
New submission from Aaron Hall :
pathlib.Path wants the rmtree method from shutil
I think we need this method for a couple of reasons.
1. in shell, rm has the -r flag - In Python, we use shutil.rmtree as a best
practice for this.
2. I prefer to teach my students about pathlib.Path as opposed
Aaron Ang added the comment:
@Jason R. Coombs
You are right. I managed to reproduce the problem with a test. It only occurs
when a fix is applied.
Also, I figured out that the refactoring reads in the file using `open(file,
'r')`, which basically transforms all line-endings to LF
Change by Aaron Ang :
--
keywords: +patch
pull_requests: +6181
stage: test needed -> patch review
___
Python tracker
<https://bugs.python.org/issue11594>
___
_
Aaron Ang added the comment:
I couldn't reproduce this issue. I tried reproducing this problem by extending
the TestRefactoringTool class and creating two files: one file with LF
line-endings and one file with CRLF line-endings.
The changes that I made can be found here:
https://githu
Change by Aaron Ang :
--
keywords: +patch
pull_requests: +6119
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue31201>
___
_
Change by Aaron Ang :
--
keywords: +patch
pull_requests: +5952
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue28677>
___
_
Aaron Black added the comment:
Just to be clear, I don't know if the socket needs to support 64 character long
host name sections, so here's an example url that is at the root of my problem
that I'm pretty sure it should support:
>>
New submission from Aaron Christianson :
I'm always writting these wrapper classes where I want to selectively want to
expose the interface of some of the methods of certain attributes to co the
containing object. This can mean I spend a lot of time implementing wrapper
methods. That
New submission from Aaron Black :
While working on a custom conda channel with authentication, I ran into the
following UnicodeError:
Traceback (most recent call last):
File
"/Users/ablack/miniconda3/lib/python3.6/site-packages/conda/core/repodata.py",
li
Aaron Meurer added the comment:
Can't third party code write their own proxies? Why do we have to do that?
--
___
Python tracker
<https://bugs.python.org/is
Aaron Meurer added the comment:
Serhiy, isn't option 4?
4. Make KeysView.__repr__ show list(self). Add a custom wrapper for Shelf's
KeysView so that it doesn't do this.
This seems to be what Victor is suggesting. It makes the most sense to me for
the common (i.e., default
New submission from Aaron Meurer :
inspect.getsource(datetime) shows the Python source code for datetime, even
when it is the C extension. This is very confusing.
I believe it's because _datetime is used to override everything in datetime at
the end of the file (here
https://githu
Aaron Meurer added the comment:
So the best fix is to just override keys() in the _Environ class, so that it
returns an EnvironKeysView class that overrides __repr__?
--
___
Python tracker
<https://bugs.python.org/issue32
New submission from Aaron Meurer :
Take the following scenario which happened to me recently. I am trying to debug
an issue on Travis CI involving environment variables. Basically, I am not sure
if an environment variable is being set correctly. So in my code, I put
print(os.environ.keys
Aaron Meurer added the comment:
If it's of any interest to this discussion, for SymPy (for some time) we have
used a custom subclass of DeprecationWarning that we enable by default
https://github.com/sympy/sympy/blob/master/sympy/utilities/exceptions.py. I
don't know if there
New submission from Aaron Meurer :
Here are the steps to reproduce this:
- Compile and link Python against readline version 7.0 or higher.
- Add
set enable-bracketed-paste on
to your ~/.inputrc
- Start python and paste the following two lines. Make sure to use a terminal
emulator that
Aaron Hall added the comment:
If/when order is guaranteed (3.7?) we should have a pprint that respects
current order,
-or-
we should get an improved pprint (maybe named pp or print?) that understands
mappings and other abstract data types.
I had a conversation about pprint at the Python
Aaron Hall added the comment:
New information: I think I have pinpointed at least a contributor to the
difference - closure lookups seem to be currently slightly slower (by a few
percent) than global lookups (see https://stackoverflow.com/a/46798876/541136).
And as we can see, an inner
Aaron Hall added the comment:
Static analysis:
My mental model currently says the rebuilt function every outer call is an
expense with no offsetting benefit. It seems that a function shouldn't build a
closure on every call if the closure doesn't close over anything immediately
u
Aaron Gallagher <_...@habnab.it> added the comment:
>Storing the marker attribute in __main__ [...]
Can I request please not using __main__ for this? setuptools console_scripts
are very common, which is a case where __main__ will be a generated (i.e. not
user-controllable) fil
Aaron Hall added the comment:
So... moving the closure (which may be called recursively) to the global scope
actually does improve performance (for small cases, about 10% - larger cases
amortize the cost of the closure being built, but in a 100 item dictionary,
still about 4% faster to
Aaron Hall added the comment:
Rejecting and withdrawing with apologies.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Aaron Hall :
Removing the closure seems to make the function about 10% faster.
Original source code at:
https://github.com/python/cpython/blob/3.6/Lib/ast.py#L40
Empirical evidence: astle.py
import timeit
from ast import literal_eval as orig_literal_eval
from ast import
Aaron Meurer added the comment:
I meant that format() destroys information in a decimal in general. Obviously
if you have n digits of precision and format with m < n, then you lose
information.
I also can't help but feel that we're mixing up "trailing zeros"
Aaron Meurer added the comment:
I guess I would expect that to be captured by the number of zeros printed (and
obviously doing a string format operation with a set number of digits destroys
that information).
--
___
Python tracker
<ht
New submission from Aaron Meurer :
>>> '{:+.19e}'.format(0.)
'+0.000e+00'
>>> import decimal
>>> '{:+.19e}'.format(decimal.Decimal(0))
'+0.000e+19'
Note the decimal uses e+19 instead of e+00. Obvi
1 - 100 of 323 matches
Mail list logo