[issue41962] Make threading._register_atexit public?

2022-02-03 Thread Simon Arlott
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

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-11 Thread Simon Wrede
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

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-09 Thread Simon Wrede
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

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-08 Thread Simon Wrede
Change by Simon Wrede : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46309> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46309] Task created by StreamReaderProtocol gets garbage collected.

2022-01-08 Thread Simon Wrede
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

[issue43137] webbrowser to support "gio open "

2022-01-05 Thread Simon McVittie
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

[issue43137] webbrowser to support "gio open "

2022-01-05 Thread Simon McVittie
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

[issue43137] webbrowser to support "gio open "

2021-10-22 Thread Simon McVittie
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

[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-08 Thread Simon Willison
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

[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-08 Thread Simon Willison
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

[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-08 Thread Simon Willison
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

[issue43967] Valgrind memcheck on Py_Initialize

2021-04-28 Thread Simon Aldrich
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.

[issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows

2021-02-02 Thread Simon Munday
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 ___

[issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows don't don't

2021-02-02 Thread Simon Munday
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

[issue42957] os.readlink produces wrong result on windows

2021-01-19 Thread simon mackenzie
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

[issue42957] os.readlink produces wrong result on windows

2021-01-19 Thread simon mackenzie
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

[issue42957] os.readlink produces wrong result on windows

2021-01-18 Thread simon mackenzie
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

[issue42783] asyncio.sleep(0) idiom is not documented

2020-12-29 Thread Simon Willison
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

[issue42783] asyncio.sleep(0) idiom is not documented

2020-12-29 Thread Simon Willison
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

[issue42262] [C API] Add Py_NewRef() function to get a new strong reference to an object

2020-11-04 Thread Simon Cross
Change by Simon Cross : -- nosy: +hodgestar ___ Python tracker <https://bugs.python.org/issue42262> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Simon Cross
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__

[issue41903] PyNumber_InPlacePower ignores o3 if o1 implements __ipow__

2020-10-01 Thread Simon Cross
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

[issue12029] Allow catching virtual subclasses in except clauses

2020-07-02 Thread Simon Charette
Change by Simon Charette : -- nosy: +charettes ___ Python tracker <https://bugs.python.org/issue12029> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-05-08 Thread Simon Willison
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

[issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP

2020-05-08 Thread Simon Willison
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

[issue28002] ast.unparse can't roundtrip some f-strings

2020-04-19 Thread Simon Percivall
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

[issue40280] Consider supporting emscripten/webassembly as a build target

2020-04-14 Thread Simon Biggs
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

[issue40280] Consider supporting emscripten/webassembly as a build target

2020-04-14 Thread Simon Biggs
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

[issue39589] Logging QueueListener should support context manager

2020-02-19 Thread Simon
Change by Simon : -- pull_requests: +17944 pull_request: https://github.com/python/cpython/pull/18563 ___ Python tracker <https://bugs.python.org/issue39

[issue39589] Logging QueueListener should support context manager

2020-02-19 Thread Simon
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

[issue39652] sqlite3 bug handling column names that contain square braces

2020-02-16 Thread Simon Willison
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

[issue39652] sqlite3 bug handling column names that contain square braces

2020-02-16 Thread Simon Willison
Change by Simon Willison : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue39652> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue39652] sqlite3 bug handling column names that contain square braces

2020-02-16 Thread Simon Willison
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.

[issue39589] Logging QueueListener should support context manager

2020-02-08 Thread Simon
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

[issue39589] Logging QueueListener should support context manager

2020-02-08 Thread Simon
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

[issue39112] Misleading documentation for tuple

2019-12-20 Thread Simon Berens
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

[issue38789] difflib lacks a way to check if results are empty

2019-11-18 Thread Simon Friedberger
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

[issue38789] difflib lacks a way to check if results are empty

2019-11-18 Thread Simon Friedberger
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

[issue38789] difflib lacks a way to check if results are empty

2019-11-13 Thread Simon Friedberger
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

[issue38789] difflib lacks a way to check if results are empty

2019-11-13 Thread Simon Friedberger
Change by Simon Friedberger : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue38789> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37867] docs says subprocess.run accepts a string but this does not work on linux

2019-08-15 Thread simon mackenzie
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 &

[issue37867] docs says subprocess.run accepts a string but this does not work on linux

2019-08-15 Thread simon mackenzie
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

[issue37867] docs says subprocess.run accepts a string but this does not work on linux

2019-08-15 Thread simon mackenzie
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

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-27 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36686> ___ __

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-05-26 Thread Simon Bernier St-Pierre
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

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-04-20 Thread Simon Bernier St-Pierre
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

[issue36687] subprocess encoding

2019-04-20 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36687> ___ ___ Pyth

[issue36687] subprocess encoding

2019-04-20 Thread Simon Bernier St-Pierre
Change by Simon Bernier St-Pierre : -- nosy: sbstp priority: normal severity: normal status: open title: subprocess encoding ___ Python tracker <https://bugs.python.org/issue36

[issue36686] Docs: asyncio.loop.subprocess_exec documentation is confusing, it's not clear how to inherit stdin, stdout or stderr in the subprocess

2019-04-20 Thread Simon Bernier St-Pierre
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

[issue35617] unittest discover does not work with implicit namespaces

2018-12-30 Thread Simon Fagerholm
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

[issue35617] unittest discover does not work with implicit namespaces

2018-12-30 Thread Simon Fagerholm
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

[issue35617] unittest discover does not work with implicit namespaces

2018-12-30 Thread Simon Fagerholm
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

[issue20309] Not all method descriptors are callable

2018-11-21 Thread Simon Ruggier
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

[issue34960] macOS builds expose stack_size option in LINKEDFOORSHARED and pyconfig

2018-10-11 Thread Simon Wells
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

[issue34960] python-config bad ldflags on macOS

2018-10-11 Thread Simon Wells
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

[issue34960] python-config bad ldflags on macOS

2018-10-11 Thread Simon Wells
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

[issue34960] python-config bad ldflags on macOS

2018-10-11 Thread Simon Wells
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

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2018-09-29 Thread Simon Sapin
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

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2018-09-29 Thread Simon Sapin
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

[issue33698] `._pth` does not allow to populate `sys.path` with empty entry

2018-09-29 Thread Simon Sapin
Change by Simon Sapin : -- nosy: +ssapin ___ Python tracker <https://bugs.python.org/issue33698> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-05 Thread simon
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

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-03 Thread simon
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

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2018-07-03 Thread simon
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

[issue33447] Asynchronous lambda syntax

2018-05-08 Thread Noah Simon
Noah Simon added the comment: Actually, you wouldn't even need to import asyncio. -- ___ Python tracker <https://bugs.python.org/issue33447> ___ ___ Pytho

[issue33447] Asynchronous lambda syntax

2018-05-08 Thread Noah Simon
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

[issue12345] Add math.tau

2018-04-09 Thread Simon Baird
Change by Simon Baird : -- nosy: -sbaird ___ Python tracker <https://bugs.python.org/issue12345> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3692] improper scope in list comprehension, when used in class declaration

2018-03-17 Thread Simon Charette
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

[issue33079] subprocess: document the interaction between subprocess.Popen and os.set_inheritable

2018-03-15 Thread Simon Lipp
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

[issue32879] Race condition in multiprocessing Queue

2018-02-19 Thread Simon Bouchard
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

[issue24255] Replace debuglevel-related logic with logging

2018-02-09 Thread Simon Lipp
Change by Simon Lipp : -- nosy: +sloonz ___ Python tracker <https://bugs.python.org/issue24255> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-10 Thread Simon Depiets
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

[issue32245] OSError: raw write() returned invalid length on latest Win 10 Consoles

2017-12-07 Thread Simon Depiets
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

[issue32108] configparser bug: section is emptied if you assign a section to itself

2017-11-21 Thread Simon Lambourn
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

[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-11-07 Thread Simon Descarpentries
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

[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-10-28 Thread Simon Descarpentries
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

[issue21009] Potential deadlock in concurrent futures when garbage collection occurs during Queue.get

2017-09-10 Thread Simon Jagoe
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

[issue30957] pathlib: Path and PurePath cannot be subclassed

2017-07-17 Thread Simon Bernier St-Pierre
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 ... >>>

[issue29966] typing.get_type_hints doesn't really work for classes with ForwardRefs

2017-04-11 Thread Simon Percivall
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

[issue29966] typing.get_type_hints doesn't really work for classes with ForwardRefs

2017-04-03 Thread Simon Percivall
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

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
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

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
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

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
Changes by Simon Grantham : -- type: -> compile error ___ Python tracker <http://bugs.python.org/issue29226> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue29226] Comment generates syntax error

2017-01-10 Thread Simon Grantham
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

[issue29167] Race condition in enum.py:_decompose()

2017-01-07 Thread Simon Percivall
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

[issue29168] multiprocessing pickle error

2017-01-05 Thread Simon Schuler
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

[issue29168] multiprocessing pickle error

2017-01-05 Thread Simon Schuler
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

[issue29168] multiprocessing pickle error

2017-01-05 Thread Simon Schuler
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.

[issue29168] multiprocessing pickle error

2017-01-05 Thread Simon Schuler
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

[issue29167] Race condition in enum.py:_decompose()

2017-01-05 Thread Simon Percivall
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

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-17 Thread Simon Holland
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

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-17 Thread Simon Holland
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

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-16 Thread Simon Holland
Changes by Simon Holland : -- nosy: +gpolo, serhiy.storchaka ___ Python tracker <http://bugs.python.org/issue28723> ___ ___ Python-bugs-list mailing list Unsub

[issue28723] tkinter, radiobutton, indicatoron=0 has no effect.

2016-11-16 Thread Simon Holland
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

[issue24853] Py_Finalize doesn't clean up PyImport_Inittab

2016-08-11 Thread Simon McVittie
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

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-11 Thread Simon McVittie
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

[issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults

2016-08-11 Thread Simon McVittie
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

[issue26598] Embbedable zip does not import modules in (zip)subdirectory

2016-03-22 Thread Simon
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

[issue26598] Embbedable zip does not import modules in (zip)subdirectory

2016-03-22 Thread Simon
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

[issue26598] Embbedable zip does not import modules in (zip)subdirectory

2016-03-21 Thread Simon
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

[issue26598] Embbedable zip does not import modules in (zip)subdirectory

2016-03-21 Thread Simon
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   2   3   >