[issue37461] email.parser.Parser hang
Change by Nam Nguyen : -- nosy: +Nam.Nguyen ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30713] Reject newline character (U+000A) in URLs in urllib.parse
Nam Nguyen added the comment: Just being nosy here that we should not continue down the path with regex. A proper grammar parser according to spec would be much more appropriate and eliminate these whack-a-mole issues. -- nosy: +Nam.Nguyen ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30713> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30500] urllib connects to a wrong host
Nam Nguyen added the comment: I think the best behavior is to do what popular web browsers do. Chrome and Firefox, for example, parses this is host 127.0.0.1, path /, fragment #@evil.com. If the code does want to support username/password, it should do a custom opener (with basic HTTP authentication) instead. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30500] urllib connects to a wrong host
Changes by Nam Nguyen <bits...@gmail.com>: -- pull_requests: +1937 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30500] urllib connects to a wrong host
New submission from Nam Nguyen: Reported by Orange Tsai: == Hi, Python Security Team import urllib from urlparse import urlparse url = 'http://127.0.0.1#@evil.com/' print urlparse(url).netloc # 127.0.0.1 print urllib.urlopen(url).read()# will access evil.com I have tested on the latest version of Python 2.7.13. == -- components: Library (Lib) messages: 294667 nosy: Nam.Nguyen priority: normal pull_requests: 1933 severity: normal status: open title: urllib connects to a wrong host type: security versions: Python 2.7, Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30500> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15285] test_timeout failure when system on IPv4 10.x.x.x subnet
Nam Nguyen bits...@gmail.com added the comment: Using a remote server such as python.org is a good idea when you have internet connection. When you don't, though, how will the test run? -- nosy: +Nam.Nguyen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14119] Ability to adjust queue size in Executors
Nam Nguyen bits...@gmail.com added the comment: +1 That was actually what I did. I replaced the internal queue with another one whose limit was properly set. If you are busy to write one, let me find some time to create another patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14119] Ability to adjust queue size in Executors
Nam Nguyen bits...@gmail.com added the comment: Currently, ProcessionPoolExecutor has this line in its constructor: self._call_queue = multiprocessing.Queue(self._max_workers + EXTRA_QUEUED_CALLS) where EXTRA_QUEUED_CALLS is 1. And yes, it would be best to export a method so that the app developer can set the queue size for themselves. In my case, I would want to limit the queue so that I dont run out of memory. Others might not want the queue to block, and hence would prefer an unlimited queue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14119] Ability to adjust queue size in Executors
Nam Nguyen bits...@gmail.com added the comment: I used the ThreadPoolExecutor to process a large number (bounded) of input/output jobs. Because there were too many of them and the worker threads could not process them fast enough to drain them from the queue, the queue kept increasing in size. It was okay for the script, though, to block, waiting for the queue to drain, before submitting new jobs. So I needed to limit the queue size. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14289] Prebuilt CHM file on Docs download page
Nam Nguyen bits...@gmail.com added the comment: I can't find any CHM for download. For example, this is everything there is to Python 3.2.2: http://www.python.org/ftp/python/3.2.2/ Yet there's no sight of CHM in it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14289] Prebuilt CHM file on Docs download page
New submission from Nam Nguyen bits...@gmail.com: Before 2.7, one can easily find .CHM files in the Documentation download page. When 2.7 come out, the only way to get CHM files is downloading the Windows installers (EXE or MSI), installing it on Windows, and grabbing the CHM files. This is unwieldy. I am on a Mac at work, have a desktop running Linux and Windows at home. In all cases, I usually rely on the CHM file. It is self-packaged, indexable, and easily searchable. There are CHM readers out there that work across different OSes such as the cross platform xCHM. Therefore, I'd like to request for a prebuilt .CHM file for download, in addition to what there already are. -- assignee: docs@python components: Documentation messages: 155650 nosy: Nam.Nguyen, docs@python priority: normal severity: normal status: open title: Prebuilt CHM file on Docs download page ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14119] Ability to adjust queue size in Executors
Changes by Nam Nguyen bits...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file24666/executor-queue-size.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14119] Ability to adjust queue size in Executors
New submission from Nam Nguyen bits...@gmail.com: I am running into a memory consumption issue with concurrent.futures module. Its Executors do not have a public API to adjust their queue size. and the queues are created unbounded initially. It would be helpful to have some public method or a parameter at construction time to limit this queue size. -- components: Library (Lib) messages: 154175 nosy: Nam.Nguyen priority: normal severity: normal status: open title: Ability to adjust queue size in Executors type: enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14119] Ability to adjust queue size in Executors
Nam Nguyen bits...@gmail.com added the comment: By the way, ProcessPoolExecutor actually sets its queue size to a reasonable number but ThreadPoolExecutor does not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Nam Nguyen bits...@gmail.com added the comment: Ronald's patch does fix the segmentation fault with clang-compiled Python. But this bug report seems to be about LLVM-GCC not compiling correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13562] Notes about module load path
Nam Nguyen bits...@gmail.com added the comment: Please do keep the warning though. It is best to warn in both Python-C Py_Initialize() document and the Embedding tutorial. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Nam Nguyen bits...@gmail.com added the comment: Here's a minimal test case for #define bug in LLVM GCC. If the base struct is 8-byte long or smaller, the code runs correctly. gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) #include stdio.h #include stdlib.h typedef struct { int padding; /* remove this and the sizes will be the same */ int type; int attr; } struct_a; typedef struct { struct_a base; int junk; } struct_b; #define BUG(op) \ struct_a*)(op))-type) ? (void*)((struct_a*)(op) + 1) : \ (void*)((struct_b*)(op) + 1)) static void* func(void* op) { if (((struct_a*)(op))-type) { return (void*)((struct_a*)(op) + 1); } return (void*)((struct_b*)(op) + 1); } int main(int argc, char** argv) { struct_b* b = malloc(sizeof(struct_b) + 2); struct_a* a = (struct_a*)b; char* p; a-type = 0; p = BUG(b); printf(expected: %d, actual: %d, b = %p, p = %p\n, sizeof(struct_b), p - (char*)b, b, p); p = func(b); printf(expected: %d, actual: %d, b = %p, p = %p\n, sizeof(struct_b), p - (char*)b, b, p); return 0; } $ ./bug expected: 16, actual: 12, b = 0x10d7008b0, p = 0x10d7008bc expected: 16, actual: 16, b = 0x10d7008b0, p = 0x10d7008c0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Changes by Nam Nguyen bits...@gmail.com: -- nosy: +Nam.Nguyen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13562] Notes about module load path
Nam Nguyen bits...@gmail.com added the comment: That would be great. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13562] Notes about module load path
New submission from Nam Nguyen bits...@gmail.com: A doc patch to remind Python embedder to set sys.path prior to Py_Initialize. This is to ensure a controlled module load path to work around these issues: http://bugs.python.org/issue12989 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983 -- assignee: docs@python components: Documentation files: module.load.path.diff keywords: patch messages: 149071 nosy: Nam.Nguyen, docs@python priority: normal severity: normal status: open title: Notes about module load path type: feature request versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23888/module.load.path.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13562 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12989] Consistently handle path separator in Py_GetPath on Windows
New submission from Nam Nguyen bits...@gmail.com: The module search path is constructed from PYTHONPATH env-var, then zip path, then HKCU PythonPath, then HKLM PythonPath, then PYTHONPATH define (in pyconfig.h), and finally argv[0]. If PYTHONHOME is available, the PYTHONPATH define is expanded. These paths are separated by semicolon. Without PYTHONHOME, PYTHONPATH define is appended to module_search_path as-is, and a semicolon comes **after** that. With PYTHONHOME, PYTHONPATH define is expanded, and there is no semicolon after it. Then, finally, when argv[0] is added to module_search_path, a semicolon is **prepended** before it. This inconsistency in handling path delimiter leads to a case where two semicolons are next to each other (;;), which is translated to the current directory. It happens when PYTHONHOME is not found. The current directory is put in front of the application directory (argv[0]) causing a security issue whereby external modules might be imported inadvertently. This patch makes semicolon handling consistent. A semicolon is appended at the end of every path component, except argv[0]. -- components: Interpreter Core, Windows files: getpath.consistent.delim.patch keywords: patch messages: 144111 nosy: Nam.Nguyen priority: normal severity: normal status: open title: Consistently handle path separator in Py_GetPath on Windows versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file23169/getpath.consistent.delim.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12989 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Nam Nguyen bits...@gmail.com added the comment: In uint32_converter, I'm not sure the if statement comparing val and UINT32_MAX makes sense. val was defined to be unsigned long, which is 32bit on 32-bit compiler. -- nosy: +Nam.Nguyen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5876] __repr__ returning unicode doesn't work when called implicitly
Changes by Nam Nguyen bits...@gmail.com: -- nosy: +Nam.Nguyen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5876 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com