[issue47259] string sorting often incorrect

2022-04-08 Thread Pierre Ossman
New submission from Pierre Ossman : There is a big gotcha in Python that is easily overlooked and should at the very least be more prominently pointed out in the documentation. Sorting strings will produce results that is very confusing for humans. I happens to work for ASCII, but will

[issue46767] [Doc] sqlite3 Cursor.execute() return value is unspecified

2022-02-16 Thread Pierre Thierry
New submission from Pierre Thierry : In the documentation of the sqlite3 module, the return value for Connection.execute() is told to be the Cursor that was implicitly created, but nothing is said about the return value/type when using Cursor.execute(). -- components: Library (Lib

[issue46302] IndexError inside list comprehension + workaround

2022-01-08 Thread Pierre Fortin
Pierre Fortin added the comment: [Thanks for the replies! I was trying to post this before seeing them.] Major egg on face... The more complex the code becomes, the more likely you will be burned by a rookie mistake... var = '' var[0] WILL give IndexError -- Duh! It was bur

[issue46302] IndexError inside list comprehension + workaround

2022-01-07 Thread Pierre Fortin
New submission from Pierre Fortin : var = "u2" var.strip()[0] Works as expected, except that it returns IndexError (instead of "u") if used in a list comprehension -- at least, that's where I found it. Attached example script illustrates the issue. Call it wit

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Pierre Quentel
New submission from Pierre Quentel : In CPython 3.10 : Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> @x = 123 File

[issue44774] incorrect sys.stdout.encoding within a io.StringIO buffer

2021-07-30 Thread Pierre Carbonnelle
Pierre Carbonnelle added the comment: I can live with the workaround, so, you can close the issue if you wish. As you say, maybe it's an issue with z3. Thank you for your time. -- ___ Python tracker <https://bugs.python.org/is

[issue44774] incorrect sys.stdout.encoding within a io.StringIO buffer

2021-07-30 Thread Pierre Carbonnelle
Pierre Carbonnelle added the comment: As a work around, I had to use a temporary file (instead of a memory buffer): print("outside:", sys.stdout.encoding) with open("/tmp/log.txt", mode='w', encoding='utf-8') as buf: with redirect_std

[issue44774] incorrect sys.stdout.encoding within a io.StringIO buffer

2021-07-30 Thread Pierre Carbonnelle
Pierre Carbonnelle added the comment: I expect sys.stdout to have utf-8 encoding inside the redirect because the buffer accepts unicode code points (not bytes), just as it does outside of the redirect. In other words, I expect the 'encoding' attribute of sys.stdout to have the

[issue44774] incorrect sys.stdout.encoding within a io.StringIO buffer

2021-07-30 Thread Pierre Carbonnelle
New submission from Pierre Carbonnelle : The following code print("outside:", sys.stdout.encoding) with redirect_stdout(io.StringIO()) as f: print("inside: ", sys.stdout.encoding) print(f.getvalue()) yields: outside: utf-8 inside: None B

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-29 Thread Pierre Quentel
Pierre Quentel added the comment: I found why len() is required, it's to avoid trying to match the subject (thus consuming a part of it) if its length is less than the number of non-star patterns, as explained in the PEP. My mistake,

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-27 Thread Pierre Quentel
Pierre Quentel added the comment: Oh, I did not invent this class, it is in the test script for pattern matching : https://github.com/python/cpython/blob/6948964ecf94e858448dd28eea634317226d2913/Lib/test/test_patma.py#L1932 With this class, [x, *_, y] matches, but not [x, *w, y] : this is

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Pierre Quentel
Pierre Quentel added the comment: Thanks for the explanations, but I feel unconfortable with the fact that variable-length sequence patterns are implemented the same as unpacking. (sorry if this has been discussed before, I can't find references to the discussions that lead to the cu

[issue44741] Pattern Matching - star subpattern with a subject derived from collections.abc.Sequence

2021-07-26 Thread Pierre Quentel
New submission from Pierre Quentel : This code match range(42): case [x, *w, y]: z = 0 sets w to a list with 40 items : the length of the subject, minus the number of non-star subpatterns. But this code (adapted from test_patma_186) enters an infinite loop

[issue44589] Pattern Matching - duplicate keys in mapping patterns

2021-07-09 Thread Pierre Quentel
Pierre Quentel added the comment: Sorry, I don't know C so I can't write a PR for this change. -- ___ Python tracker <https://bugs.python.o

[issue44589] Pattern Matching - duplicate keys in mapping patterns

2021-07-09 Thread Pierre Quentel
New submission from Pierre Quentel : PEP 634 specifies that "A mapping pattern may not contain duplicate key values. (If all key patterns are literal patterns this is considered a syntax error; otherwise this is a runtime error and will raise ValueError.)" but this is not what ha

[issue44503] Hide __enter__ calls in mock_open

2021-06-24 Thread Pierre Ossman
Pierre Ossman added the comment: Also see Issue44185 for __exit__. -- ___ Python tracker <https://bugs.python.org/issue44503> ___ ___ Python-bugs-list mailin

[issue44503] Hide __enter__ calls in mock_open

2021-06-24 Thread Pierre Ossman
New submission from Pierre Ossman : I'd like to write this test case: with patch('builtins.open') as pyopen: mock_open(pyopen, read_data="foo") run() pyopen.assert_has_calls([call("filename", "wt"),

[issue44185] mock_open file handle __exit__ does not call close

2021-05-20 Thread Pierre Ossman
Change by Pierre Ossman : -- nosy: +CendioOssman ___ Python tracker <https://bugs.python.org/issue44185> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue512981] readline /dev/tty problem

2021-05-13 Thread Pierre
Pierre added the comment: A workaround consists in replacing fd(0) with /dev/tty without modifying sys.stdin import os stdin = os.dup(0) os.close(0) tty = os.open("/dev/tty", os.O_RDONLY) assert tty == 0 import readline print("input:", input()) print("

[issue512981] readline /dev/tty problem

2021-05-10 Thread Pierre
Pierre added the comment: Please, let me know if I should re-open a new bug for this one. -- ___ Python tracker <https://bugs.python.org/issue512981> ___ ___

[issue44085] Remaining invalid rules in simplified grammar

2021-05-09 Thread Pierre Quentel
New submission from Pierre Quentel : In the simplified version of Python grammar at https://docs.python.org/3.10/reference/grammar.html, most 'invalid_' from the complete grammar at https://github.com/python/cpython/blob/3.10/Grammar/python.gram have been removed, but 2 of t

[issue44052] patch object as argument should be explicit

2021-05-06 Thread Pierre Ossman
Pierre Ossman added the comment: I've always been cautious about running patch() manually since it was easy to miss the cleanup. But those fears might be irrelevant these days when we have addCleanup(). Still, decorators are a more robust in more complex setups since you don'

[issue44052] patch object as argument should be explicit

2021-05-05 Thread Pierre Ossman
New submission from Pierre Ossman : Right now if you use unittest.mock.patch() as a decorator it may or may not pass the object as an argument to the test function. The behaviour is a side effect of the argument "new" rather than something the caller can explicitly control. In

[issue512981] readline /dev/tty problem

2021-05-01 Thread Pierre
Pierre added the comment: I suggest to reopen this issue as there was a regression with python3. import sys sys.stdin = open("/dev/tty", "r") import readline print(input()) Write some text and press left. Expected: the cursor goes left. Actual: prints '^[[D

[issue42916] Support for DICOM image file format in imghdr module

2021-04-11 Thread Pierre-Alain Moret
Pierre-Alain Moret added the comment: The DICOM format is indeed very widely used in the medical field and for me it deserves to be added in stdlib. I do not see why it is more specific than rast format which is included. Moreover it should be easy to add because even if the complete format

[issue42833] Lib/urllib/request.py: digest algorithm should be case insensitive

2021-01-05 Thread Pierre Tardy
Change by Pierre Tardy : -- pull_requests: +22953 status: pending -> open pull_request: https://github.com/python/cpython/pull/24122 ___ Python tracker <https://bugs.python.org/issu

[issue42833] Lib/urllib/request.py: digest algorithm should be case insensitive

2021-01-05 Thread Pierre Tardy
New submission from Pierre Tardy : original bug report: https://github.com/buildbot/buildbot/issues/5743 Twisted by default advertises its algorithm in lowercase, which is uncommon, but allowed by the spec. https://tools.ietf.org/html/rfc3230#section-4.1.1 python's request.py is

[issue42833] Lib/urllib/request.py: digest algorithm should be case insensitive

2021-01-05 Thread Pierre Tardy
Change by Pierre Tardy : -- components: +Library (Lib) status: open -> pending ___ Python tracker <https://bugs.python.org/issue42833> ___ ___ Python-bugs-lis

[issue41915] unittest.mock.create_autospec(Obj, instance=True) has self keyword in _spec_signature if Obj implements __call__

2020-12-04 Thread Pierre Ossman
Pierre Ossman added the comment: autospec's behaviour for methods is currently needed to work around Issue42556, so be careful with any fixes here so they don't break that workaround. -- nosy: +CendioOssman ___ Python track

[issue42556] unittest.mock.patch() cannot properly mock methods

2020-12-03 Thread Pierre Ossman
New submission from Pierre Ossman : unittest.mock.patch() as it currently works cannot properly mock a method as it currently replaces it with something more mimicking a function. I.e. the descriptor magic that includes "self" isn't properly set up. In most cases this doesn&

[issue42320] unexpected difference between map and list

2020-11-11 Thread Pierre van de Laar
Pierre van de Laar added the comment: Not a bug: tuple is an iterator but an iterator is not a tuple. Yet iterators are often accepted during initialization... -- resolution: -> not a bug stage: -> resolved status: open -> closed _

[issue42320] unexpected difference between map and list

2020-11-11 Thread Pierre van de Laar
Pierre van de Laar added the comment: Zip didn't contain the test cases from the tests directory (sorry for that) -- Added file: https://bugs.python.org/file49592/tests.zip ___ Python tracker <https://bugs.python.org/is

[issue42320] unexpected difference between map and list

2020-11-11 Thread Pierre van de Laar
New submission from Pierre van de Laar : On windows, with python 3.9, with unittests, My test case fails when I use the following lines of code ``` result = map(lambda x: self.substitute_in_expression(x), sequence.sequence) ``` It works fine with ``` result = list() for x

[issue39492] reference cycle affecting Pickler instances (Python3.8+)

2020-01-29 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +17643 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18266 ___ Python tracker <https://bugs.python.org/issu

[issue39492] reference cycle affecting Pickler instances (Python3.8+)

2020-01-29 Thread Pierre Glaser
New submission from Pierre Glaser : The new Pickler reducer_override mechanism introduced in `Python3.8` generates a reference cycle: for optimization purposes, a the pickler.reducer_override bound method is referenced into the reducer_override attribute of the Pickler's struct. Thus,

[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier
Change by Pierre Chatelier : -- versions: +Python 3.8 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue32371> ___ ___ Python-bugs-list mailin

[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier
Pierre Chatelier added the comment: Aaand finally there is still something : it depends on the call context. Once in a C++/CLI class, the link bug occurs again. Here is attached a minimal project. -- status: closed -> open Added file: https://bugs.python.org/file48721/PythonFromC.

[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier
Pierre Chatelier added the comment: Just reproduced and solved it at the same time ! It happened with Debug build, where I linked to pythonxx.lib instead of pythonxx_d.lib, because I did not download the debug binaries. Ultimately : my fault

[issue32371] Delay-loading of python dll is impossible when using some C macros

2019-11-19 Thread Pierre Chatelier
Pierre Chatelier added the comment: Can't reproduce any more. It might have been specific to the Visual Studio version I used at that time. -- ___ Python tracker <https://bugs.python.org/is

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-14 Thread Pierre Quentel
Pierre Quentel added the comment: That was a quick fix, thanks ! -- ___ Python tracker <https://bugs.python.org/issue38469> ___ ___ Python-bugs-list mailin

[issue38469] PEP 572 : assignment expression to a global variable in a comprehension

2019-10-13 Thread Pierre Quentel
New submission from Pierre Quentel : PEP 572 says that "an assignment expression occurring in a (...) comprehension (...) binds the target in the containing scope, honoring a nonlocal or global declaration for the target in that scope, if one exists." In Appendix B, the PEP

[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2019-09-29 Thread Pierre Quentel
Pierre Quentel added the comment: Now that the PR has been merged, can someone close the issue ? -- ___ Python tracker <https://bugs.python.org/issue20

[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-24 Thread Pierre Quentel
Pierre Quentel added the comment: @ethan.furman Yes, in test_cgi.py, the method test_fieldstorage_multipart_w3c https://github.com/python/cpython/blob/master/Lib/test/test_cgi.py#L316) uses a multipart content with 2 files in it (https://github.com/python/cpython/blob/master/Lib/test

[issue37921] Improve zipfile: add support for symlinks

2019-09-21 Thread Pierre-Jean Grenier
Pierre-Jean Grenier added the comment: The PR went through review and has been awaiting core review for almost a month, anyone to have a look at it? :) -- ___ Python tracker <https://bugs.python.org/issue37

[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-09-13 Thread Pierre Quentel
Pierre Quentel added the comment: The patch has been applied some time ago (I couldn't find the exact commit), cf. https://github.com/python/cpython/blob/master/Lib/cgi.py#L750 I think we can close the issue. -- nosy: +quentel ___ Python tr

[issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+

2019-09-10 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +15524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15883 ___ Python tracker <https://bugs.python.org/issu

[issue38082] datetime.time object incorrectly shows associated date in strftime() output

2019-09-10 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +15523 pull_request: https://github.com/python/cpython/pull/15882 ___ Python tracker <https://bugs.python.org/issue38

[issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+

2019-09-10 Thread Pierre Glaser
Pierre Glaser added the comment: > Dropping this into Lib/multiprocessing/spawn.py should cause a repro: if WINSERVICE: _python_exe = os.path.join(sys.exec_prefix, 'python.exe') else: _python_exe = getattr(sys, '_base_executable', sys.ex

[issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+

2019-09-10 Thread Pierre Glaser
New submission from Pierre Glaser : If I am not mistaken, when creating a new process on Python3.7 and later on Windows, if using a virtualenv, Python now uses a launcher. The launcher is being notified that it must create a virtual-environment Python (and not a system Python) program using

[issue37921] Improve zipfile: add support for symlinks

2019-08-22 Thread Pierre-Jean Grenier
Change by Pierre-Jean Grenier : -- keywords: +patch pull_requests: +15108 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15401 ___ Python tracker <https://bugs.python.org/issu

[issue37921] Improve zipfile: add support for symlinks

2019-08-22 Thread Pierre-Jean Grenier
New submission from Pierre-Jean Grenier : The module tarfile contains some methods for knowing whether an archive member is a regular file/a directory/a symlink. Apart from an "is_dir()" method, there was nothing alike in the zipfile module. For an on-going project, I needed to kn

[issue28053] parameterize what serialization is used in multiprocessing

2019-07-31 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +14807 pull_request: https://github.com/python/cpython/pull/15058 ___ Python tracker <https://bugs.python.org/issue28

[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-29 Thread Pierre Glaser
Pierre Glaser added the comment: Sure, although I won't be able to merge it. Make sure you ping a core-dev such as pitrou or davin :-) -- ___ Python tracker <https://bugs.python.org/is

[issue37652] Multiprocessing shared_memory ValueError on race with ShareableList

2019-07-26 Thread Pierre Glaser
Pierre Glaser added the comment: The root of the error is that struct.pack_into starts by memsetting the underlying memory area with NULL bytes before filling the data with memcpy. If ShareableList._get_packing_format is called between the two operations (through a concurrent __getitem__

[issue16512] imghdr doesn't recognize variant jpeg formats

2019-07-19 Thread Pierre Chopin
Change by Pierre Chopin : -- pull_requests: +14651 pull_request: https://github.com/python/cpython/pull/14862 ___ Python tracker <https://bugs.python.org/issue16

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Pierre Chopin
Pierre Chopin added the comment: This is actually a duplicate of bpo-16512, i am closing this. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue37629] Imghdr doesnt recognise some jpeg

2019-07-19 Thread Pierre Chopin
New submission from Pierre Chopin : the imghdr library only checks for the presence of (b'JFIF', b'Exif') in the header, which is excluding some valid JPEG file. This is an example of not recognised ile -- files: e2006bd7-51d7-4554-9738-ea13207fd104.jpg messages:

[issue37209] Add what's new entries for pickle enhancements

2019-07-01 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +14319 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14503 ___ Python tracker <https://bugs.python.org/issu

[issue37244] test_multiprocessing_forkserver: test_resource_tracker() failed on x86 Gentoo Refleaks 3.8

2019-06-21 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +14110 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14288 ___ Python tracker <https://bugs.python.org/issu

[issue36888] Create a way to check that the parent process is alive for deamonized processes

2019-06-21 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +14108 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/14286 ___ Python tracker <https://bugs.python.org/issu

[issue37185] use os.memfd_create in multiprocessing.shared_memory?

2019-06-06 Thread Pierre Glaser
New submission from Pierre Glaser : Hi, Following https://bugs.python.org/issue26836, I started thinking about using memfd_create instead of shm_open for creating shared-memory segments in multiprocessing.shared_memory. The main advantage of memfd_create over shm_open is that the generated

[issue26836] Add memfd_create to os module

2019-06-02 Thread Pierre Glaser
Pierre Glaser added the comment: >From a quick skim at the man page of memfd_create, this looks promising. -- ___ 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-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

[issue36977] SharedMemoryManager should relase its resources when its parent process dies

2019-05-20 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +13360 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36977> ___ ___ Py

[issue36977] SharedMemoryManager should relase its resources when its parent process dies

2019-05-20 Thread Pierre Glaser
New submission from Pierre Glaser : The new multiprocessing.managers.SharedMemoryManager spawns a server that delivers memory segments to a parent Python process. If the parent process terminates unexpectedly, we should now make the manager process notice this termination it using the recent

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Pierre Glaser added the comment: Just did so. -- ___ Python tracker <https://bugs.python.org/issue36950> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +13318 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36950> ___ ___ Py

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Pierre Glaser added the comment: Lib/test/test_asyncio/utils.py defines a similar helper: def run_until(loop, pred, timeout=30): deadline = time.monotonic() + timeout while not pred(): if timeout is not None: timeout = deadline - time.monotonic() if

[issue36950] test.support: add an helper to wait for an event with a timeout

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- nosy: +pierreglaser ___ Python tracker <https://bugs.python.org/issue36950> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- nosy: +pierreglaser ___ Python tracker <https://bugs.python.org/issue24882> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35933] python doc does not say that the state kwarg in Pickler.save_reduce can be a tuple (and not only a dict)

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35933> ___ ___ Pyth

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-05-18 Thread Pierre Glaser
Change by Pierre Glaser : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36368> ___ ___ Pyth

[issue36894] test_multiprocessing_spawn regression on Windows

2019-05-13 Thread Pierre Glaser
Pierre Glaser added the comment: Thanks for the fix Antoine. -- ___ Python tracker <https://bugs.python.org/issue36894> ___ ___ Python-bugs-list mailin

[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +13203 ___ Python tracker <https://bugs.python.org/issue36867> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Pierre Glaser
Pierre Glaser added the comment: We can do that, or maybe we can try to wait on the `resource_tracker's` pid? -- ___ Python tracker <https://bugs.python.org/is

[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +13182 ___ Python tracker <https://bugs.python.org/issue36867> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Pierre Glaser
Pierre Glaser added the comment: Actually, I was properly unlinking the shared_memory segments. The warning messages are due to bad interactions between the ResourceTracker and the SharedMemoryManager object. In this particular case, it's easy to change a little bit the problematic te

[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Pierre Glaser
Pierre Glaser added the comment: Yes, one test I wrote in an unrelated commit does not unlink a memory segment. Now the ResourceTracker complains. Fixing it now. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36867] Make semaphore_tracker track other system resources

2019-05-11 Thread Pierre Glaser
Pierre Glaser added the comment: Shared memory segments are now tracked by the brand new resource_tracker! Thanks Antoine for the review. Does anyone have an opinion on introducing a public API for users to make the resource_tracker track resources of their choice? What We have in mind is

[issue36338] urlparse of urllib returns wrong hostname

2019-05-10 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +13146 ___ Python tracker <https://bugs.python.org/issue36338> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36874] Support CDATA by xml.etree.(c)ElementTree

2019-05-10 Thread Pierre van de Laar
New submission from Pierre van de Laar : I would like to add information to CDATA in an Xml Tree. Turns out I am not the only one: https://stackoverflow.com/questions/174890/how-to-output-cdata-using-elementtree Can the library be extended to also support CDATA (similar to Comment)? Saves a

[issue36867] Make semaphore_tracker track other system resources

2019-05-09 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +13132 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36867> ___ ___ Py

[issue36867] Make semaphore_tracker track other system resources

2019-05-09 Thread Pierre Glaser
New submission from Pierre Glaser : Hi all, Olivier Grisel, Thomas Moreau and myself are currently working on increasing the range of action of the semaphore_tracker in Python. multiprocessing.semaphore_tracker is a little known module, that launches a server process used to track the life

[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

[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-03-27 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +12530 ___ Python tracker <https://bugs.python.org/issue35900> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +12526 ___ Python tracker <https://bugs.python.org/issue36338> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +12525 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36338> ___ ___ Python-bugs-list mai

[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-03-22 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +12449 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35900> ___ ___ Python-bugs-list mai

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-03-21 Thread Pierre Glaser
Pierre Glaser added the comment: Done. -- ___ Python tracker <https://bugs.python.org/issue36368> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-03-21 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +12436 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36368> ___ ___ Python-bugs-list mai

[issue36338] urlparse of urllib returns wrong hostname

2019-03-21 Thread Pierre Glaser
Change by Pierre Glaser : -- keywords: +patch pull_requests: +12435 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36338> ___ ___ Py

[issue36368] server process of shared_memory shuts down if KeyboardInterrupt

2019-03-19 Thread Pierre Glaser
New submission from Pierre Glaser : When starting a SharedMemoryManager in an interactive session, any KeyboardInterrupt event will be transmitted to the (sub)process running the shared memory server, which causes the Manager to be unusable thereafter: >>> from multiprocessing

[issue36364] errors in multiprocessing.shared_memory examples

2019-03-19 Thread Pierre Glaser
Change by Pierre Glaser : -- pull_requests: +12394 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36364> ___ ___ Python-bugs-list mai

[issue36364] errors in multiprocessing.shared_memory examples

2019-03-19 Thread Pierre Glaser
New submission from Pierre Glaser : The examples of the new shared_memory module using SharedMemoryManager try to import the class from multiprocessing.shared_memory instead of multiprocessing.managers, making them fail. -- assignee: docs@python components: Documentation files: 0001

[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-03-11 Thread Pierre Glaser
Pierre Glaser added the comment: Update: Instead of changing permission on some attributes of function objects (__globals__ and __closure__), we added an optional argument called state_setter to save_reduce. This expects a callable that will be saved inside the object's pickle string

[issue35933] python doc does not say that the state kwarg in Pickler.save_reduce can be a tuple (and not only a dict)

2019-02-20 Thread Pierre Glaser
Pierre Glaser added the comment: I added a PR with a small patch to document this behavior and reconcile _pickle.c and pickle.py Some explanations on why I am pushing this forward: Pickling instances of classes/subclasses with slots is done natively for pickle protocol >= 2. Mention

  1   2   3   >