[issue18309] Make python slightly more relocatable

2022-03-14 Thread Mathias Fröhlich
Mathias Fröhlich added the comment: Hey, Shakeeb Alireza is right, the original problem was an application that links and embeds against libpython*{so,dll,dynlib} and should more easily find components like /*/lib*/python*.*/site.py and most probably now it needs to find getpath.py as well

[issue42364] Typo in french doc translation

2020-11-15 Thread Mathias MICHEL
New submission from Mathias MICHEL : In https://docs.python.org/fr/3/tutorial/inputoutput.html, § 7.1.3. Formatage de chaînes à la main After the code block the sentence between () should replace `donc` by `dont`: (Remarquez que l'espace séparant les colonnes vient de la manière dont

[issue35328] Set a environment variable for venv prompt

2020-09-19 Thread Mathias Fredriksson
Change by Mathias Fredriksson : -- pull_requests: +21368 pull_request: https://github.com/python/cpython/pull/22324 ___ Python tracker <https://bugs.python.org/issue35

[issue35328] Set a environment variable for venv prompt

2020-09-19 Thread Mathias Fredriksson
Mathias Fredriksson added the comment: I believe GH-21587 does not fully address this issue because VIRTUAL_ENV_PROMPT is being conditionally set only if VIRTUAL_ENV_DISABLE_PROMPT is unset. Shell prompts must set VIRTUAL_ENV_DISABLE_PROMPT to non-empty to prevent venv from hijacking PS1

[issue40030] Error with math.fsum() regarding float-point error

2020-03-21 Thread Mathias Talbo
New submission from Mathias Talbo : An issue occurs when running the following code. import math math.fsum([0.1, 0.2]), math.fsum([0.1, 0.7]) This should output 0.3, 0.8 respectively. Instead, it output 0.30004, 0.7999 The very floating-point error it is trying to

[issue39201] Threading.timer leaks memory in 3.8.0/3.8.1

2020-01-03 Thread Mathias
New submission from Mathias : Hi, I think there is an issue with memory allocating with threading.Timer in 3.8.0/3.8.1. When I run the attached code in Python 3.7.3 I get a memory consumption of approx. 10 MB. If I run the same code with python 3.8.0 or 3.8.1, it keeps consuming memory

[issue38830] `A Qt GUI for logging` produces TypeError

2019-11-17 Thread Samuel Mathias
New submission from Samuel Mathias : On the "logging cookbook" page: https://docs.python.org/3/howto/logging-cookbook.html#logging-cookbook The recipe "A Qt GUI for logging" produces the following error: `TypeError: update_status() missing 1 required position

[issue18309] Make python slightly more relocatable

2019-10-01 Thread Mathias Fröhlich
Mathias Fröhlich added the comment: Ok, so far. But what shall I do now? It would be nice that python is a bit smarter in finding its increasing important module files when being embedded into an application. Anybody out there who wants to look at that contribution? best Mathias

[issue18309] Make python slightly more relocatable

2019-09-26 Thread Mathias Fröhlich
Mathias Fröhlich added the comment: Yes. msg191944 from Nick Coghlan, made me think that with all the initialization rework that appeared to be underway you want to incorporate that presented idea of basing the default onto the location of the libpython.so or the pythonX.X.dll instead of

[issue18309] Make python slightly more relocatable

2019-09-25 Thread Mathias Fröhlich
Mathias Fröhlich added the comment: Hi, Nice to see some progress. Still, I checked todays https://github.com/python/cpython.git master and 3.8 branch (is that the current cpython development code?). Neither of them contain a call to dladdr beside the macos code path mentioned in msg191994

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2018-11-20 Thread Mathias Ettinger
Mathias Ettinger added the comment: I was just hit by the very same issue and added the following test into `_get_action_name` to work around it: elif isinstance(argument, _SubParsersAction): return '{%s}' % ','.join(map(str, argument.choices)) I checked #9

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Mathias Rav
Mathias Rav added the comment: Sorry for making a typo in your last name, Ivan Levkivskyi! I should know better and use copy-and-paste. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-04 Thread Mathias Rav
Mathias Rav added the comment: I have updated the patch after feedback from Jelle Zijlstra and Ivan Levkevskyi. Indeed the example was correct; the patch now adds wording from PEP 484 and PEP 526 to clarify why a function parameter annotation needs to be in quotes and a local variable

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-04 Thread Mathias Rav
Changes by Mathias Rav : -- title: typing.TYPE_CHECKING doc example is incorrect -> Change typing.TYPE_CHECKING doc example ___ Python tracker <http://bugs.python.org/issu

[issue29974] typing.TYPE_CHECKING doc example is incorrect

2017-04-03 Thread Mathias Rav
Changes by Mathias Rav : -- pull_requests: +1155 ___ Python tracker <http://bugs.python.org/issue29974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29974] typing.TYPE_CHECKING doc example is incorrect

2017-04-03 Thread Mathias Rav
New submission from Mathias Rav: The documentation of typing.TYPE_CHECKING has an example (introduced in issue #26141) that would lead to NameError at runtime. The example shows how to limit the import of "expensive_mod" to type checkers, but then goes on to use "expensive_mod.

[issue29701] Add close method to queue.Queue

2017-03-02 Thread Mathias Fröjdman
New submission from Mathias Fröjdman: queue.Queue should have a close() method. The result of calling the method would be to raise a new exception - queue.Closed, for any subsequent calls to Queue.put, and after the queue is empty, also for Queue.get. Why: To allow producers (callers of

[issue26923] asyncio.gather drops cancellation

2016-05-04 Thread Mathias Arens
Changes by Mathias Arens : -- nosy: +tatellos ___ Python tracker <http://bugs.python.org/issue26923> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24795] Make event loops with statement context managers

2015-08-05 Thread Mathias Fröjdman
Mathias Fröjdman added the comment: (Just noticed http://bugs.python.org/issue19860, which I originally failed to notice when just searching for "asyncio loop" and not context manager) Anyway, in recent Python/asyncio versions, failing to close the event loop before exiting whole t

[issue24795] Make event loops with statement context managers

2015-08-05 Thread Mathias Fröjdman
New submission from Mathias Fröjdman: Since asyncio event loops have to be closed nowadays, it would be pretty convenient and pythonic to make BaseEventLoop a context manager that calls self.close() in __exit__ the same way as contextlib.closing() does it. Example: import asyncio with

[issue23837] read pipe transport tries to resume reading after loop is gone

2015-04-01 Thread Mathias Fröjdman
New submission from Mathias Fröjdman: Script attached which reproduces the issue. Steps to reproduce: 0) Use python 3.4.3 on Linux. Does not repro with 3.4.0 or 3.4.2. 1) Create a child process with asyncio.create_child_exec and stdout=PIPE 2) loop yield from child.read(n) (i used n=2048, any

[issue18309] Make python slightly more relocatable

2013-07-04 Thread Mathias Fröhlich
Mathias Fröhlich added the comment: Hi Ronald, Eric, Nick, Looking up the symbol name of the current function should work also. And I am free to rename these functions to whatever you like. Attached is version 2 of the patch with the suggested changes. The windows implementation is still

[issue18309] Make python slightly more relocatable

2013-06-27 Thread Mathias Fröhlich
Mathias Fröhlich added the comment: Hi Eric, Thanks for looking at that ticket so fast! Reassigning this to 3.4 is great. In general, yes I can already do what I need more or less. This is the reason why I can be fine with about every python version. The point I bring up this change that I

[issue18309] Make python slightly more relocatable

2013-06-26 Thread Mathias Fröhlich
New submission from Mathias Fröhlich: Hi all, I want to move python a bit closer to be relocatable. One problem to solve is where python finds its modules. The usual lookup mechanism is to compile in a configure time determined prefix that is used as a last resort path if the paths are not set

[issue16423] urllib data URL

2012-11-24 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: Hmm, which of the two initial licenses should I choose? Which one do you rather want me to choose? -- ___ Python tracker <http://bugs.python.org/issue16

[issue16423] urllib data URL

2012-11-24 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: Will do (later today). -- ___ Python tracker <http://bugs.python.org/issue16423> ___ ___ Python-bugs-list mailing list Unsub

[issue16423] urllib data URL

2012-11-24 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: Great! Feels awesome to have my first bit of code contributed to the Python project. :) -- ___ Python tracker <http://bugs.python.org/issue16

[issue16423] urllib data URL

2012-11-17 Thread Mathias Panzenböck
Changes by Mathias Panzenböck : Removed file: http://bugs.python.org/file27994/urllib.request-data-url.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16423] urllib data URL

2012-11-17 Thread Mathias Panzenböck
Changes by Mathias Panzenböck : Added file: http://bugs.python.org/file28018/urllib.request-data-url.patch ___ Python tracker <http://bugs.python.org/issue16423> ___ ___

[issue16423] urllib data URL

2012-11-17 Thread Mathias Panzenböck
Changes by Mathias Panzenböck : Removed file: http://bugs.python.org/file28017/urllib.request-data-url.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16423] urllib data URL

2012-11-17 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: Ok, I've added a documentation and some tests. Is it ok this way? More tests? More/other documentation? -- Added file: http://bugs.python.org/file28017/urllib.request-data-url.patch ___ Python tracker

[issue16423] urllib data URL

2012-11-17 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: On 11/18/2012 12:36 AM, Antoine Pitrou wrote: > > - the patch needs a test (and docs too) > - are you sure ignoring POSTed data is the right thing to do? Shouldn't we > forbid it instead? Btw.: The file:// protocol handler also just ignore

[issue16423] urllib data URL

2012-11-17 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: On 11/18/2012 12:36 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > A couple of comments: > > - the patch needs a test (and docs too) Will do (when I have time). > - are you sure ignoring POSTed data is the right t

[issue16423] urllib data URL

2012-11-15 Thread Mathias Panzenböck
Changes by Mathias Panzenböck : -- components: +Library (Lib) -Documentation title: urllib data URL recipe -> urllib data URL type: -> enhancement ___ Python tracker <http://bugs.python.org/i

[issue16423] urllib data URL recipe

2012-11-15 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: New patch. Instead of adding the data URL support to the doc as a recipe I added it to urllib.request directly. I think this is better and justified, because the old legacy URLopener had (some kind) of support for data URLs. OT: I think that the legacy

[issue9156] socket._fileobject: read raises AttributeError when closed in another thread

2012-11-09 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: Yeah, I don't remember anymore. It was so long ago. -- ___ Python tracker <http://bugs.python.org/issue9156> ___ ___

[issue9156] socket._fileobject: read raises AttributeError when closed in another thread

2012-11-09 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: The problem is that the other thread is blocked, waiting for new client connections. A common pattern for very simple server applications (like you write during exercises at universities) is: 2 threads: 1. A server thread waiting for clients, maybe

[issue16423] urllib data URL recipe

2012-11-06 Thread Mathias Panzenböck
New submission from Mathias Panzenböck: I think it would be really helpful if urllib would support data URLs. However, I was told on the python-ideas mailing list that it would probably only added as recipe in the documentation. The attached patch adds such an recipe to the urllib.request

[issue12064] unexpected behavior with exception variable

2011-05-12 Thread Mathias Svensson
New submission from Mathias Svensson : Current behavior: In the very simple attached example an existing variable-name is used as the target in the except-part of a try-statement. The existing variable is deleted if an exception is throw. Excepted behavior: The only reasonable behaviors are

[issue9156] socket._fileobject: read raises AttributeError when closed in another thread

2010-07-04 Thread Mathias Panzenböck
New submission from Mathias Panzenböck : When you open a socket._fileobject through sock.makefile('rb') or similar and you read blocking in one thread and close the file object from another thread the reading thread gets an AttributeError. This is because the close method sets the

[issue7949] idle does not handle dark gtk color schemes

2010-02-16 Thread Mathias Panzenböck
Mathias Panzenböck added the comment: I just noticed that the debugger also suffers from this problem. Doing a quick grep over the source reveals even more places that might cause problems (where only the bg or only the fg color is set). I think in ScrolledList.py the background="

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2008-06-15 Thread Mathias Behrle
Mathias Behrle <[EMAIL PROTECTED]> added the comment: Just supporting, that proxy support over https is widely used and important. I am wondering, why this request is open for more than 2 years. Mathias -- nosy: +matb ___ Python tracker &