Change by Ben Boeckel :
--
nosy: +mathstuf
___
Python tracker
<https://bugs.python.org/issue28584>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Darnell added the comment:
On MacOS in 2015, getaddrinfo was found to be much slower than inet_pton.
Unless that's changed, this patch would be a performance regression on that
platform. Data and benchmark script in
https://groups.google.com/g/python-tulip/c/-SFI8kkQEj4/m/m1-oCMS
Ben Darnell added the comment:
To summarize the justification, this patch does two things: it moves an
optimization from create_connection to getaddrinfo, which makes it apply to
more callers (including Tornado), and it makes the code simpler and less
redundant (net reduction of 47 non-test
Change by Ben :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46726>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben added the comment:
You are right,
What one really needs here is a way to know *who* owns the lock,
but threading.Lock does not provide that.
The race on := is much smaller than the original race and I suspect in practice
will be very hard to hit.
As the original bpo notes, it may not
Change by Ben :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue46726>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Ben added the comment:
This is a duplicate of https://bugs.python.org/issue45274
but the patch there did not fix it
I've just added a PR there (or should it go here?) that (i think) fixes this.
The issue is that the lock.locked() call just checks that *someone* has the
lock, not tha
Change by Ben :
--
nosy: +bjs
nosy_count: 6.0 -> 7.0
pull_requests: +29450
pull_request: https://github.com/python/cpython/pull/31290
___
Python tracker
<https://bugs.python.org/issu
Ben Griffin added the comment:
This is still being ignored.
It's a bug, because it prevents the ini file from being used by other clients.
--
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.py
Ben Darnell added the comment:
> To be clear, by "cancel" you are not talking about Future.cancel(). Rather,
> your handler causes all running tasks to finish (by sending a special message
> on the socket corresponding to each running task). Is that right?
Correct. My t
Ben Avrahami added the comment:
IMHO, I don't think any alternative to aviramha's solution addresses the issue,
And I don't think the need is niche enough to be ignored.
PyType_HasFeature excludes strings, bytes, and other esoteric types.
PyMapping_Check includes mapping
Ben added the comment:
https://github.com/python/importlib_metadata/issues/364
--
resolution: -> works for me
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ben added the comment:
yes, the latest version of pip creates an .egg-info metadata dir at the level
of the package src dir and .egg-link and easy-install.pth stubs in the
site-packages dir (the contents of which are paths to the package src dir). The
intent is that these links would be
Ben added the comment:
I should also add that the easy-install.pth file, which similarly contains a
link to the source dir containing the .egg-info metadata, is also not processed
to locate the necessary metadata.
--
___
Python tracker
<ht
New submission from Ben :
When installing a package using --editable, pip creates a .egg-link file in
your site-packages dir that points to the .egg-info metadata that by default
exists along side the source that it was installed from. This worked just fine
with the older pkg_resources
Ben Kehoe added the comment:
That doesn’t really seem like a Pythonic way of extracting that
information? Nor does it seem like it would be an obvious trick for the
average developer to come up with. A method that provides the information
directly seems useful
Ben Kehoe added the comment:
The point is to be able to programmatically determine what is needed for a
successful substitute() call. A basic use case for this is better error
messages; calling substitute() with an incomplete mapping will tell you
only the first missing identifier it encounters
Ben Kehoe added the comment:
Having slept on it, I realized that if I was presenting interactive prompts for
a template, I would expect the prompts to be in order that the identifiers
appear in the template. Accordingly, I've updated the PR to maintain ord
Ben Kehoe added the comment:
I opened a PR. By default, it raises an exception if there's an invalid
identifier; there's a keyword argument raise_on_invalid to control that.
The implementation I have adds them to a set first, which means the order is
not guaranteed. I'm of
Change by Ben Kehoe :
--
keywords: +patch
pull_requests: +28698
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30493
___
Python tracker
<https://bugs.python.org/issu
Ben Kehoe added the comment:
Happy to make a PR! In my mind I had been thinking it would be the
get_identifiers() method with the implementation above, returning a list.
As for __iter__, I'm less clear on what that would look like:
t = string.Template(...)
for identifier in t:
#
New submission from Ben Kehoe :
Currently, the only thing that can be done with a string.Template instance and
a mapping is either attempt to substitute with substitute() and catch a
KeyError if some identifier has not been provided in the mapping, or substitute
with safe_substitute() and
Ben Steffensmeier added the comment:
We have been seeing intermittent crashes on jep that we tracked down to the
same change (d0d29655ff).
I have created a sample program using _testcapi that crashes about 50% of the
time when run on Windows with Python 3.9.9. We have not been able to
New submission from Ben Ricketts :
https://docs.python.org/3/tutorial/appetite.html
4th paragraph from bottom refers to "skits" where as Monty Python in fact
perform sketch comedy.It is a minor but important differentiation.
--
assignee: docs@python
components: Documentatio
Ben Darnell added the comment:
> In IPython, I think you could use new_event_loop() for getting a new loop
> instance.
> Then, save the loop reference somewhere as a direct attribute,
> threading.local or ContextVar.
> Calling loop.run_until_complete() looks pretty normal in
Change by Ben :
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45951>
___
___
P
New submission from Ben :
First, I am not a programmer by any stretch of the imagination, and I am just
trying to get this error solved.
I attempted to highlight and comment out a section of code, maybe 20 lines, and
the program froze, greyed out, and gave me a spinning wheel mouse.
I
Ben added the comment:
The problem with the FAQs is that it's over-simplifying things to the point
where it can sometimes mislead.
Notably, it says the GIL protects these operations; but as Antoine points out,
many operations on datatypes drop back into Python (including potential de
Ben added the comment:
This seems to be present in both the Python implementation as well as the
accelerated C _asyncio module.
It looks like that when a Task awaits a cancelled future,
the task itself is cancelled but the cancellation message is not propagated to
the task.
https
New submission from Ben :
This is a very subtle race
WeakSet uses _weakrefset.py's _IterationGuard structure to protect against the
case where the elements the WeakSet refers to get cleaned up while a thread is
iterating over the WeakSet.
It defers the actual removal of any elements
Change by Ben Hoyt :
--
keywords: +patch
pull_requests: +26853
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28452
___
Python tracker
<https://bugs.python.org/issu
Ben Hoyt added the comment:
For reference, here's a repro case:
$ python3.10 -c 'import email.utils; \
email.utils.parsedate_tz("Wed, 3 Apr 2002 12.34.56.78+0800")'
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/
New submission from Ben Hoyt :
In going through some standard library code, I found that the
email.utils.parsedate_tz() function
(https://docs.python.org/3/library/email.utils.html#email.utils.parsedate_tz)
has a bug if the time value is in dotted format and has more than 2 dots in it,
for
Ben added the comment:
I can reproduce on 3.9.6
A little digging and it seems asyncio imports Task from _asyncio
and _asyncio's implementation (in asynciomodule.c) of Task has an __init__
which adds the task to the `all_tasks` weakref.WeakSet
which appears to be implemented in Python (i
New submission from Ben Boeckel :
Generally, the `configure.ac` script tries to detect compilers based on the
path to the compiler. This is mostly fine, but trips up when using `mpicc` as
the compiler. Even if the underlying compiler is `gcc`, this gets detected as
`icc` in various
Change by Ben Avrahami :
--
nosy: +avrahami.ben
___
Python tracker
<https://bugs.python.org/issue44695>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Darnell added the comment:
> The maintenance burden of the introduced deprecation should be pretty low.
This is going to cause an unpleasant amount of churn in the Tornado community.
It's been idiomatic (going back 12 years now) to do all your setup in
synchronous code before
Ben Darnell added the comment:
> It's even slightly easier for tornado, which can reasonably set the
> proactor-wrapper policy at IOLoop start time, which means
> `asyncio.get_event_loop()` returns a loop with add_reader. But pyzmq doesn't
> get invoked until an
Ben Darnell added the comment:
[I'm coming here from https://github.com/tornadoweb/tornado/pull/3010)
UnicodeError is a subclass of ValueError, so I don't see what value that change
would provide. The thing that's surprising to me is that it's not a
`socket.herror
Ben Buchwald added the comment:
Hopefully I'm not too late to comment on this. I also just hit this issue, but
I do not agree with the proposed PR. Only modifying
_GatheringFuture.cancelled() just fixes one of the side-effects of the problem.
The state of the future is still FINISHE
Ben Finney added the comment:
> tempfile.mktemp() still exists and works without raising a deprecation
> warning. Of course it's still marked as deprecated in the docs.
Right. So, the issue is not resolved: Functionality to create a temporary file
path is maintained in the stand
Ben Avrahami added the comment:
The patch PR blocks out a useful idiom: generic Nametuple
>>> class LLNode(NamedTuple, Generic[T]):
... value :T
... next: Optional[LLNode[T]]
I put forward that, at the least, NamedTuple should accept do-nothing bases
like Generic.
--
Ben Darnell added the comment:
I have resolved my issue here by moving from ThreadPoolExecutor to a plain
threading.Thread that I manage by hand
(https://github.com/tornadoweb/tornado/commit/15832bc423c33c9280564770046dd6918f3a31b4).
Therefore I no longer need this for myself and I leave it
Ben Darnell added the comment:
> IMO, a better practice would be providing those potentially infinite running
> tasks a direct method of escape and invoking it before calling
> executor.shutdown(), it would be a more reliable approach.
Agreed, but the problem is that I'm in a
Ben Boeckel added the comment:
We build our own applications which run Python interpreters internally, so the
auto-discovery won't work. It also doesn't seem to work for venvs either since
the venv's `python.exe` is under `Scripts` which makes it not able to find
things ei
New submission from Ben Boeckel :
On Windows, we are extracting a tarball of a Python installation for CI (to
avoid needing to juggle umpteen Python installs on umpteen machines). This
requires `PYTHONHOME` to be set to use properly since there is no registry
entry for the "install
Change by Ben Bonenfant :
--
nosy: +bbonenfant
nosy_count: 6.0 -> 7.0
pull_requests: +21894
pull_request: https://github.com/python/cpython/pull/22977
___
Python tracker
<https://bugs.python.org/issu
New submission from Ben Avrahami :
According to the documentation for types.SimpleNamespace,
`repr(SimpleNamespace())` should return `"SimpleNamespace()"`, but in actuality
returns `"namespace()"`. This is because SimpleNamespace is an alias for the C
implemented type
New submission from Ben Darnell :
I'm dealing with a subtle deadlock involving
concurrent.futures.ThreadPoolExecutor, and my solution that worked in Python
3.8 broke with 3.9. I'm running some long-running (possibly infinite) tasks in
the thread pool, and I cancel them in
Ben Avrahami added the comment:
> Adding a function to recalculate will require everyone to use it
I'd argue that this is akin to `functools.update_wrapper`. It too is a function
that must be called in virtually every function decorator (the only function
decorators that don't
Ben Avrahami added the comment:
Implementing this behavior automatically would be more complicated since you
would also have to take subclasses into account. Current implementation
enforces that the class is unused (as much as can be reasonably done) when its
abstraction status is re
Ben Avrahami added the comment:
> Maybe you misunderstand what I tried to say?
Possibly, right now, total_ordering avoids overriding any method that is
declared, either in the class or its superclasses (except for object),
regardless of whether or not it is abstract. For it to be ABC-aw
Ben Avrahami added the comment:
> I would prefer the isinstance(cls, ABCMeta) check to be inside that helper
I had a little debate about this in my mind, I'll change it.
> it's totally clear to me what @total_ordering should do -- it should define
> __le__, __gt__ and
Ben Avrahami added the comment:
This is a behavior that the PR changes. total_ordering should be able to
override/implement abstract methods (in my opinion). If this ends up a
strickling point then we can exclude total_ordering from this issue.
Regardless, I think that this behavior is
Ben Avrahami added the comment:
Good points all, that I will try to address one by one:
Firstly, this function is by no means mandatory for "post-creation mixins".
Such tools can still be used without calling it (and remain ABC unaware), with
absolutely no change in functionali
Ben Avrahami added the comment:
for the functionality to work, `total_ordering` needs to change to also
override abstract methods. I believe this is an OK change since total_ordering
implicitly dictates that the comparison methods are interchangable. Thus,
implementing some comparison
New submission from Ben Avrahami :
python-ideas discussion:
https://mail.python.org/archives/list/python-id...@python.org/thread/6BNJ3YSEBPHEPGXSAZGBW3TJ64ZGZIHE/
In order to allow "decorator mixins" (most notably dataclass and
total_ordering) to implement ABCs, new functionality is
Ben added the comment:
See the note in
https://docs.python.org/3.7/reference/compound_stmts.html#the-for-statement
"There is a subtlety when the sequence is being modified by the loop ..."
Since your code is mutating the all_fields list as you iterate it, you get
the " ne
Change by Ben Wolsieffer :
--
keywords: +patch
pull_requests: +21469
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22440
___
Python tracker
<https://bugs.python.org/issu
New submission from Ben Wolsieffer :
The distutils.sysconfig.get_python_inc() function finds headers relative to
sys.base_prefix or sys.base_exec_prefix. This causes problems when
cross-compiling extension modules because Python's headers are not platform
independent.
In
New submission from Ben Kurtovic :
json.dump vs. json.dumps have inconsistent error messages when encoding NaN
with allow_nan=False:
>>> json.dumps(float('nan'), allow_nan=False)
ValueError: Out of range float values are not JSON compliant
>>> json.dump(float(&
Ben Darnell added the comment:
I've fixed the test and added some commentary about the different levels of
clean shutdown we must do to quiet all the warnings:
https://github.com/python/cpython/pull/22066
--
___
Python tracker
&
Change by Ben Darnell :
--
pull_requests: +21156
pull_request: https://github.com/python/cpython/pull/22066
___
Python tracker
<https://bugs.python.org/issue39
Ben Darnell added the comment:
I can confirm that those warnings appear to be coming from the test I added
here. I'm not sure how to interpret them, though - what does it mean for the
main thread to be dangling?
--
___
Python tracker
&
Ben added the comment:
looking at the source
https://raw.githubusercontent.com/python/cpython/3.8/Doc/library/asyncio-sync.rst
it says :meth:`wait` just like the surrounding methods and surrounding
types, which all work.
Maybe :meth:`Event.wait` would fix? But why :meth:`wait` didn
Change by Ben :
--
nosy: +bjs, vstinner
___
Python tracker
<https://bugs.python.org/issue41676>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Darnell added the comment:
I've posted a pull request with a test and fix:
https://github.com/python/cpython/pull/22017. It's a more targeted fix than
cmeyer's PR (which I didn't even notice until now due to unfamiliar
Change by Ben Darnell :
--
pull_requests: +21117
pull_request: https://github.com/python/cpython/pull/22017
___
Python tracker
<https://bugs.python.org/issue39
Change by Ben :
--
nosy: +bjs
___
Python tracker
<https://bugs.python.org/issue41423>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Ben Caller added the comment:
A smaller bug: If instead of 0 you use a large number (> 2^63) e.g.
999 you get `OverflowError: Python int too large to convert to
C ssize_t` rather than the expected `tarfile.ReadError` regardless of
errorle
Ben Caller added the comment:
I've attached a minimal tar file which reproduces this. I think the minimum
length is 516 bytes.
We need a 512 byte PAX format header block as normal.
Then we need a pax header which matches the regex in
https://github.com/python/cpython
Ben Griffin added the comment:
Wow, well if you are right, then TCL/TK is a showstopper for us, and we will
have to consider an alternative to tkinter.
Frankly, I am aghast that any active software would be limited to fixed width
characters.
We moved our languages over to multiwidth (utf-8
Ben Griffin added the comment:
Erm, I don’t rightly know how to parse epaine’s comment, as it seems to relate
to a version of Unicode from over a decade ago, and a wiki page that was
written 12 years ago.
IIRC Python 3 was (IMO rightly) developed to default to UTF-8, and according to
a much
New submission from Ben Griffin :
https://stackoverflow.com/questions/62713741/tkinter-and-32-bit-unicode-duplicating-any-fix
Emoji are doubling up when using canvas.create_text()
This is reported to work on tcl/tk 8.6.10 but there’s no. Way to upgrade tcl/tk
using the standard installs from
New submission from Ben Du :
The function platform.platform() does not report detailed Linux platform
information (Ubuntu, Debain, CentOS, etc). This information is reported in
Python 3.7 and earlier.
--
components: Library (Lib)
messages: 371488
nosy: legendu
priority: normal
Ben Li-Sauerwine added the comment:
Thanks for clarifying. Using Tk.geometry() instead of Tk.winfo_geometry() does
indeed resolve the issue on Linux.
Weird that using Tk.winfo_geometry() is idempotent under Windows, though.
--
___
Python tracker
Change by Ben Li-Sauerwine :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue40945>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Ben Li-Sauerwine :
One would expect that calling TKinter.Tk.geometry(tk.winfo_geometry()) would be
idempotent. However, based on the system window frame, it is not and doing so
moves the window down the screen.
Running the example below reproduces the issue
Ben Mares added the comment:
dependencytools?
But I don't think it qualifies yet for the plural...
--
___
Python tracker
<https://bugs.python.org/is
Ben Mares added the comment:
It's great to have this feature in the standard library, but it really seems to
clutter the functools documentation. Everything else in functools applies
directly to functions and methods. Suddenly reading graph theory terminology
was disorienting for me.
New submission from Ben :
The Multiprocessing docs specifically say that Queue is process- and thread-
safe:
https://docs.python.org/3/library/multiprocessing.html#exchanging-objects-between-processes.
But this information is not given for the various synchronisation primitives
and such
Change by Ben Spiller :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue40687>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Ben Spiller :
The py.exe launcher doc states "If no relevant options are set, the commands
python and python2 will use the latest Python 2.x version installed" ... which
was indeed working reliably until Microsoft added their weird python.exe shim
(which either
Ben Boeckel added the comment:
> Presumably you looked around for ideas before figuring out the issue
Usually when "could not find foo.lib" popping up without any mention of
"foo.lib" on the link line points directly to these "autolinking" "features&qu
Ben Darnell added the comment:
No, this is unrelated to bpo-39010.
--
___
Python tracker
<https://bugs.python.org/issue39651>
___
___
Python-bugs-list mailin
Ben Darnell added the comment:
> Would it be acceptable for you to *require* use of uvloop when Tornado is
> used with AsyncIO?
How, exactly? Adding the dependency is no problem, but AFAIK I'd still be stuck
with an import-time side effect to set the event loop policy (or a .pth
Change by Ben Caller :
Removed file: https://bugs.python.org/file49022/bench_parser2.py
___
Python tracker
<https://bugs.python.org/issue39503>
___
___
Python-bugs-list m
Change by Ben Caller :
Added file: https://bugs.python.org/file49023/bench_parser2.py
___
Python tracker
<https://bugs.python.org/issue39503>
___
___
Python-bugs-list m
Ben Caller added the comment:
Instead of
repeat_10_3 = 'Basic ' + ', ' * (10 ** 3) + simple
in the benchmark, try
repeat_10_3 = 'Basic ' + ', ' * (10 ** 3) + 'A'
--
Added file: https://bugs.python.org/file49022/bench_parser2.
Ben Spiller added the comment:
Looks like on WSL the errno is errno.EACCES rather than EPERM, so we just need
to change the shutil._copyxattr error handler to also cope with that error code:
except OSError as e:
- if e.errno not in (errno.EPERM, errno.ENOTSUP
Ben Boeckel added the comment:
I believe this to be a clang bug. I've filed an issue with upstream here:
https://bugs.llvm.org/show_bug.cgi?id=45170
--
nosy: +mathstuf
___
Python tracker
<https://bugs.python.org/is
Change by Ben Thayer :
--
nosy: +benthayer
___
Python tracker
<https://bugs.python.org/issue39791>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ben Griffin added the comment:
Having looked at the code, I believe that it is best NOT to interfere with the
'default_section' value of the class, as it is used as a proxy to _defaults,
whereas the section parameter of get() is easily extended.
The actual changes are all to
New submission from Ben Griffin :
While there is now support for a single default group, mysql documentation is
clear that there is a cascade of groups for option settings, normally starting
with [client], and including version numbers..
This allows generic settings to be overridden by
Ben Darnell added the comment:
I considered using the `selectors` module directly, but it's not as simple as
it sounds. Using the low-level interface means you need to also use a
self-waker-pipe (or socket on windows) and manage a queue analogous to that
used by `call_soon_threadsafe
Ben Darnell added the comment:
I have an implementation of the selector-in-another-thread solution in
https://github.com/tornadoweb/tornado/pull/2815. Is something like this worth
considering for Python 3.9, or was Tornado the only project experiencing this
pain and a tornado-specific
Change by Ben Sokol :
--
type: behavior -> crash
versions: +Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue29298>
___
___
Python-
Ben Boeckel added the comment:
> The paths are not user provided: they are hardcoded paths from the sysconfig
> module:
No, those paths are the *replacement* values, not the input. From the trace
docs:
> trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs
This
New submission from Ben Darnell :
Proactor and selector event loops behave differently when call_soon_threadsafe
races with a concurrent call to loop.close(). In a selector event loop,
call_soon_threadsafe will either succeed or raise a RuntimeError("Event loop is
closed"). In
Ben Darnell added the comment:
I just spent some time digging into this. Each call to `run_forever` starts a
call to `_loop_self_reading`, then attempts to cancel it before returning:
https://github.com/python/cpython/blob/1ed61617a4a6632905ad6a0b440cd2cafb8b6414/Lib/asyncio
1 - 100 of 595 matches
Mail list logo