Simon Arlott added the comment:
Another way to do this is to call threading.main_thread().join() in another
thread and do the shutdown cleanup when it returns.
The main thread is stopped at shutdown just before the
threading._threading_atexits are called.
--
nosy: +sa
Change by Simon Wrede :
--
versions: +Python 3.11, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue46309>
___
___
Python-bug
Change by Simon Wrede :
--
keywords: +patch
pull_requests: +28710
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30505
___
Python tracker
<https://bugs.python.org/issu
Change by Simon Wrede :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue46309>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Simon Wrede :
Documentation states that a reference must be kept when creating a task,
https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task.
This is not done in StreamReaderProtocol,
https://github.com/python/cpython/blob/main/Lib/asyncio/streams.py
Simon McVittie added the comment:
I've opened https://github.com/python/cpython/pull/30417, is that what you want?
I am not a regular CPython developer, so I don't have a good way to assess
which reviewers speak for the project and which reviewers are only offering a
person
Change by Simon McVittie :
--
keywords: +patch
pull_requests: +28623
pull_request: https://github.com/python/cpython/pull/30417
___
Python tracker
<https://bugs.python.org/issue43
Change by Simon McVittie :
--
keywords: +patch
nosy: +smcv
nosy_count: 1.0 -> 2.0
pull_requests: +27431
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29154
___
Python tracker
<https://bugs.python.org/i
Simon Willison added the comment:
It looks like the relevant test is here:
https://github.com/python/cpython/blob/a1092f62492a3fcd6195bea94eccf8d5a300acb1/Lib/test/test_asyncio/test_locks.py#L722-L727
def test_explicit_lock(self):
lock = asyncio.Lock()
cond
Simon Willison added the comment:
I ran across this issue while trying to use the https://pypi.org/project/janus/
locking library with Python 3.10 - see my issue on their tracker here:
https://github.com/aio-libs/janus/issues/358
--
___
Python
New submission from Simon Willison :
In Python 3.10 it is not possible to instantiate an asyncio.Condition that
wraps an asyncio.Lock without raising a "loop argument must agree with lock"
exception.
This code raises that exception:
asyncio.Condition(asyncio.Lock())
This
New submission from Simon Aldrich :
Running a Valgrind memcheck of Py_Initialize still produces issues even when
using the suggested suppressions file. Am I doing something wrong or is this
expected?
I've attached a simple reproducer which can be run as follows:
1. Extract tarball
2.
Change by Simon Munday :
--
title: Can't import extension modules resolved via relative paths in sys.path
on Windows don't don't -> Can't import extension modules resolved via relative
paths in sys.path on Windows
___
New submission from Simon Munday :
If I attempt to import an extension module via something like this:
from pkg import extmodule
and it happens that "pkg" is found in a folder that is given in sys.path as a
relative path, then the import fails, with
ImportError: DLL load fa
simon mackenzie added the comment:
I note os.path.realpath("v1") does produce the right path in windows. Maybe
that is what you meant. Will that work cross-platform?
On Tue, 19 Jan 2021 at 18:48, simon mackenzie wrote:
> For most people the expectation would be that it returns
simon mackenzie added the comment:
For most people the expectation would be that it returns a path in the same
format as any other path. Furthermore it seems odd to change the default
behaviour after years when it worked as expected. I never heard of this
substitute path before and it does not
New submission from simon mackenzie :
os.readlink gives wrong result on python 3.8 onwards for windows
os.readlink("c:/users/simon/v1")
'?\\d:\\v1'
Should read d:\\v1
--
components: Windows
messages: 385218
nosy: paul.moore, simon mackenzie, steve.dower, t
Change by Simon Willison :
--
keywords: +patch
pull_requests: +22845
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24002
___
Python tracker
<https://bugs.python.org/issu
New submission from Simon Willison :
asyncio.sleep(0) is the recommended idiom for co-operatively yielding control
of the event loop to another task: https://github.com/python/asyncio/issues/284
and https://til.simonwillison.net/python/yielding-in-asyncio
This isn't currently explain
Change by Simon Cross :
--
nosy: +hodgestar
___
Python tracker
<https://bugs.python.org/issue42262>
___
___
Python-bugs-list mailing list
Unsubscribe:
Simon Cross added the comment:
The documentation for __ipow__ [4] suggests that the intention was to support
the modulus argument, so perhaps that argues for fixing the behaviour of
PyNumber_InPlacePower.
[4] https://docs.python.org/3/reference/datamodel.html#object.__ipow__
New submission from Simon Cross :
The documentation for PyNumber_InPlacePower [1] reads:
This is the equivalent of the Python statement o1 **= o2 when o3 is Py_None, or
an in-place variant of pow(o1, o2, o3) otherwise. If o3 is to be ignored, pass
Py_None in its place (passing NULL for o3
Change by Simon Charette :
--
nosy: +charettes
___
Python tracker
<https://bugs.python.org/issue12029>
___
___
Python-bugs-list mailing list
Unsubscribe:
Simon Willison added the comment:
I asked about this on Twitter and got a couple of tips from Google engineers:
https://twitter.com/simonw/status/1258767730263552000
It sounds like a good solution would be to explicitly design the breadcrumbs
using this mechanism:
https
New submission from Simon Willison :
When I search Google for a Python related term (e.g. "sqlite3 row" - see
attached screenshot) I get back two results - one for the Python 2
documentation and one for the Python 3 documentation.
There is currently no indicator which result is
Simon Percivall added the comment:
Any and all code from astunparse is certainly available for inclusion. Go ahead.
--
nosy: +simon.percivall
___
Python tracker
<https://bugs.python.org/issue28
Simon Biggs added the comment:
Hi pmp-p and Serhiy,
I'd be more than happy to attempt a pull request, but I imagine a change
such as this needs to be discussed first, trying not to "rush to make a
patch" (https://www.youtube.com/watch?v=voXVTjwnn-U&feature=youtu.be&t
New submission from Simon Biggs :
Since asm.js came on the scene, and now Web Assembly people have created
CPython patches to support building CPython with emscripten. See:
* https://github.com/PeachPy/EmCPython -- Python 2.7
* https://github.com/dgym/cpython-emscripten/tree/master/3.5.2
Change by Simon :
--
pull_requests: +17944
pull_request: https://github.com/python/cpython/pull/18563
___
Python tracker
<https://bugs.python.org/issue39
Simon added the comment:
The QueueListener in the logging library starts a background thread to monitor
the log event queue. The context manager support is ideal in this case, making
the code simpler, more consistent with other classes (e.g.
multiprocessing.Pool) and prompts stopping the
Simon Willison added the comment:
Oh how interesting - yes it looks like this is deliberate behavior introduced
in this commit:
https://github.com/python/cpython/commit/0e3f591aeeef9ed715f8770320f4c4c7332a8794
--
___
Python tracker
<ht
Change by Simon Willison :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue39652>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Simon Willison :
Bit of an obscure bug this one. SQLite allows column names to contain [ and ]
characters, even though those are often used as delimiters in SQLite. Here's
how to create such a database with bash:
```
sqlite3 /tmp/demo.db <
In [5]: cursor.
Change by Simon :
--
keywords: +patch
pull_requests: +17792
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18417
___
Python tracker
<https://bugs.python.org/issu
New submission from Simon :
The QueueListener could be extended to support the context manager.
--
components: Library (Lib)
messages: 361641
nosy: sbrugman
priority: normal
severity: normal
status: open
title: Logging QueueListener should support context manager
versions: Python 3.5
New submission from Simon Berens :
Sorry if this is a silly question (my first bug report), but it seems that
https://docs.python.org/3/library/functions.html#func-tuple
should say "class tuple" instead of just "tuple", as list, dict, and set do.
--
assignee: do
Simon Friedberger added the comment:
And, just to state this explicitly, I think you are right that there are
general idioms for checking if a generator can produce an item but I think it
would be nicer if iterators which could do this is in a cheap way (like in this
case) would allow it
Simon Friedberger added the comment:
Hi Tim!
Sorry, if my explanation wasn't clear.
For some of the iterators - like the one produced by ndiff - the iterator will
always return data, even if there is no difference in the files.
My current solution is to run difflib.unified_diff and
New submission from Simon Friedberger :
It seems there is no easy way to use difflib to show a diff but only when there
actually are differences. The SequenceMatcher has ratio() but that isn't really
available through Differ or any of the convenience functions. Vice versa, when
Change by Simon Friedberger :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue38789>
___
___
Python-bugs-list mailing list
Unsubscrib
simon mackenzie added the comment:
Would be clearer if the arguments were listed before the return object.
On Thu, 15 Aug 2019 at 15:05, SilentGhost wrote:
>
> SilentGhost added the comment:
>
> But docs don't say that at all. You're looking at description of an
&
simon mackenzie added the comment:
Technically true but I am not the first person to have incorrectly
interpreted this that it can be a string which suggests it is not clear to
the reader. Maybe should be explicitly stated in the description of run as
it is not obvious or intuitive.
On Thu
New submission from simon mackenzie :
The docs for subprocess.run say "The arguments used to launch the process. This
may be a list or a string."
This works in windows but in linux it has to be a list. Either needs fixing or
the docs need to be changed.
--
messages: 3
Change by Simon Bernier St-Pierre :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36686>
___
__
Change by Simon Bernier St-Pierre :
--
keywords: +patch
pull_requests: +13493
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13586
___
Python tracker
<https://bugs.python.org/issu
Simon Bernier St-Pierre added the comment:
Could be cool to also mention that `encoding` / `errors` does not work yet.
https://bugs.python.org/issue31087
--
___
Python tracker
<https://bugs.python.org/issue36
Change by Simon Bernier St-Pierre :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36687>
___
___
Pyth
Change by Simon Bernier St-Pierre :
--
nosy: sbstp
priority: normal
severity: normal
status: open
title: subprocess encoding
___
Python tracker
<https://bugs.python.org/issue36
New submission from Simon Bernier St-Pierre :
I had trouble figuring out how to simply inherit stdin, stdout, or stderr in
the asyncio.create_subprocess_exec / asyncio.subprocess_exec docs. My
experiments show that passing either None or `sys.std*` works but the way the
docs are written make
Simon Fagerholm added the comment:
Martin: Yeah, they same to be same! Can't believe I didn't find it
--
___
Python tracker
<https://bugs.python.o
Simon Fagerholm added the comment:
Issue originally from SO:
https://stackoverflow.com/questions/46976256/recursive-unittest-discovery-with-python3-and-without-init-py-files
--
___
Python tracker
<https://bugs.python.org/issue35
New submission from Simon Fagerholm :
When "python -m unittest discover" is run in a folder that is an implicit
namespace package with the structure as below, no tests are discovered.
The condition that the tests must be importable from the top level directory is
fulfilled and has b
Simon Ruggier added the comment:
I hit this problem today with what I'd consider a valid use case: I wanted to
use a static method as a default argument to a function on the same class.
Within the class definition context, automatic unwrapping of the staticmethod
object doesn't
Simon Wells added the comment:
oh the rabbit hole...
as i have other builds of python3.7 on my system i wanted to ensure it used the
correct python and python-config (python 3.7 was built and installed into
$HOME/Projects/python/inst/) as such its a rather convoluted configure command
for
Simon Wells added the comment:
ah ok, sorry i wasn't clear at first, the issue isn't when building python its
when building a library which depends on python in this case libxml2, which
when given the --enable-python stuff uses
"PYTHON_LIBS=`python$PYTHON_VERSION-config
Simon Wells added the comment:
with a fresh 3.7.0 download
./configure --prefix=... --enable-shared
make -j5
make install
path/to/python3-config --ldflags
-lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,100 -framework
CoreFoundation
New submission from Simon Wells :
if you didn't build python as a framework it adds
sysconfig.get_config_vars('LINKFORSHARED') when you run 'python-config
--ldflags' this resolves to
>>> sysconfig.get_config_var('LINKFORSHARED')
'-Wl,-stack_si
Simon Sapin added the comment:
Removing python37._pth restores the documented behavior, I don’t know if it has
adverse effects.
--
___
Python tracker
<https://bugs.python.org/issue34
New submission from Simon Sapin :
https://docs.python.org/3/library/sys.html#sys.path documents:
> As initialized upon program startup, the first item of this list, path[0], is
> the directory containing the script that was used to invoke the Python
> interpreter.
On Window
Change by Simon Sapin :
--
nosy: +ssapin
___
Python tracker
<https://bugs.python.org/issue33698>
___
___
Python-bugs-list mailing list
Unsubscribe:
simon added the comment:
Thanks
I have found teh root cause of the problem ...
--with-openssl=[my_dir]
The configure scripts has an assumption you are compiling against a binary
packaged version of openssl and that there is a /lib folder under [my_dir].
This simply does not exist under
simon added the comment:
Apologies, my bad you are correct the function was defined in x509_vfy.h
Im compiling on RHEL
Red Hat Enterprise Linux Server release 7.5 (Maipo)
I have tried Openssl from source versions;
openssl-1.0.2o (this releaseis a mess and the folder structure has been
New submission from simon :
when compiling Python 3.7.0 setup.py is reporting that the ssl module failed to
compile due to missing support for X509_VERIFY_PARAM_set1_host() despite it
existing in rsa.h for all versions of OpenSSL 1.1.0.
Could not build the ssl module!
Python requires an
Noah Simon added the comment:
Actually, you wouldn't even need to import asyncio.
--
___
Python tracker
<https://bugs.python.org/issue33447>
___
___
Pytho
New submission from Noah Simon :
It would be very useful to add an asynchronous lambda syntax, as a shortcut for
coroutines. I'm not experienced enough to write a PEP or edit the C source, but
I have some ideas for syntax:
import asyncio
foo = async lambda a,b: 5 + await
Change by Simon Baird :
--
nosy: -sbaird
___
Python tracker
<https://bugs.python.org/issue12345>
___
___
Python-bugs-list mailing list
Unsubscribe:
Simon Charette added the comment:
I stumble upon this bug when porting a Python 2 codebase to 3 and suddenly got
a NameError for the following code.
class Foo:
a = [1,2,3]
b = [4,5,6]
c = [x * y for x in a for y in b]
NameError: name 'b' is not de
New submission from Simon Lipp :
>From current `os` documentation:
> A file descriptor has an “inheritable” flag which indicates if the file
> descriptor can be inherited by child processes
from current `subprocess` documentation:
> If close_fds is true, all file descriptors exc
New submission from Simon Bouchard :
The clear list function call in made after the put(data) on the queue. But the
data is sometime clear in the queue (randomly). Since both function are call
within the same process, a race condition is not expected.
--
files: code.py
messages
Change by Simon Lipp :
--
nosy: +sloonz
___
Python tracker
<https://bugs.python.org/issue24255>
___
___
Python-bugs-list mailing list
Unsubscribe:
Simon Depiets added the comment:
The issue doesn't seem to happen on either 3.6 (with the new stdio mode) or
with win_unicode_console enabled.
I was able to reproduce it on 3.6 with the PYTHONLEGACYWINDOWSSTDIO flag
enabled, it's easier to trigger when using directional keys or mo
New submission from Simon Depiets :
A couple of users have been having issues on console output since the Fall 2017
Creator Update on Windows 10
An OSError is triggered randomly when rewriting data on the console (typically
with progress bars, for instance when you install a module with pip
New submission from Simon Lambourn :
If you assign a ConfigParser section back to the parent ConfigParser object
(say after updating the section), the section is emptied.
(I realise now that you don't need to assign the section back to the parent as
it's a proxy for the section in
Simon Descarpentries added the comment:
Hi,
I missed the part of the doc you pointed out, being focused on ratio()
function family.
Thanks for your gentle reply.
--
___
Python tracker
<https://bugs.python.org/issue31
New submission from Simon Descarpentries :
I, it's my 1st post here. I'm a French computer-science engineer with 10 years
XP and manager at Acoeuro.com SSLL compagny. I suggested a better regexp
integration on python-ideas a few months ago failing to convince getting things
done
Simon Jagoe added the comment:
In the script attached to the original issue, the weakref callback that causes
the hang is the callback defined in ThreadPoolExecutor._adjust_thread_count
Attached is a faulthandler stack captured from Python 3.6.1. The script
submitted here uses a patched
New submission from Simon Bernier St-Pierre:
Because of the special way Path and PurePath are instantiated, they can't be
inherited like a normal class. Here's an example of the issue:
>>> import pathlib
>>> class MyPath(pathlib.Path):
... pass
...
>>>
Simon Percivall added the comment:
It think it's important to document this caveat in `get_type_hints`, that there
is virtually _no_ way to use it safely with a class, and that there will always
be a high risk of getting an exception unless using this function in a highly
controlled se
New submission from Simon Percivall:
For classes with ForwardRef annotations, typing.get_type_hints is unusable.
As example, we have two files:
a.py:
class Base:
a: 'A'
class A:
pass
b.py:
from a import Base
class MyClass(Base):
b: 'B'
class B:
pass
&g
Simon Grantham added the comment:
My googling skills are a bit amiss too. I searched for some kind of
encoding pragma before reporting. Perhaps just a footnote in the basic
documentation of a python comment is the easiest solution.
Simon
On 1/10/2017 12:58 PM, Ammar Askar wrote:
> Am
Simon Grantham added the comment:
Thanks Ammar. Curiously, the comment I had put in my code was a note
regarding usage and actually didn't contain the word "coding:" but the
word "encoding:".
# curl -v --header "Transfer-Encoding: chunked" -d @somefile.tx
Changes by Simon Grantham :
--
type: -> compile error
___
Python tracker
<http://bugs.python.org/issue29226>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Simon Grantham:
Placing the word "coding:" in a hash tag comment in a file causes a syntax
error. Eg:
~ $ cat tst.py
# coding: Wow! How odd!
~ $ python tst.py
File "tst.py", line 2
SyntaxError: encoding problem: Wow
~ $
--
components: Inter
Simon Percivall added the comment:
Run this a couple of times (it fails for me the first time, but it's a race, so
YMMV):
```
import enum
from concurrent.futures import ThreadPoolExecutor
class MyEnum(enum.IntFlag):
one = 1
with ThreadPoolExecutor() as executor:
print
Simon Schuler added the comment:
I don't have any lock object. I just use the multiprocessing pool and a
QueueHandler in order to be able to log from all processes.
--
___
Python tracker
<http://bugs.python.org/is
Simon Schuler added the comment:
I want to handle the logging of the main and all my started processes. They
should all log to the same Queue.
Have a look at the sample.py program. In addition there is a inconsistency in
using a multiprocessing pool or just the process class directly. The
Simon Schuler added the comment:
Attached is a sample program to illustrate the problem. When I use a
multiprocessing pool the exception is raised.
--
Added file: http://bugs.python.org/file46160/sample.py
___
Python tracker
<http://bugs.python.
New submission from Simon Schuler:
Hello,
the following code doesn't work any longer in the new Python version 3.6.
import sys
import os
import subprocess
from multiprocessing import Pool, Value, Queue
import multiprocessing
import logging
import logging.handlers
import pickle
New submission from Simon Percivall:
When called by `_create_pseudo_member_()`, the dictionary iteration of
`_value2member_map` in `_decompose()` in enum.py may lead to a "RuntimeError:
dictionary changed size during iteration". For me, it happened in `re.compile`.
```
Traceback (m
Simon Holland added the comment:
FYI, it seems that the Tk team are unable to use cocoa for this
functionality so indicatoron has not worked on OSX for Radiobuttons or
Checkbuttons for over 4 years.
On 17 November 2016 at 18:21, Simon Holland wrote:
>
> Simon Holland added the c
Simon Holland added the comment:
Thank you
On 17 November 2016 at 15:29, Serhiy Storchaka
wrote:
>
> Serhiy Storchaka added the comment:
>
> Works to me on Linux (identical results with Tkinter and Tk). In any case
> if there is some bug on your platform, this is not Tkinter
Changes by Simon Holland :
--
nosy: +gpolo, serhiy.storchaka
___
Python tracker
<http://bugs.python.org/issue28723>
___
___
Python-bugs-list mailing list
Unsub
New submission from Simon Holland:
tkinters radiobutton's have an option 'indicatoron=0' which should display
Radio Buttons as actual labelled buttons.
button = tk.Radiobutton(self, text=option, variable = var, value = answer,
indicatoron=0)
Screenshots of expected and
Simon McVittie added the comment:
http://bugs.python.org/issue27736 might be related, or even a duplicate of this.
--
nosy: +smcv
___
Python tracker
<http://bugs.python.org/issue24
Simon McVittie added the comment:
This might be a duplicate of https://bugs.python.org/issue24853 but there
wasn't enough detail on that bug for me to be sure.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Simon McVittie:
dbus-python has a regression test for
https://bugs.freedesktop.org/show_bug.cgi?id=23831 which repeatedly initializes
the interpreter, imports dbus and finalizes the interpreter. This test passes
in Python up to 3.5, but is failing under Python 3.6 nightly
Simon added the comment:
Not sure if I should be closing the issue or if you should.
I think it is not an issue.
--
___
Python tracker
<http://bugs.python.org/issue26
Simon added the comment:
Yes, it was a debug build, I didn't know it only works in release, that's the
part I was clearly missing.
It would be great if we could have a debug embeddable zip file, but I
understand that it might be asking for a bit much.
Is the project that builds al
Simon added the comment:
Sorry I should add that
1- I do *not* have python installed on my dev machine.
2- VS2015 Enterprise.
3- Windows 10 - x64
4- *Not* running as admin
Everything else is fairly standard.
--
___
Python tracker
<h
Simon added the comment:
1- New solution Win32 "console application", (left all default settings).
2- downloaded "Gzipped source tarball" from
https://www.python.org/downloads/release/python-351/
3- Extracted everything, (didn't change anything).
4- Added "python
1 - 100 of 275 matches
Mail list logo