[issue22996] Order of _io objects finalization can lose data in reference cycles
Serhiy Storchaka added the comment: Note that the same issue is exist with gzip, bz2, lzma, tarfile and zipfile (or even worse). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22996 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22984] test_json.test_endless_recursion(): Fatal Python error: Cannot recover from stack overflow. on x86 XP-4 3.x buildbot
Serhiy Storchaka added the comment: I think this patch will break the purpose of the test. We should fix the issue instead of hide it from tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22984] test_json.test_endless_recursion(): Fatal Python error: Cannot recover from stack overflow. on x86 XP-4 3.x buildbot
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22926] asyncio: raise an exception when called from the wrong thread
STINNER Victor added the comment: Ok, here is an updated patch (version 2): - tests still ensure that the event loop is passed explicitly - call_soon() cie now fail if the policy has no event loop set for the current thread (before it only failed if the event loop set in the policy was different than the called event loop) I'm not sure that this particular change is a great idea. I kind of liked that unittests ensure that loop is passed everywhere explicitly in asyncio. I agree, but we can just monkey-patch the _assert_is_current_event_loop() to disable the check even if debug mode. For example, it can be done in test_utils.TestCase.set_event_loop(), no need to modify individual test cases. Maybe only in debug mode? Oh sorry, I forgot to mention that my patch only enhance an existing test, _assert_is_current_event_loop(), which is only done in debug mode. I'm so happy to have this debug mode, at the beginning Guido didn't want it :-D - modify BaseEventLoop._assert_is_current_event_loop() to fail if the thread has an event loop Oops, the method already fails if the event loop is different than the current event loop of the policy. My patch changes the behaviour when the policy has *no* current event loop. In your patch, you should also replace 'except AsserionError' with 'except RuntimeError'. Ok, that's why we must reject any patch without unit test :-D I still think you shouldn't set the thread when the loop is created but only when run*() is active. (Using call_later() from another thread when the loop is inactive should not be an error IMO -- there's nothing against passing a selector instance to another thread as long as only one thread at a time waits for it.) Hum, I'm not fully convinced. Technically, it works to call call_soon() instead of call_soon_threadsafe() when the event loop is not running yet. But multithreading means race condition. It probably means that in most cases, calling call_soon() would work because the event loop didn't start yet, but in some cases, the event loop may already run depending on the timing. I prefer to force users to always use call_soon_threadsafe() to avoid bad suprises. -- Added file: http://bugs.python.org/file37364/asyncio_thread-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22599] traceback: errors in the linecache module at exit
Roundup Robot added the comment: New changeset cd3244416592 by Victor Stinner in branch '3.4': Issue #22599: Enhance tokenize.open() to be able to call it during Python https://hg.python.org/cpython/rev/cd3244416592 New changeset 22f2784a276e by Victor Stinner in branch 'default': (Merge 3.4) Issue #22599: Enhance tokenize.open() to be able to call it during https://hg.python.org/cpython/rev/22f2784a276e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22599 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22599] traceback: errors in the linecache module at exit
STINNER Victor added the comment: Yes, please do this. Ok done. I only added the test to default, not in the 3.4 branch. As Antoine noticed, the test is fragile, I perfer to not backport it. Ok, let's focus now on the issue #22696 ;-) -- dependencies: -Add a function to know about interpreter shutdown resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22599 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22696] Add a function to know about interpreter shutdown
STINNER Victor added the comment: After solving this issue we should reconsider the traceback_ignore_linecache_error.patch patch in issue22599. I reposted the patch in this issue since I just closed the issue #22599. -- Added file: http://bugs.python.org/file37365/traceback_ignore_linecache_error.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22696 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22984] test_json.test_endless_recursion(): Fatal Python error: Cannot recover from stack overflow. on x86 XP-4 3.x buildbot
STINNER Victor added the comment: I think this patch will break the purpose of the test. We should fix the issue instead of hide it from tests. The test ensures that json calls Py_EnterRecursiveCall() which relies on sys.getrecursionlimit(), see the commit below. There is no generic fix for C stack overflow. The tes failed on Windows XP which is no more supported, I don't think that it's interesting to spend time on it. changeset: 70021:9557e4eeb291 branch: 3.1 parent: 69997:b7abf0590e1c user:Ezio Melotti ezio.melo...@gmail.com date:Wed May 11 01:02:56 2011 +0300 files: Lib/json/tests/test_recursion.py Misc/NEWS Modules/_json.c description: #12051: Fix segfault in json.dumps() while encoding highly-nested objects using the C accelerations. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22999] Copying emoji to Windows clipboard corrupts string in Python 3.3 and up
New submission from Cees Timmerman: # http://stackoverflow.com/a/25678113/819417 def copy(data): if not isinstance(data, unicode): data = data.decode('mbcs') OpenClipboard(None) EmptyClipboard() hCd = GlobalAlloc(GMEM_DDESHARE, 2 * (len(data) + 1)) pchData = GlobalLock(hCd) wcscpy(ctypes.c_wchar_p(pchData), data) GlobalUnlock(hCd) SetClipboardData(CF_UNICODETEXT, hCd) CloseClipboard() Emoji (\U0001f400) is copied as (\U0001f4cb), or . turns to (note the period). It works fine in Python 3.2.5. -- components: Unicode messages: 232188 nosy: Cees.Timmerman, ezio.melotti, haypo priority: normal severity: normal status: open title: Copying emoji to Windows clipboard corrupts string in Python 3.3 and up type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22999 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22999] Copying emoji to Windows clipboard corrupts string in Python 3.3 and up
Cees Timmerman added the comment: A copy of my test program at https://gist.github.com/CTimmerman/133cb80100357dde92d8 -- Added file: http://bugs.python.org/file37366/test_clipboard_win.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22999 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22999] Copying emoji to Windows clipboard corrupts string in Python 3.3 and up
Amaury Forgeot d'Arc added the comment: (you swapped the unicode values: \U0001f4cb is copied as \U0001f400) On Windows, strings have changed in 3.3. See in https://docs.python.org/3/whatsnew/3.3.html, len() now always returns 1 for non-BMP characters. The call to GlobalAlloc should use the number of wchar_t units, something like len(data.encode('utf-16')) + 2 -- nosy: +amaury.forgeotdarc resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22999 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22999] Copying emoji to Windows clipboard corrupts string in Python 3.3 and up
Amaury Forgeot d'Arc added the comment: Better use utf-16-le encoding: len(data.encode('utf-16-le')) + 2 otherwise the encoded bytes start with the \fffe BOM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22999 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22994] datetime buggy
santhosh added the comment: Thanks simeon.visser, I understood your point. Didn't got your point earlier. Hey belopolsky, Here is the solution val=datetime.datetime.strptime(2015-02-01,'%Y-%m-%d').date() zon=pytz.timezone('US/Pacific') Bad Code: dt=datetime.datetime(val.year,val.month,val.day, tzinfo=zon) Good Code: dt=zon.localize(datetime.datetime(val.year,val.month,val.day)) In Linux, good code works perfectly Both code are working perfectly in Mac -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22994 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22394] Update documentation building to use venv and pip
Changes by Brett Cannon br...@python.org: -- assignee: georg.brandl - brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22394 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
R. David Murray added the comment: Made some review comments. The last comment change (deletion) in unicodeobject.c is not as obvious as the other changes were; I'm not familiar enough with the C API to know why it is correct. I trust you on that, though :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22992] Adding a git developer's guide to Mercurial to devguide
Demian Brecht added the comment: I believe most points should be addressed in the updated patch. Below are responses to other comments (those not included have resulted in changes in the patch). @Ezio: 4) it should be possible to use evolve instead of bookmarks, but evolve is currently still a work in progress, so I'm not sure is worth mentioning it yet; I don't think that it's worth mentioning at this point given it's in an experimental state. 5) you said that named branches, bookmarks, and queues are all branches types in Mercurial. Can you add a source for that? No I can't, I was apparently completely off my face with the wording there :) 7) Note that Mercurial doesn't have git's concept of staging, so all changes will be committed. [...] Agreed that there are a number of solutions to this, my intention here is simply to point out a difference that developers coming from a git background will be surprised about. This one caught me a little off guard initially as I personally really like git's staging feature and bank on it at times. @Berker: a core developer or a contributor? Great point, thanks for that. My intention was to remove all merging-related operations and tailor it entirely towards contributors. I've reworded passages to make this clear and have removed all steps related to merging. -- Added file: http://bugs.python.org/file37367/issue22992.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22992 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22914] Rewrite of Python 2/3 porting HOWTO
Roundup Robot added the comment: New changeset 55b94462ca7f by Brett Cannon in branch '3.4': Issue #22914: Update the Python 2/3 porting HOWTO to describe a more https://hg.python.org/cpython/rev/55b94462ca7f -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22914 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22914] Rewrite of Python 2/3 porting HOWTO
Changes by Brett Cannon br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22914 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22992] Adding a git developer's guide to Mercurial to devguide
Berker Peksag added the comment: +# address review comments and merge You can remove the and merge part. +# generate patch for submission +git diff master..issueA issueA.patch Contributors may need to update their repos before this step. It would be good to add a note about git pull --rebase. +# create patch +# git diff master..issueA issueA.patch +hg diff -c issueA issueA.patch Same here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22992 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Serhiy Storchaka added the comment: Thank you David. I have left enumerations of concrete bytes-like classes (bytes and bytearray) because I thought that it is good to be more verbose in the documentation. I left the decision how write it to you: :class:`bytes`, :class:`bytearray` or :term:`bytes-like object`, :term:`bytes-like object` such as :class:`bytes` and :class:`bytearray`, or just :term:`bytes-like object`. I don't understand your comment about unicodeobject.c. This change doesn't differ from others. May be you mean unicodeobject.h? Yes, char buffer is Python 2 term and doesn't make sense in 3.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21793] httplib client/server status refactor
Demian Brecht added the comment: Updated patch addressing review comments. Thanks for the review. -- Added file: http://bugs.python.org/file37368/issue21793_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21793 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
R. David Murray added the comment: Yeah, just ignore the unicodeobject.c comment comment. It seems to me that the stuff in the parens is supposed to be a precise description of what the format code handles, with elaboration in the following text. So I'd prefer to just use the :term: in those lists. But like I said I'm not that familiar with the C api, so I'm not sure how much weight my opinion should carry :) The biggest thing is consistency. If you want to keep all of them in the list, I'd favor the such as formulation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22914] Rewrite of Python 2/3 porting HOWTO
Changes by Berker Peksag berker.pek...@gmail.com: -- stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22914 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22696] Add a function to know about interpreter shutdown
Antoine Pitrou added the comment: Here is a patch with docs. -- Added file: http://bugs.python.org/file37369/is_finalizing2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22696 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
Antoine Pitrou added the comment: Benchmarks and Intel's recommendation show that aligned allocation is actually important for AVX performance, and NumPy depends on CPython providing the right allocation APIs (for integration with tracemalloc): https://github.com/numpy/numpy/issues/5312 So I think for 3.5 we should start providing the APIs. Whether we use them in Python core is another discussion. Nathaniel, what APIs would you need exactly? See Victor's proposal in msg196834. -- nosy: +njs type: - enhancement versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22984] test_json.test_endless_recursion(): Fatal Python error: Cannot recover from stack overflow. on x86 XP-4 3.x buildbot
Serhiy Storchaka added the comment: The tes failed on Windows XP which is no more supported, I don't think that it's interesting to spend time on it. So may be just skip it on Windows XP? Or as far as this approach doesn't solve the problem and the test may crash on other platforms, may be run this test in a subprocess? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22946] urllib gives incorrect url after open when using HTTPS
Demian Brecht added the comment: +1 to the addition of a test. Also, I know it's only related, but it might be nice to also have this fixed in http_error_default: https://hg.python.org/cpython/file/021c1df36910/Lib/urllib/request.py#l2003. -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22984] test_json.test_endless_recursion(): Fatal Python error: Cannot recover from stack overflow. on x86 XP-4 3.x buildbot
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21793] httplib client/server status refactor
Changes by Demian Brecht demianbre...@gmail.com: Added file: http://bugs.python.org/file37370/issue21793_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21793 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22946] urllib gives incorrect url after open when using HTTPS
John McKay added the comment: For the test can I assume that we have the openssl binary in the path? The other tests just use a static response to emulate the server, but without being able to use s_client it would be quite a bit more effort to fake a working HTTP server with TLS so that it can be tested properly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22946] urllib gives incorrect url after open when using HTTPS
Benjamin Peterson added the comment: We have a testing HTTPS server in Lib/test/ssl_servers.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22394] Update documentation building to use venv and pip
Roundup Robot added the comment: New changeset 888103600e72 by Brett Cannon in branch 'default': Issue #22394: Add a 'venv' command to Doc/Makefile. https://hg.python.org/cpython/rev/888103600e72 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22394 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22394] Update documentation building to use venv and pip
Changes by Brett Cannon br...@python.org: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22394 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Roundup Robot added the comment: New changeset 853e3e115db4 by Serhiy Storchaka in branch '3.4': Issue #22581: Use more bytes-like object throughout the docs and comments. https://hg.python.org/cpython/rev/853e3e115db4 New changeset 450a025b1669 by Serhiy Storchaka in branch 'default': Issue #22581: Use more bytes-like object throughout the docs and comments. https://hg.python.org/cpython/rev/450a025b1669 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Serhiy Storchaka added the comment: Committed with just bytes-like object. Thank you David for your review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22581] Other mentions of the buffer protocol
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22581 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
STINNER Victor added the comment: Windows provides: void * _aligned_malloc( size_t size, size_t alignment ); http://msdn.microsoft.com/en-US/library/8z34s9c6%28v=vs.80%29.aspx How should we handle platforms which don't provide a memory allocator with an alignment? The simplest option is to return NULL (MemoryError). Allocating more memory and skip first bytes may work, but how do we retrieve the original address if the function releasing the memory block? What about Solaris, Mac OS X, FreeBSD, etc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22696] Add a function to know about interpreter shutdown
STINNER Victor added the comment: is_finalizing2.patch looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22696 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22996] Order of _io objects finalization can lose data in reference cycles
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22996 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21557] os.popen os.system lack shell-related security warnings
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22696] Add a function to know about interpreter shutdown
Serhiy Storchaka added the comment: Before committing the patch it will be good to find places in the code which will benefit from this function. And please don't forget to fix a typo in the docstring. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22696 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21557] os.popen os.system lack shell-related security warnings
STINNER Victor added the comment: Python 3.5 doc has no red warning in the subprocess module, but a nice section: https://docs.python.org/dev/library/subprocess.html#security-considerations Why not simply copying the note of the subprocess doc? Note: Read the Security Considerations section before using shell=True. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21557] os.popen os.system lack shell-related security warnings
STINNER Victor added the comment: subprocess.getstatusoutput(cmd) needs also this note (or warning). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21557 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22996] Order of _io objects finalization can lose data in reference cycles
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37371/gcgzipio.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22996 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22985] Segfault on time.sleep
STINNER Victor added the comment: Program received signal SIGTERM, Terminated. SIGTERM is not a segmentation fault. SIGSEGV is for segmentation faults. -- nosy: +haypo resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22985 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] fnmatch, glob: Allow curly brace expansion
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Allow curly brace expansion - fnmatch, glob: Allow curly brace expansion ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
Antoine Pitrou added the comment: How should we handle platforms which don't provide a memory allocator with an alignment? The simplest option is to return NULL (MemoryError). Are there such platforms? posix_memalign() is a POSIX standard, even OpenBSD has it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9647] os.confstr() does not handle value changing length between calls
Roundup Robot added the comment: New changeset a7a8947e9ce4 by Victor Stinner in branch 'default': Issue #9647: os.confstr() ensures that the second call to confstr() returns the https://hg.python.org/cpython/rev/a7a8947e9ce4 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9647 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9647] os.confstr() does not handle value changing length between calls
STINNER Victor added the comment: I added an assertion. Can we close this issue? -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9647 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22696] Add a function to know about interpreter shutdown
STINNER Victor added the comment: Before committing the patch it will be good to find places in the code which will benefit from this function. The traceback and/or the linecache is a first good candidate to use this new function. We may patch more functions later if needed, I don't think that we need to address all issues right now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22696 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
STINNER Victor added the comment: PyMem_GetAllocator() and PyMem_SetAllocator() have a domain parameter which can take 3 values: PYMEM_DOMAIN_RAW, PYMEM_DOMAIN_MEM and PYMEM_DOMAIN_OBJ. I don't think that we need 3 flavors of allocators (PyMem_Raw, PyMem, PyObject). Maybe the PYMEM_DOMAIN_RAW domain is enough: OS functions don't require the GIL. In this case, should we add a new pair of Get/Set functions with an associated structure? Or maybe PyMem_SetAllocator() may ignore the aligned members of the patched PyMemAllocatorEx structure for domains other than PYMEM_DOMAIN_RAW? And PyMem_GetAllocator() would fill members with NULL. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9647] os.confstr() does not handle value changing length between calls
STINNER Victor added the comment: (Oops, I didn't want to close the issue.) -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9647 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
Nathaniel Smith added the comment: It's not terribly difficult to write a crude-but-effective aligned allocator on top of raw malloc: def aligned_malloc(size, alignment): assert alignment 255 raw_pointer = (uint8*) malloc(size + alignment) shift = alignment - (raw_pointer % alignment) assert 0 shift = alignment aligned_pointer = raw_pointer + shift *(aligned_pointer - 1) = shift return aligned_pointer def aligned_free(uint8* pointer): shift = *(pointer - 1) free(pointer - shift) But, this fallback and the official Win32 API both disallow the use of plain free() (like Victor points out in msg196834), so we can't just add an aligned_malloc slot to the PyMemAllocator struct. This kind of aligned allocation is effectively its own memory domain. If native aligned allocation support were added to PyMalloc then it could potentially do better (e.g. by noticing that it already has a block on its freelist with the requested alignment and just returning that instead of overallocating). This might be the ideal solution for Raymond's use case, but I have no idea how much work it would be to mess around with PyMalloc innards. Numpy doesn't currently use aligned allocation for anything, but we'd like to keep our options open. If we do end up using it in the future then there's a reasonable chance we might want to use it *without* the GIL held (e.g. for allocating temporary buffers inside C loops). OTOH we are also happy to implement the aligned allocation ourselves (either on top of the system APIs or directly) -- we just don't want to lose tracemalloc support when we do. For numpy's purposes, I think the best approach would be to add a tracemalloc escape valve, with an interface like: PyMem_RecordAlloc(const char* domain, void* tag, size_t quantity, PyMem_RecordRealloc(const char* domain, void* old_tag, void* new_tag, size_t new_quantity) PyMem_RecordFree(const char* domain, void* tag) where the idea is that if after someone allocates memory (or potentially other discrete resources) directly without going through PyMem_*, they could then call these functions to tell tracemalloc what they just did. This would be useful in a number of cases: in addition to tracking aligned allocations, it would make it possible to re-use the tracemalloc infrastructure to track GPU buffers allocated by CUDA/GPGPU-type code, mmap usage, hugetlbfs usage, etc. Potentially even open file descriptors if one wants to go there (seems pretty useful, actually). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
Antoine Pitrou added the comment: Le 05/12/2014 23:15, STINNER Victor a écrit : I don't think that we need 3 flavors of allocators (PyMem_Raw, PyMem, PyObject). Maybe the PYMEM_DOMAIN_RAW domain is enough: OS functions don't require the GIL. In this case, should we add a new pair of Get/Set functions with an associated structure? How about a new domain instead? PYMEM_DOMAIN_RAW_ALIGNED? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
Nathaniel Smith added the comment: Re: msg232219: If you go down the route of adding both aligned_malloc and aligned_free to the Allocator structure, I think you might as well support it for all domains? For the PyMem and PyObject domains you can just literally set the default functions to be PyMem_RawAlignedMalloc and PyMem_RawAlignedFree, and that leaves the door open to fancier implementations in the future (e.g. if PyMalloc starts implementing aligned allocation directly). Re: msg23: Currently all the domains share the same vtable struct, though, whereas aligned allocator functions have different signatures. So you can't literally just add an entry to the existing domain enum and be done. It also occurs to me that if numpy ever gets serious about using aligned memory then we might also need aligned_realloc (numpy allows arrays to be resized, sigh), which is possible to do but I *cannot* recommend python attempt to provide as a standard interface. (It's not available at all in POSIX.) I guess this is another argument that it might be best to just give numpy an escape valve and worry about CPython's internal needs separately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22989] HTTPResponse.msg not as documented
Martin Panter added the comment: See Issue 21228 for a patch which documents the “.msg” hack, and that the info() method is available for HTTP responses. I think documenting the “.headers” attribute would be a bad idea, because it is introducing yet another way to do what the almost-documented info() method already does. -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22989 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18835] Add aligned memory variants to the suite of PyMem functions/macros
STINNER Victor added the comment: You cannot just add a new domain because the function prototypes are different (need an extra alignement parameter). You have to add new members to the structure or add a new structure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18835 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21228] Missing enumeration of HTTPResponse Objects methods of urllib.request.urlopen's http.client.HTTPResponse?
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review versions: -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21228 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22153] Documentation of TestCase.runTest is incorrect and confusing
Martin Panter added the comment: Updated patch with indentation fixed and new wording. I am just guessing the RST syntax based on the surrounding text, so please review :) -- Added file: http://bugs.python.org/file37372/runtest.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22153 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22998] inspect.Signature and default arguments
Terry J. Reedy added the comment: Should this be closed now? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22998 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22998] inspect.Signature and default arguments
Yury Selivanov added the comment: Should this be closed now? Yes, let's close it. David and Walter, you're welcome to re-open the issue if you want to discuss it in more detail. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22998 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22926] asyncio: raise an exception when called from the wrong thread
Yury Selivanov added the comment: Hi Victor, I left you some feedback in code review. I'm kind of leaning towards your proposal that we should force users to always use safe API. But I also understand Guido's point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22926 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16041] poplib: unlimited readline() from connection
Roundup Robot added the comment: New changeset 339f877cca11 by Benjamin Peterson in branch '2.7': in poplib, limit maximum line length that we read from the network (closes #16041) https://hg.python.org/cpython/rev/339f877cca11 -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16041 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16042] smtplib: unlimited readline() from connection
Roundup Robot added the comment: New changeset 923aac88a3cc by Benjamin Peterson in branch '2.7': smtplib: limit amount read from the network (closes #16042) https://hg.python.org/cpython/rev/923aac88a3cc -- resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16043] xmlrpc: gzip_decode has unlimited read()
Roundup Robot added the comment: New changeset d50096708b2d by Benjamin Peterson in branch '2.7': add a default limit for the amount of data xmlrpclib.gzip_decode will return (closes #16043) https://hg.python.org/cpython/rev/d50096708b2d -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16043 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16893] Generate Idle help from Doc/library/idle.rst
Roundup Robot added the comment: New changeset 283c364c372a by Terry Jan Reedy in branch '2.7': Issue #16893: Update Idle doc chapter to match current Idle and add new https://hg.python.org/cpython/rev/283c364c372a New changeset 2fc341c6e314 by Terry Jan Reedy in branch '3.4': Issue #16893: Update Idle doc chapter to match current Idle and add new https://hg.python.org/cpython/rev/2fc341c6e314 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16893 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22998] inspect.Signature and default arguments
R. David Murray added the comment: I'm good with your solution, but I'm going to adjust the resolution by changing the component :) -- assignee: - docs@python components: +Documentation -Library (Lib) nosy: +docs@python resolution: wont fix - fixed stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22998 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16043] xmlrpc: gzip_decode has unlimited read()
Roundup Robot added the comment: New changeset a0368f81af9a by Benjamin Peterson in branch '3.2': add a default limit for the amount of data xmlrpclib.gzip_decode will return (closes #16043) https://hg.python.org/cpython/rev/a0368f81af9a New changeset 4a9418c6f8ae by Benjamin Peterson in branch '3.3': merge 3.2 (#16043) https://hg.python.org/cpython/rev/4a9418c6f8ae New changeset 6b83e21c8679 by Benjamin Peterson in branch '3.4': merge 3.3 (#16043) https://hg.python.org/cpython/rev/6b83e21c8679 New changeset 6f002c4741e2 by Benjamin Peterson in branch 'default': merge 3.4 (#16043) https://hg.python.org/cpython/rev/6f002c4741e2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16043 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9179] Lookback with group references incorrect (two issues?)
Changes by Benjamin Peterson benja...@python.org: -- priority: release blocker - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9179 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22935] Disabling SSLv3 support
Roundup Robot added the comment: New changeset 49d267a58cc2 by Benjamin Peterson in branch '2.7': allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935) https://hg.python.org/cpython/rev/49d267a58cc2 New changeset 4077e0cd8d48 by Benjamin Peterson in branch '3.4': allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935) https://hg.python.org/cpython/rev/4077e0cd8d48 New changeset fbf3747e721c by Benjamin Peterson in branch 'default': merge 3.4 (#22935) https://hg.python.org/cpython/rev/fbf3747e721c -- nosy: +python-dev resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22935 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22919] Update PCBuild for VS 2015
Steve Dower added the comment: Does anyone else want to provide any feedback? Or should I go ahead and get it in (after rebasing/retesting/etc.)? The feedback so far has been really helpful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9584] fnmatch, glob: Allow curly brace expansion
Changes by Serhiy Storchaka storch...@gmail.com: -- priority: normal - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com