[issue39091] CPython Segfault in 5 lines of code
Noah added the comment: I'm not sure if this will actually appear as a message (I just registered for the bug tracker and I'm not sure how it works), but I wrote the gist and I can definitely make a PR. -- nosy: +coolreader18 ___ Python tracker <https://bugs.python.org/issue39091> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39091] CPython Segfault in 5 lines of code
Change by Noah : -- keywords: +patch pull_requests: +17126 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17658 ___ Python tracker <https://bugs.python.org/issue39091> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`
New submission from Noah : Suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` with subprocess.Popen('/bin/false'): pass I made the mistake of assuming this construct would raise an exception (CalledProcessError). It would be nice if there were a way to do that. -- components: Library (Lib) messages: 344880 nosy: nlevitt priority: normal severity: normal status: open title: suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):` type: behavior ___ Python tracker <https://bugs.python.org/issue37184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`
Noah added the comment: Yes, I'm piping a large amount of data to/from a fairly long-running subprocess. -- ___ Python tracker <https://bugs.python.org/issue37184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`
Noah added the comment: I subscribed and emailed python-id...@python.org but it still hasn't passed moderation I guess, hmm -- ___ Python tracker <https://bugs.python.org/issue37184> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34315] Regex not evalauated correctly
noah added the comment: I was able to recreate the 'bad' output on Linux using 'bad' input. The issue is caused when you misspell WHERE, regex is looking for the exact word "WHERE", any lowercase (where), multicase (WHeRe), or misspelling (WERE) is going to cause it to return None because regex didn't find a matching substring. I also on a whim tested out a bunch of encodings before realizing it didn't run on bytes objects anyways, so really the only way to get this output is to misspell the input. I think this problem should probably be closed as it's not a bug with the python core. -- nosy: +ngwood111 status: pending -> open ___ Python tracker <https://bugs.python.org/issue34315> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34921] NoReturn not allowed by get_type_hints when future import annotations is used
Change by noah : -- keywords: +patch pull_requests: +9136 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34921> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34921] NoReturn not allowed by get_type_hints when future import annotations is used
noah added the comment: Is this a feature request? Because it doesn't look like a bug to me. Where NoReturn is defined it says it's supposed to fail in static type checkers. Anyway, I'm not entirely sure on the whole process of contributing but here goes: The code ultimately fails at _type_check. According to _type_check, "special forms like Union are not valid, while Union[int, str] is OK, etc." NoReturn isn't subscriptable. So basically the code is getting to this point and executing _type_check(NoReturn, msg) which fails on any special form. If you try to force NoReturn to have additional parameters it will fail at __getitem__ because NoReturn is not subscriptable. Any is also not subscriptable, but it's specifically handled in the _type_check() function ala: if (isinstance(arg, _SpecialForm) and arg is not Any or ... if you wanted to add NoReturn you could do something like if (isinstance(arg, _SpecialForm) and arg not in [Any, NoReturn] or ... Tested it and it works fine on 3.7 and 3.8 for me! I've submitted a pull request with my proposed fix -- nosy: +ngwood111 -levkivskyi, xtreak versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue34921> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1085] OS X 10.5.x Build Problems
Changes by Noah Gift: -- components: Tests severity: major status: open title: OS X 10.5.x Build Problems type: compile error versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1085> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1085] OS X 10.5.x Build Problems
New submission from Noah Gift: Compile problem on: System Software Overview: System Version: Mac OS X 10.5 (9A527) Kernel Version: Darwin 9.0.0b5 Temporary Fix was to go into Modules/posixmodule.c and at line: 3767 Take out function and create empty function. I was then able to get make to run, but still got these non-critical errors: Failed to find the necessary bits to build these modules: _bsddbgdbm ossaudiodev readline spwd To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _OSA Running make test I get: running sudo make test, some errors are: Traceback (most recent call last): File "/Users/ngift/Desktop/Python-3.0a1/Lib/SocketServer.py", line 222, in handle_request self.process_request(request, client_address) File "/Users/ngift/Desktop/Python-3.0a1/Lib/SocketServer.py", line 241, in process_request self.finish_request(request, client_address) File "/Users/ngift/Desktop/Python-3.0a1/Lib/SocketServer.py", line 254, in finish_request self.RequestHandlerClass(request, client_address, self) File "/Users/ngift/Desktop/Python-3.0a1/Lib/SocketServer.py", line 522, in __init__ self.handle() File "/Users/ngift/Desktop/Python-3.0a1/Lib/BaseHTTPServer.py", line 330, in handle self.handle_one_request() File "/Users/ngift/Desktop/Python-3.0a1/Lib/BaseHTTPServer.py", line 313, in handle_one_request self.raw_requestline = self.rfile.readline() File "/Users/ngift/Desktop/Python-3.0a1/Lib/io.py", line 380, in readline b = self.read(nreadahead()) File "/Users/ngift/Desktop/Python-3.0a1/Lib/io.py", line 366, in nreadahead readahead = self.peek(1, unsafe=True) File "/Users/ngift/Desktop/Python-3.0a1/Lib/io.py", line 758, in peek current = self.raw.read(to_read) File "/Users/ngift/Desktop/Python-3.0a1/Lib/io.py", line 442, in read n = self.readinto(b) File "/Users/ngift/Desktop/Python-3.0a1/Lib/socket.py", line 292, in readinto return self._sock.recv_into(b) socket.error: (35, 'Resource temporarily unavailable') test test_xmlrpc failed -- errors occurred; run in verbose mode for details test_xmlrpc_net test_xmlrpc_net skipped -- Use of the `network' resource not enabled test_zipfile test_zipfile64 test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run test_zipimport test_zlib 295 tests OK. 2 tests failed: test__locale test_xmlrpc 25 tests skipped: test_bsddb test_bsddb3 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses test_gdbm test_largefile test_locale test_normalization test_ossaudiodev test_pep277 test_socket_ssl test_socketserver test_ssl test_startfile test_timeout test_urllib2net test_urllibnet test_winreg test_winsound test_xmlrpc_net test_zipfile64 1 skip unexpected on darwin: test_ssl make: *** [test] Error 1 Then when I run make install it *almost* works but I get: Writing /Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/lib- dynload/Python-3.0a1-py3.0.egg-info ln -fs "../../../Python" "/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/config/ libpython3.0.a" cd Mac && make installmacsubtree DESTDIR="" Creating directory /Library/Frameworks/Python.framework/Versions/3.0/Mac/Tools DYLD_FRAMEWORK_PATH=/Users/ngift/Desktop/Python-3.0a1: ../python.exe ./scripts/cachersrc.py -v /Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/plat-mac /Library/Frameworks/Python.framework/Versions/3.0/Mac/Tools File "./scripts/cachersrc.py", line 15 def handler((verbose, force), dirname, fnames): ^ SyntaxError: invalid syntax make[1]: *** [installmacsubtree] Error 1 make: *** [frameworkinstallmaclib] Error 2 -- nosy: +noahgift __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1085> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10146] Incorrect regex generation in translate_pattern
New submission from Noah Kantrowitz : If a prefix is passed to translate_pattern it will generate a pattern using the unescaped output of os.path.join(). This is fine on *nix, but on Windows it results in a pattern like r'build\.*', which matches any string starting with "build" (in my case, "buildout.cfg"). Escaping the separator fixes this (patch attached). -- assignee: tarek components: Distutils files: filelist.diff keywords: patch messages: 119159 nosy: coderanger, eric.araujo, tarek priority: normal severity: normal status: open title: Incorrect regex generation in translate_pattern type: behavior versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19287/filelist.diff ___ Python tracker <http://bugs.python.org/issue10146> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2852] sidebar directive fails
New submission from Noah Kantrowitz <[EMAIL PROTECTED]>: The normal ReST sidebar directive creates a div with the same class as the HTML sidebar. This makes it not render its contents correctly. Perhaps the default template/CSS should match on div#sphinxsidebar or similar? -- assignee: georg.brandl components: Documentation tools (Sphinx) messages: 66821 nosy: coderanger, georg.brandl severity: normal status: open title: sidebar directive fails type: feature request __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2852> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2321] return more memory from unicode objects to system
Changes by Noah Kantrowitz <[EMAIL PROTECTED]>: -- nosy: +coderanger __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2321> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4334] Mac Build Script is broken for 2.6 release
New submission from Noah Gift <[EMAIL PROTECTED]>: Just an FYI, the Mac Build script in: Python-2.6 2/Mac/BuildScript/build-installer.py contains broken download URLs for SQLite, and cause the build to fail. I fixed this myself, but noticed this appears to be fixed in the trunk, already. Having a working build script is a fairly big deal for mac users, as they often need to have readline compiled properly with Python, which is a pain. This might be nice to have fixed in the production release. -- components: Build messages: 75949 nosy: ngift severity: normal status: open title: Mac Build Script is broken for 2.6 release type: crash versions: Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4334> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40298] Type annotation objects (Tuple, List, etc.) register as callable()
New submission from Noah May : Whether this is considered a bug or not is subjective. The question is should callable(Tuple) return True or False? Or should it for any other annotation object? The reason it returns true in the first place is because of a warning to explicitly NOT call them as functions/constructors: >>> from typing import Tuple >>> callable(Tuple) True >>> Tuple() TypeError: Type Tuple cannot be instantiated; use tuple() instead Source code: https://github.com/python/cpython/blob/master/Lib/typing.py#L724:L733 I honestly don't know how this could be "fixed" if it even needs to be fixed. But I just wanted to bring attention to it. Cheers. -- components: Library (Lib) messages: 366580 nosy: Noah May priority: normal severity: normal status: open title: Type annotation objects (Tuple, List, etc.) register as callable() type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue40298> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43170] wintypes.SIZE is 8bytes on 32 bit machines
New submission from Noah Steinberg : Noticed while debugging a problem with a test running on Windows 10 x86 that sizeof(wintypes.SIZE)==8 when I believe it should be 4. While using kernel32.CreateRemoteThread.argtypes = [wintypes.HANDLE, wintypes.LPCVOID, wintypes.DWORD, wintypes.LPCVOID, wintypes.LPCVOID, wintypes.DWORD, wintypes.LPDWORD] and kernel32.CreateRemoteThread(h_process, 0, 0, 0xbadadd, 0, 4, byref(thread_id)) It caused CreateRemoteThread to recieve 4 as the last argument, resulting in an access denied -- components: ctypes messages: 38 nosy: nnstein priority: normal severity: normal status: open title: wintypes.SIZE is 8bytes on 32 bit machines type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue43170> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21314] Document '/' in signatures
Noah Haasis added the comment: I don‘t have the time right now. Feel free to work on it! -- ___ Python tracker <https://bugs.python.org/issue21314> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] sqlite3 executescript does not respect isolation_level?
New submission from Noah Levitt: As far as I can tell, sqlite3 executescript() does not respect isolation_level. Is that true? If so, I think it's worth mentioning in the doc. Or maybe it should respect isolation_level, not sure there's any particular reason not to. -- components: Library (Lib) messages: 295376 nosy: Noah Levitt priority: normal severity: normal status: open title: sqlite3 executescript does not respect isolation_level? versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] sqlite3 executescript does not respect isolation_level?
Noah Levitt added the comment: Here's a test case -- ___ Python tracker <http://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] sqlite3 executescript does not respect isolation_level?
Noah Levitt added the comment: And here's a fix. Unfortunately I think the change could break people's scripts. If they have isolation_level set (not None) and use executescript(), they will have to issue an explicit call to connection.commit(). executescript() could do the commit itself explicitly after running the sql, I suppose. Then the behavior is much like the old behavior, but at least you get the performance boost of running inside a transaction. (Substantial if you pass 10k insert statements to executescript(), or something like that.) Or, we could not change the code, and instead change the documentation. The docs could suggest wrapping the sql script with "begin;" and "commit;". -- keywords: +patch Added file: http://bugs.python.org/file46942/issue30593-fix.diff ___ Python tracker <http://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30593] sqlite3 executescript does not respect isolation_level?
Changes by Noah Levitt : Added file: http://bugs.python.org/file46943/issue30593-test.diff ___ Python tracker <http://bugs.python.org/issue30593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33447] Asynchronous lambda syntax
New submission from Noah Simon : It would be very useful to add an asynchronous lambda syntax, as a shortcut for coroutines. I'm not experienced enough to write a PEP or edit the C source, but I have some ideas for syntax: import asyncio foo = async lambda a,b: 5 + await bar(b) -- components: asyncio messages: 316304 nosy: Noah Simon, asvetlov, yselivanov priority: normal severity: normal status: open title: Asynchronous lambda syntax type: enhancement versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue33447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33447] Asynchronous lambda syntax
Noah Simon added the comment: Actually, you wouldn't even need to import asyncio. -- ___ Python tracker <https://bugs.python.org/issue33447> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33836] [Good first-time issue] Recommend keyword-only param for memoization in FAQ
Change by Noah Haasis : -- keywords: +patch pull_requests: +7300 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue33836> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values
Noah Haasis added the comment: I'd like to work on this, if it's ok for everybody. -- nosy: +noah.haasis ___ Python tracker <https://bugs.python.org/issue34154> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values
Noah Haasis added the comment: This is a list of all valid keywordarguments of Listbox.__init__() listed in the test file: 'activestyle', 'background', 'borderwidth', 'cursor', 'disabledforeground', 'exportselection', 'font', 'foreground', 'height', 'highlightbackground', 'highlightcolor', 'highlightthickness', 'listvariable', 'relief', 'selectbackground', 'selectborderwidth', 'selectforeground', 'selectmode', 'setgrid', 'state', 'takefocus', 'width', 'xscrollcommand', 'yscrollcommand' The ones that are missing in the doc string: 'activestyle', 'disabledforeground', 'listvariable','state' -- ___ Python tracker <https://bugs.python.org/issue34154> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values
Change by Noah Haasis : -- keywords: +patch pull_requests: +7909 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue34154> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34154] Tkinter __init__ documentations sometimes missing valid keyword values
Noah Haasis added the comment: This are all the classes where the keywords are missing in the docs and their missing keywords: TopLevel ['padx', 'pady'] Checkbutton ['compound', 'offrelief', 'overrelief', 'tristateimage', 'tristatevalue'] Entry ['disabledbackground', 'disabledforeground', 'readonlybackground'] Frame ['padx', 'pady'] Label ['compound'] Radiobutton ['compound', 'offrelief', 'overrelief', 'tristateimage', 'tristatevalue'] Text ['blockcursor', 'endline', 'inactiveselectbackground', 'insertunfocussed', 'startline', 'tabstyle'] Spinbox ['validatecommand', 'values'] Menubutton ['activebackground', 'activeforeground', 'anchor', 'background', 'bitmap', 'borderwidth', 'compound', 'cursor', 'direction', 'disabledforeground', 'font', 'foreground', 'height', 'highlightbackground', 'highlightcolor', 'highlightthickness', 'image', 'indicatoron', 'justify', 'menu', 'padx', 'pady', 'relief', 'state', 'takefocus', 'text', 'textvariable', 'underline', 'width', 'wraplength'] Message ['anchor', 'aspect', 'background', 'borderwidth', 'cursor', 'font', 'foreground', 'highlightbackground', 'highlightcolor', 'highlightthickness', 'justify', 'padx', 'pady', 'relief', 'takefocus', 'text', 'textvariable', 'width'] The missing keywords appear in the OPTIONS list in the test but not in the docstring. -- ___ Python tracker <https://bugs.python.org/issue34154> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34545] error in the repl due to indentation
New submission from Noah Haasis : Pressing the tab key in the python REPL in my command line (cmder on windows 10 32bit) causes an exception: >>> Readline internal error >>> Traceback (most recent call last): File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\console\console.py", line 768, in hook_wrapper_23 res = ensure_str(readline_hook(prompt)) File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\rlmain.py", line 571, in readline self._readline_from_keyboard() File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\rlmain.py", line 536, in _readline_from_keyboard if self._readline_from_keyboard_poll(): File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\rlmain.py", line 556, in _readline_from_keyboard_pol result = self.mode.process_keyevent(event.keyinfo) File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\modes\emacs.py", line 243, in process_keyevent r = self.process_keyevent_queue[-1](keyinfo) File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\modes\emacs.py", line 286, in _process_keyevent r = dispatch_func(keyinfo) File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\modes\basemode.py", line 257, in complete completions = self._get_completions() File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pyreadline\modes\basemode.py", line 200, in _get_completions r = self.completer(ensure_unicode(text), i) File "C:\Users\leinw\AppData\Local\Programs\Python\Python36-32\lib\rlcompleter.py", line 80, in complete readline.redisplay() AttributeError: module 'readline' has no attribute 'redisplay' This happens even if python expects indentation. -- components: Windows messages: 324366 nosy: noah.haasis, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: error in the repl due to indentation versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue34545> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21314] Document '/' in signatures
Noah Haasis added the comment: Can I work on this? -- nosy: +noah.haasis ___ Python tracker <https://bugs.python.org/issue21314> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17127] multiprocessing.dummy.Pool does not accept maxtasksperchild argument
New submission from Noah Yetter: Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. The docs claim that "multiprocessing.dummy replicates the API of multiprocessing but is no more than a wrapper around the threading module." however dummy's Pool method does not replicate the API of multiprocessing's Pool method: >>> import inspect >>> import multiprocessing >>> inspect.getargspec(multiprocessing.Pool) ArgSpec(args=['processes', 'initializer', 'initargs', 'maxtasksperchild'], varargs=None, keywords=None, defaults=(None, None, (), None)) >>> import multiprocessing.dummy >>> inspect.getargspec(multiprocessing.dummy.Pool) ArgSpec(args=['processes', 'initializer', 'initargs'], varargs=None, keywords=None, defaults=(None, None, ())) Thus when attempting to downshift from multiprocessing to threading like so... import multiprocessing.dummy as multiprocessing ...code that supplies the maxtasksperchild argument to Pool() will not run. -- components: Library (Lib) messages: 181365 nosy: Noah.Yetter priority: normal severity: normal status: open title: multiprocessing.dummy.Pool does not accept maxtasksperchild argument type: behavior versions: Python 2.7, Python 3.3 ___ Python tracker <http://bugs.python.org/issue17127> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27471] sre_constants.error: bad escape \d
New submission from Noah Petherbridge: I found a bug in Python 3.6.0a2 that wasn't present on previous versions of Python concerning the "\d" escape sequence as used in the following regular expression: import re s = "hello" s = re.sub(re.escape(r'(\d+?)'), '(?:\d+?)', s) (The purpose of this regular expression was to translate the literal regexp string "(\d+?)" to be a non-capturing literal regexp string, to eventually be used as a re pattern). When running this code in 3.6.0a2 I receive the following stack traces: - - - - - - - - - - Traceback (most recent call last): File "/home/kirsle/.pyenv/versions/3.6.0a2/lib/python3.6/sre_parse.py", line 877, in parse_template this = chr(ESCAPES[this][1]) KeyError: '\\d' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test.py", line 4, in s = re.sub(re.escape(r'(\d+?)'), '(?:\d+?)', s) File "/home/kirsle/.pyenv/versions/3.6.0a2/lib/python3.6/re.py", line 181, in sub return _compile(pattern, flags).sub(repl, string, count) File "/home/kirsle/.pyenv/versions/3.6.0a2/lib/python3.6/re.py", line 324, in _subx template = _compile_repl(template, pattern) File "/home/kirsle/.pyenv/versions/3.6.0a2/lib/python3.6/re.py", line 311, in _compile_repl p = sre_parse.parse_template(repl, pattern) File "/home/kirsle/.pyenv/versions/3.6.0a2/lib/python3.6/sre_parse.py", line 880, in parse_template raise s.error('bad escape %s' % this, len(this)) sre_constants.error: bad escape \d at position 3 - - - - - - - - - - However, the script runs without crashing on Python 3.5.1 and 2.7.11 % python --version Python 3.6.0a2 -- components: Regular Expressions messages: 270010 nosy: Noah Petherbridge, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: sre_constants.error: bad escape \d type: crash versions: Python 3.6 ___ Python tracker <http://bugs.python.org/issue27471> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22593] Automate update of doc references to UCD version when it changes.
Noah Massman-Hall added the comment: I took a crack at the rst side of this, to see if I could reduce it to just one easy to parse for line in each file that needs to be modified. Yeah, not so easy. Substituting text in rst isn't hard, you just insert '|ucd_version|' where the version string should go and then include the following line somewhere below. .. |ucd_version| replace:: 12.1.0 The problem is that I cant find any combination that makes this work for substituting the version string inside of a hyperlink. I've tried multiple combinations and every time the hyperlink gets broken. So this, inside Doc/library/stdtypes.rst: See http://www.unicode.org/Public/\ |ucd_version|\ /ucd/extracted/DerivedNumericType.txt Becomes this in the html: See http://www.unicode.org/Public/";>http://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedNumericType.txt It does in fact do the substitution, but the substituted text onward doesn't get included in the hyperlink. It gets worse if you try to hyperlink text instead of just the url. In Doc/library/unicodedata.rst I tried this: compiled from the |ucd_link|_. .. |ucd_link| replace:: UCD version |ucd_version| .. _ucd_link: http://www.unicode.org/Public/|ucd_version|/ucd and got: compiled from the http://www.unicode.org/Public/|ucd_version|/ucd">UCD version 12.1.0 The sub inside a sub works fine, but no combination I tried could get it to work in the hyperlink itself. Near as I can tell, the only way to accomplish this would require adding or possibly creating a plugin for sphinx. -- nosy: +nmassman ___ Python tracker <https://bugs.python.org/issue22593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22593] Automate update of doc references to UCD version when it changes.
Change by Noah Massman-Hall : -- keywords: +patch pull_requests: +17155 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17710 ___ Python tracker <https://bugs.python.org/issue22593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22593] Automate update of doc references to UCD version when it changes.
Change by Noah Massman-Hall : -- pull_requests: -17155 ___ Python tracker <https://bugs.python.org/issue22593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22593] Automate update of doc references to UCD version when it changes.
Change by Noah Massman-Hall : -- pull_requests: +17186 pull_request: https://github.com/python/cpython/pull/17748 ___ Python tracker <https://bugs.python.org/issue22593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22593] Automate update of doc references to UCD version when it changes.
Noah Massman-Hall added the comment: I ended up doing exactly what I said would probably be needed, and wrote a small sphinx extension that handles this. I kept the same reST substitution syntax, but I'm parsing for '|ucd_version|' as the source files are read in and just replacing it with the version number. Feedback is much appreciated. This is my first really involved PR. :) -- ___ Python tracker <https://bugs.python.org/issue22593> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com