[issue12754] Add alternative random number generators
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12841] Incorrect tarfile.py extraction
Lars Gustäbel l...@gustaebel.de added the comment: Yes, it should be fixed in all affected branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12841] Incorrect tarfile.py extraction
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch looks ok. Can you push it Lars? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
New submission from Armin Rigo ar...@users.sourceforge.net: Here is (attached) a minimal patch to the core trunk CPython to allow extension modules to take over control of acquiring and releasing the GIL, as proposed here: http://mail.python.org/pipermail/python-dev/2011-August/113248.html With this patch, it is possible to write an independent extension module that offers the basic STM with atomic blocks: https://bitbucket.org/arigo/cpython-withatomic/raw/default/stm As Guido hints in the mail above, more experimentation is needed before we know if the idea can really fly, notably if there are annoying issues with existing locks causing random deadlocks. -- components: Interpreter Core files: stm.diff keywords: patch messages: 143132 nosy: arigo priority: normal severity: normal status: open title: [PATCH] stm.atomic type: feature request versions: Python 3.3 Added file: http://bugs.python.org/file23059/stm.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12754] Add alternative random number generators
douglas bagnall doug...@paradise.net.nz added the comment: I am no kind of crypto expert, but from what I read, there are no known attacks on chacha8 or salsa20/12 better than brute-forcing the key, and distinguishing the stream from random or deducing state would be considered an attack. There's a summary of the ESTREAM cipher's security here: http://cr.yp.to/streamciphers/attacks.html -- be aware it was written by the chacha/salsa author, so may be biased. I'm not sure I follow the notes on state size. Is it 320 bits + 64 bits or is it 512 bits? Yeah. The state is contained u32[16], so the 512 is sizeof(that). 320 + 64 is the number of states I can see it getting into from the seeds and cycles. I imagine the discrepancy is a convenience, just as the mt19937 struct uses a few more than 19937 bits. With respect to the SIMD optimizations and longlong to double operations, I'm curious to take a look at how it was done yet wonder if there is a provable, portable implementation and also wonder if it is worth it (the speed of generating a random() tends to be dwarfed by surrounding code that actually uses the result -- allocating the python object, etc). I agree that it is not worth it. However the dSFMT generator does seem quite portable and fall back to non-SIMD code (which is allegedly still faster), and its distribution is supposedly a bit better -- though not as good as WELL. The bit magic is quite simple: if you set the top 12 bits to 0x7ff and randomise the other 52, you get a double in the range [1, 2). So you subtract 1. It costs one bit relative to the current method, which is equivalent to 53 bit fixed point. They explain it reasonably well in these slides: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-slide-e.pdf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
Armin Rigo ar...@users.sourceforge.net added the comment: NB. I know that my stmmodule.c contains a gcc-ism: it uses a __thread global variable. I plan to fix this in future versions :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12851] ctypes: getbuffer() never provides strides
New submission from Stefan Krah stefan-use...@bytereef.org: PyCData_NewGetBuffer() must provide strides information if requested, e.g. in response to a PyBUF_FULL_RO request. -- assignee: skrah components: Extension Modules messages: 143135 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: ctypes: getbuffer() never provides strides type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
Nick Coghlan ncogh...@gmail.com added the comment: Rather than exposing the function pointers directly to the linker, I'd be happier with a function based API, with the pointer storage then being made static inside ceval.c. /* Each function returns the old func, or NULL on failure */ _PyEval_GIL_func _PyEval_replace_take_GIL(_PyEval_GIL_func take_gil); _PyEval_GIL_func _PyEval_replace_drop_GIL(_PyEval_GIL_func drop_gil); The redirection code (sans error checking) would then look like: old_take_gil = _PyEval_replace_take_GIL(stm_take_gil); old_drop_gil = _PyEval_replace_drop_GIL(stm_drop_gil); Currently they'd just replace the statics and would never fail, but it provides looser coupling regardless. -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
Armin Rigo ar...@users.sourceforge.net added the comment: I suppose I'm fine either way, but do you have a reason for not exposing the variables to the linker? Some Windows-ism were such exposed variables are slower to access than static ones, maybe? The point is that they are kind of internal use only anyway, so designing nice APIs around them looks overkill to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12742] Add support for CESU-8 encoding
Adal Chiriliuc adal.chiril...@gmail.com added the comment: It's an internal web API at the place I work for. To be able to use it from Python in some form, I did an workaround in which I just stripped everything outside BMP: # replace characters outside BMP with 'REPLACEMENT CHARACTER' (U+FFFD) def cesu8_to_utf8(text): result = index = 0 length = len(text) while index length: if text[index] \xf0: result += text[index] index += 1 else: result += \xef\xbf\xbd # u\ufffd.encode(utf8) index += 4 return result Now that I look at the workaround again, I'm not even sure it's about CESU-8 (it strips Unicode chars encoded to 4 bytes, not 2 pairs of 3 bytes surrogates). However I can see why there would be little interest in adding this encoding. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ 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
[issue12742] Add support for CESU-8 encoding
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm going to reject this. If people need it, they can always implement it using the codecs module. -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12742 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
New submission from Remi Pointel pyt...@xiri.fr: Hi, During the regress tests on OpenBSD, test_posix.test_fdlistdir() segfault. Details: $ ./python ./Tools/scripts/run_tests.py test_posix /home/remi/dev/cpython_test/python -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-network,-urlfetch,-audio,-gui test_posix Using random seed 7449086 [1/1] test_posix Fatal Python error: Segmentation fault Current thread 0x000209419000: File /home/remi/dev/cpython_test/Lib/test/test_posix.py, line 456 in test_fdlistdir File /home/remi/dev/cpython_test/Lib/unittest/case.py, line 386 in _executeTestPart File /home/remi/dev/cpython_test/Lib/unittest/case.py, line 441 in run File /home/remi/dev/cpython_test/Lib/unittest/case.py, line 493 in __call__ File /home/remi/dev/cpython_test/Lib/unittest/suite.py, line 105 in run File /home/remi/dev/cpython_test/Lib/unittest/suite.py, line 67 in __call__ File /home/remi/dev/cpython_test/Lib/unittest/suite.py, line 105 in run File /home/remi/dev/cpython_test/Lib/unittest/suite.py, line 67 in __call__ File /home/remi/dev/cpython_test/Lib/test/support.py, line 1192 in run File /home/remi/dev/cpython_test/Lib/test/support.py, line 1293 in _run_suite File /home/remi/dev/cpython_test/Lib/test/support.py, line 1327 in run_unittest File /home/remi/dev/cpython_test/Lib/test/test_posix.py, line 1022 in test_main File /home/remi/dev/cpython_test/Lib/test/regrtest.py, line 1139 in runtest_inner File /home/remi/dev/cpython_test/Lib/test/regrtest.py, line 915 in runtest File /home/remi/dev/cpython_test/Lib/test/regrtest.py, line 439 in main File /home/remi/dev/cpython_test/Lib/test/regrtest.py, line 1717 in module File /home/remi/dev/cpython_test/Lib/runpy.py, line 73 in _run_code File /home/remi/dev/cpython_test/Lib/runpy.py, line 160 in _run_module_as_main Traceback (most recent call last): File /home/remi/dev/cpython_test/Lib/runpy.py, line 160, in _run_module_as_main __main__, fname, loader, pkg_name) File /home/remi/dev/cpython_test/Lib/runpy.py, line 73, in _run_code exec(code, run_globals) File /home/remi/dev/cpython_test/Lib/test/__main__.py, line 13, in module regrtest.main() File /home/remi/dev/cpython_test/Lib/test/regrtest.py, line 683, in main raise Exception(Child error on {}: {}.format(test, result[1])) Exception: Child error on test_posix: Exit code -11 [98138 refs] $ ./python Lib/test/test_posix.py testNoArgFunctions (__main__.PosixTester) ... ok test_access (__main__.PosixTester) ... ok test_chdir (__main__.PosixTester) ... ok test_chflags (__main__.PosixTester) ... ok test_chown (__main__.PosixTester) ... ok test_confstr (__main__.PosixTester) ... ok test_cpu_set_basic (__main__.PosixTester) ... skipped don't have sched affinity support test_cpu_set_bitwise (__main__.PosixTester) ... skipped don't have sched affinity support test_cpu_set_cmp (__main__.PosixTester) ... skipped don't have sched affinity support test_dup (__main__.PosixTester) ... ok test_dup2 (__main__.PosixTester) ... ok test_environ (__main__.PosixTester) ... ok test_faccessat (__main__.PosixTester) ... ok test_fchmodat (__main__.PosixTester) ... ok test_fchown (__main__.PosixTester) ... ok test_fchownat (__main__.PosixTester) ... ok test_fdlistdir (__main__.PosixTester) ... zsh: segmentation fault (core dumped) ./python Lib/test/test_posix.py with gdb $ gdb ./python GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as amd64-unknown-openbsd5.0... (gdb) run Lib/test/test_posix.py Starting program: /home/remi/dev/cpython_test/python Lib/test/test_posix.py testNoArgFunctions (__main__.PosixTester) ... ok test_access (__main__.PosixTester) ... ok test_chdir (__main__.PosixTester) ... ok test_chflags (__main__.PosixTester) ... ok test_chown (__main__.PosixTester) ... ok test_confstr (__main__.PosixTester) ... ok test_cpu_set_basic (__main__.PosixTester) ... skipped don't have sched affinity support test_cpu_set_bitwise (__main__.PosixTester) ... skipped don't have sched affinity support test_cpu_set_cmp (__main__.PosixTester) ... skipped don't have sched affinity support test_dup (__main__.PosixTester) ... ok test_dup2 (__main__.PosixTester) ... ok test_environ (__main__.PosixTester) ... ok test_faccessat (__main__.PosixTester) ... ok test_fchmodat (__main__.PosixTester) ... ok test_fchown (__main__.PosixTester) ... ok test_fchownat (__main__.PosixTester) ... ok test_fdlistdir (__main__.PosixTester) ... Program received signal SIGSEGV, Segmentation fault. [Switching to process 21658, thread 0x20a519000] _readdir_unlocked (dirp=0xafb0e80, result=0x7f7d7ac0, skipdeleted=1) at
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
Ross Lagerwall rosslagerw...@gmail.com added the comment: Does it always segfault? Try: ./python -c 'import os; print(os.fdlistdir(os.open(/tmp, os.O_RDONLY)))' with various values for /tmp. From what I can see, the code for fdlistdir is basically the same as os.listdir(). If possible, try os.listdir() as well. -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12850] [PATCH] stm.atomic
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
Remi Pointel pyt...@xiri.fr added the comment: Hi, thanks for your response. Yes it always segfault: $ ./python -c 'import os; print(os.fdlistdir(os.open(/tmp, os.O_RDONLY)))' zsh: segmentation fault (core dumped) ./python -c 'import os; print(os.fdlistdir(os.open(/tmp, os.O_RDONLY)))' $ ./python -c 'import os; print(os.fdlistdir(os.open(/tmp/test_python, os.O_RDONLY)))' zsh: segmentation fault (core dumped) ./python -c $ ./python -c 'import os; print(os.fdlistdir(os.open(/var/tmp, os.O_RDONLY)))' zsh: segmentation fault (core dumped) ./python -c 'import os; print(os.fdlistdir(os.open(/var/tmp, os.O_RDONLY))) With listdir it correctly works: $ ./python -c 'import os; print(os.listdir(/tmp))' ['.X11-unix', '.ICE-unix', 'test_python', 'tmpl80ewt', 'tmpled292'] [42658 refs] $ ./python -c 'import os; print(os.listdir(/tmp/test_python/))' ['1file', '2file', '3file'] [42658 refs] $ ./python -c 'import os; print(os.listdir(/var/tmp/))' ['vi.recover', 'kdecache-remi'] [42658 refs] Remi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like a kernel bug !? Are you able to write a C script reproducing the problem? If not, I can try to write it. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
Ross Lagerwall rosslagerw...@gmail.com added the comment: It looks like a kernel bug !? That's what I thought given that it appears to be working on all the other platforms. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation
Jean-Michel Fauth wxjmfa...@gmail.com added the comment: Œ, œ or even are historically ligatures or ligatured forms. In the French typography, they are single plain letters and they belong the group of the 42 letters used in the French typography. Typographically speaking, using oe instead of œ is considered as a mistake, while not using the ligatured forms for the groups of letters like ff, ffi, ffl, fj, et, st is acceptable. Microsoft with cp1252, Apple with mac-roman, Adobe and all foundries and now Unicode are working correctly. It should be noted, when TeX moved from the ascii to iso-8859-1 (more precisely CorkEncoding) as default encoding, they saw the problem and introduced the \oe or \OE commands. From my understanding and my point of view on the subject, ISO has somehow recognized his mistake by introducing iso-8859-15. Infortunatelly, it was too late. To the subject: Œdipe: correct, Oedipe, OEdipe: incorrect. Without beeing an expert on that field, all the informations one can find on Wikipedia (French) regarding questions about typography are generally correct. -- nosy: +Jean-Michel.Fauth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation
Antoine Pitrou pit...@free.fr added the comment: Œ, œ or even are historically ligatures or ligatured forms. In the French typography, they are single plain letters and they belong the group of the 42 letters used in the French typography. Typographically speaking, using oe instead of œ is considered as a mistake, It's not only typographically speaking, it's really a spelling error, even in hand-written text :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
Remi Pointel pyt...@xiri.fr added the comment: Hi, I tested with this program in C: #include stdio.h #include dirent.h #include fcntl.h #include stdlib.h int main(void) { DIR *d; struct dirent *dp; int dfd; if ((d = fdopendir((dfd = open(/tmp, O_RDONLY == NULL) { fprintf(stderr, Cannot open /tmp directory\n); exit(1); } while ((dp = readdir(d)) != NULL) { if (dp-d_name[0] == '.') continue; printf(%s, \n, dp-d_name); } closedir(d); return 0; } and it seems to correctly works. Remi. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation
Tom Christiansen tchr...@perl.com added the comment: Antoine Pitrou rep...@bugs.python.org wrote on Mon, 29 Aug 2011 13:21:06 -: It's not only typographically speaking, it's really a spelling error, even in hand-written text :-) Sure, and so too is omitting an accent mark or diaeresis. But—alas!—you’ll never convince most monoglot anglophones of that, the ones who keep wanting to strip them from résumé, façade, châteaux, crème brûlée, fête, tête-à-tête, à la française, or naïveté, not to mention José, jalapeño, the erstwhile American Secretary of State Federico Peña, or nearby Cañon City, Colorado, where I have family. I think œnonlogy has survived solely on its rarity, and the Encyclopædia Britannica is that way because the ligat(ur)ed letter is in their actual trademark. Cell phone users sending text messages have long suffered the grievous injuries to their language(s) that naked ASCII imparts, but this is nothing like the crossdressing nightmare called Greeklish, also variously known as Grenglish, Latinoellinika/Λατινοελληνικά, or ASCII Greek. http://en.wikipedia.org/wiki/Greeklish [...] The reason for this is the fact that text written in Greeklish is considerably less aesthetically pleasing, and also much harder to read, compared to text written in the Greek alphabet. A non-Greek speaker/reader can guess this by this example: δις ιζ χαρντ του ριντ would be the way to write this is hard to read in English but utilizing the Greek alphabet. I especially enjoy George Baloglou’s Byzantine Grenglish, wherein: Ὀδυσσεύς= Oducceusinstead of Odysseus Ἀχιλλεύς= Axilleusinstead of Achilleus Σίσυφος = Sicuphosinstead of Sisyphus Περικλῆς= 5epiklhsinstead of Pericles Χθονός = X8onos instead of Chthonos Οι Ατρείδες= Oi Atpeides instead of the Atreïdes Terrible though the depredations upon the French language that may have been committed by ASCII, surely these go even further. :) --tom Η ΙλιάδαH Iliada Μῆνιν ἄειδε, θεὰ, Πηληϊάδεω Ἀχιλῆος Mhnin aeide, 8ea, 5hlhiadeo Axilhos οὐλομένην, ἣ μυρί’ Ἀχαιοῖς ἄλγε’ ἔθηκε, oulomenhn, 'h mupi’ Axaiois alge’ e8hke, πολλὰς δ’ ἰφθίμους ψυχὰς Ἄϊδι προῒαψενnollas d’ iph8imous yuxas Aidi npoiayen ἡρώων, αὐτοὺς δὲ ἑλώρια τεῦχε κύνεσσιν'hpoon, autous de elopia teuxe kuneccin οἰωνοῖσί τε πᾶσι· Διὸς δ’ ἐτελείετο βουλή·oionoici te naci· Dios d’ eteleieto boulh· ἐξ οὗ δὴ τὰ πρῶτα διαστήτην ἐρίσαντε eks o'u dh ta npota diacththn epicante Ἀτρεΐδης τε ἄναξ ἀνδρῶν καὶ δῖος Ἀχιλλεύς.Atpeidhs te anaks andpon kai dios Axilleus. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8323] buffer objects are picklable but result is not unpicklable
sbt shibt...@gmail.com added the comment: Buffer objects *are* picklable with protocol 2 (but not with earlier protocols). Unfortunately, the result is not unpicklable. This is not a problem with multiprocessing. (buffer seems to inherit __reduce__ and __reduce_ex__ from object.) Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type help, copyright, credits or license for more information. import cPickle cPickle.dumps(buffer(hello), cPickle.HIGHEST_PROTOCOL) '\x80\x02c__builtin__\nbuffer\nq\x01)\x81q\x02.' cPickle.loads(_) Traceback (most recent call last): File stdin, line 1, in module TypeError: buffer() takes at least 1 argument (0 given) -- nosy: +sbt title: multiprocessing.Queue ignores pickle restrictions in .put() - buffer objects are picklable but result is not unpicklable ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8323 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9253] argparse: optional subparsers
Changes by Éric Araujo mer...@netwok.org: -- stage: test needed - needs patch versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9253 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3871] cross and native build of python for mingw32 with packaging
Éric Araujo mer...@netwok.org added the comment: if you recall there was some discussion that it was acceptable to use distutils but *only* for python 2.N There was discussion, yes, but it was not decided to change our decision on the freeze: msg121097 just as an aside: have all python 3.N packaging scripts, for all python-dev scripts *and* all 3rd party packages world-wide, been using distutils2 by default instead of distutils? We are well aware that it is going to take years for the Python world to switch to the new standard, that’s why 1) projects can have a distutils-compatible setup.py and a distutils2-compatible setup.Cfg 2) pysetup can install distutils-based projects 3) I’m working on documentation to help people use distutils2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Changes by jan matejek jmate...@suse.cz: -- nosy: +matejcik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3871] cross and native build of python for mingw32 with packaging
Changes by Zooko O'Whielacronx zo...@zooko.com: -- nosy: -zooko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11913] sdist refuses README.rst
Éric Araujo mer...@netwok.org added the comment: distribute is not a project of python-dev, please use their bug tracker. For distutils, I explained why we can’t change it and proposed a doc change; nobody commented on that. For distutils2, I’m waiting for a reply from Tarek to this question: why don’t we include README by default anymore? -- components: +Distutils2 nosy: +alexis title: sdist should allow for README.rst - sdist refuses README.rst ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11913 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Adding a new regex module (compatible with re)
Changes by Éric Araujo mer...@netwok.org: -- components: +Library (Lib) title: Regexp 2.7 (modifications to current re 2.2.2) - Adding a new regex module (compatible with re) versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Antoine Pitrou pit...@free.fr added the comment: Well, if we use two different paths based on the libc version, it might not be a good idea, since behaviour can be different in some cases. It would be nice to know if some modern platforms have a non-compliant realpath(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10946] bdist doesn’t pass --skip-build on to subcommands
Éric Araujo mer...@netwok.org added the comment: The fix was actually very simple. I have committed it to my 3.2 repo and will push later. -- stage: test needed - commit review Added file: http://bugs.python.org/file23061/fix-bdist-skip-build.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10886] Unhelpful backtrace for multiprocessing.Queue
sbt shibt...@gmail.com added the comment: mp_queue_pickle_in_main_thread.patch (against the default branch) fixes the problem by doing the pickling in Queue.put(). It is version of a patch for Issue 8037 (although I believe the behaviour complained about in Issue 8037 is not an actual bug). The patch also has the advantage of ensuring that weakref callbacks and __del__ methods for objects put in the queue will not be run in the background thread. (Bytes objects have trivial destructors.) This potentially prevents inconsistent state caused by forking a process while the background thread is running -- see Issue 6721. -- keywords: +patch nosy: +sbt versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file23062/mp_queue_pickle_in_main_thread.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12836] ctypes.cast() creates circular reference in original object
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I can confirm that the same behaviour occur in Python 3.3, and this appears to be by design. There's a specific line in the cast() function in in Modules/_ctypes.c: rc = PyDict_SetItem(result-b_objects, index, src); This adds the source object to the _objects of the cast object being returned. However, earlier in the function, the code CDataObject *obj = (CDataObject *)src; ... result-b_objects = obj-b_objects; ensures that result and src are using a single dictionary. Possibly, the result's b_objects needs to be a copy of the src's b_objects; but I don't know enough about ctypes internals to say whether the present code is intentional, or whether an attempt to minimise resource usage (by not copying the dictionary) has led to unwanted consequences. -- nosy: +vinay.sajip versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12836 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12785] list_distinfo_file is wrong
Éric Araujo mer...@netwok.org added the comment: The tests using build_ext now pass \o/ I would love for someone with Windows and a 3.3 clone to test this patch (and if it does not fix, try with the two lines mentioned in msg142773 removed). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12833] raw_input misbehaves when readline is imported
Éric Araujo mer...@netwok.org added the comment: Still, this behavior is surprising and undesirable. I would suggest adding a note to the docs for the readline module +1. -- assignee: - docs@python components: +Documentation -IO, Interpreter Core nosy: +docs@python stage: test needed - needs patch versions: +Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12833 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8037] multiprocessing.Queue's put() not atomic thread wise
sbt shibt...@gmail.com added the comment: Modifying an object which is already on a traditional queue can also change what is received by the other thread (depending on timing). So Queue.Queue's put() is not atomic either. Therefore I do not believe this behaviour is a bug. However the solution proposed is a good one since it fixes Issue 10886. In addition it prevents arbitrary code being run in the background thread by weakref callbacks or __del__ methods. Such arbitrary code may cause inconsistent state in a forked process if the fork happens while the queue's thread is running -- see issue 6271. I have submitted a patch for Issue 10886. It is basically the same as patch_27maint.diff, but it is against the default mercurial branch. (Also, it is a bit simpler because does it does not unnecessarily modify Queue.get().) I would suggest closing this issue and letting Issue 10886 take it's place. -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8037 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
Ross Lagerwall rosslagerw...@gmail.com added the comment: I'm not sure what the status of Python and OpenBSD support is but I just tried the latest stable version of OpenBSD (4.9) in VirtualBox and it won't compile fully. It segfaults while trying to run setup.py (I think). I see you're running OpenBSD 5.0. Does it compile easily on that without having to jump through hoops? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8037] multiprocessing.Queue's put() not atomic thread wise
sbt shibt...@gmail.com added the comment: I meant Issue 6721 (Locks in python standard library should be sanitized on fork) not 6271. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8037 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10886] Unhelpful backtrace for multiprocessing.Queue
Antoine Pitrou pit...@free.fr added the comment: This shouldn't be a problem in Python 3.3, where the Connection classes are reimplemented in pure Python. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12853] global name 'r' is not defined in upload.py
New submission from Russell Owen reo...@users.sourceforge.net: When using distutils to upload code to PyPI I get the following message (but the upload is successful): {{{ Traceback (most recent call last): File setup.py, line 60, in module zip_safe = False, # icons (e.g. as used by RO.Wdg.GrayImageDispWdg) are not retrieved in a zip-safe way File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py, line 152, in setup dist.run_commands() File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py, line 953, in run_commands self.run_command(cmd) File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py, line 972, in run_command cmd_obj.run() File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/upload.py, line 60, in run self.upload_file(command, pyversion, filename) File /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/upload.py, line 180, in upload_file msg = '\n'.join(('-' * 75, r.read(), '-' * 75)) NameError: global name 'r' is not defined }}} A look at the current source code shows that there is indeed no variable r. I'm not sure what was intended but it seems likely that it would be possible to replace r.read() by reason, status, or a combination of the two. -- messages: 143162 nosy: reowen priority: normal severity: normal status: open title: global name 'r' is not defined in upload.py type: behavior versions: Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Charles-François Natali neolo...@free.fr added the comment: Well, if we use two different paths based on the libc version, it might not be a good idea, since behaviour can be different in some cases. Indeed. It would be nice to know if some modern platforms have a non-compliant realpath(). Alas, it doesn't seem to hold for OpenBSD: http://old.nabble.com/Make-realpath(3)-conform-to-SUSv4-td32031895.html A patch supporting NULL was committed two months ago, which means we probably can't push this forward. I've been quite disappointed by POSIX lately... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Antoine Pitrou pit...@free.fr added the comment: Alas, it doesn't seem to hold for OpenBSD: http://old.nabble.com/Make-realpath(3)-conform-to-SUSv4-td32031895.html A patch supporting NULL was committed two months ago, which means we probably can't push this forward. I've been quite disappointed by POSIX lately... :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Ross Lagerwall rosslagerw...@gmail.com added the comment: I've been quite disappointed by POSIX lately... POSIX the standard, or the implementers?? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12853] global name 'r' is not defined in upload.py
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - tarek components: +Distutils nosy: +eric.araujo, tarek stage: - needs patch versions: +Python 3.2, Python 3.3 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11564] pickle not 64-bit ready
Nadeem Vawda nadeem.va...@gmail.com added the comment: Tested the latest patch with -M11G. All tests pass. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11564 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Charles-François Natali neolo...@free.fr added the comment: POSIX the standard, or the implementers?? Both :-) For those wondering why we can't use PATH_MAX (ignoring the buffer overallocation), here's why: https://www.securecoding.cert.org/confluence/display/cplusplus/FIO02-CPP.+Canonicalize+path+names+originating+from+untrusted+sources Avoid using this function. It is broken by design since (unless using the non-standard resolved_path == NULL feature) it is impossible to determine a suitable size for the output buffer, resolved_path. According to POSIX a buffer of size PATH_MAX suffices, but PATH_MAX need not be a defined constant, and may have to be obtained using pathconf(3). And asking pathconf(3) does not really help, since on the one hand POSIX warns that the result of pathconf(3) may be huge and unsuitable for mallocing memory. And on the other hand pathconf(3) may return -1 to signify that PATH_MAX is not bounded. The libc4 and libc5 implementation contains a buffer overflow (fixed in libc-5.4.13). As a result, set-user-ID programs like mount(8) need a private version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12854] PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout
New submission from Albert Zeyer alb...@googlemail.com: In Parser/tokenizer.c, there is `PyOS_Readline(stdin, stdout, tok-prompt)`. This ignores any `sys.stdin` / `sys.stdout` overwrites. The usage should be like in Python/bltinmodule.c in builtin_raw_input. -- messages: 143168 nosy: Albert.Zeyer priority: normal severity: normal status: open title: PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12854 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12769] String with NUL characters truncated by ctypes when assigning to a char array
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: This behaviour also occurs in 3.3, where this does appear to be a bug. In Modules/_ctypes/cfield.c, the setting code does a strlen(), which is in fact questioned in a comment. In function s_set(): size = strlen(data); /* XXX Why not Py_SIZE(value)? */ Why not, indeed? value is the bytes object passed in, and using Py_SIZE does indeed copy all the bytes. However, it's operating in string rather than buffer mode: for example, it adds a byte for a terminating NUL, so if the 5-byte value b'x\x00y\x00z' were passed, 6 bytes are actually copied. This doesn't seem right. Even after changing s_set to use Py_SIZE, you can't see the copied bytes when you access the attribute, since the code in s_get() skips out at the first NUL byte and then constructs using PyBytes_FromStringAndSize and the truncated size. One can see the convenience of avoiding the display of lots of NUL chars, but it doesn't seem correct to do this. On 2.x it's a bit muddier, as arrays of c_char could be using ASCII strings, where a NUL terminator might be appropriate to consider. -- nosy: +vinay.sajip versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12769] String with NUL characters truncated by ctypes when assigning to a char array
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Seems related: #8161 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9041] raised exception is misleading
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: While the patch might improve over the current situation, doesn't it potentially mask other errors which might be raised by PyFloat_AsDouble()? Why not just x = PyFloat_AsDouble(value); if (PyErr_Occurred()) return NULL; which would not mask any exception? -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9041 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12841] Incorrect tarfile.py extraction
Lars Gustäbel l...@gustaebel.de added the comment: Yes, I can do that as soon as I've managed to wrap my head around using Mercurial and the new way of developing Python. I have been away from Python programming for quite some time and haven't adapted my workflow yet. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- hgrepos: +64 ___ 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
[issue6715] xz compressor support
Changes by Nadeem Vawda nadeem.va...@gmail.com: Added file: http://bugs.python.org/file23063/f3cf187208ea.diff ___ 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
[issue6715] xz compressor support
Nadeem Vawda nadeem.va...@gmail.com added the comment: Attached is a patch (f3cf187208ea.diff) containing my work so far on reimplementing the lzma module. So far I've just done the LZMACompressor and LZMADecompressor classes, but I'm hoping to implement LZMAFile this weekend. -- ___ 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
[issue6721] Locks in python standard library should be sanitized on fork
sbt shibt...@gmail.com added the comment: multiprocessing.util already has register_after_fork() which it uses for cleaning up certain things when a new process (launched by multiprocessing) is starting. This is very similar to the proposed atfork mechanism. Multiprocessing assumes that it is always safe to delete lock objects. If reinit_locks.diff is committed then I guess this won't be a problem. I will try to go through multiprocessing's use of threads: Queue - Queue's have a feeder thread which pushes objects in to the underlying pipe as soon as possible. The state which can be modified by this thread is a threading.Condition object and a collections.deque buffer. Both of these are replaced by fresh copies by the after-fork mechanism. However, because objects in the buffer may have __del__ methods or weakref callbacks associated, arbitrary code may be run by the background thread if the reference count falls to zero. Simply pickling the argument of put() before adding it to the buffer fixes that problem -- see the patch for Issue 10886. With this patch I think Queue's use of threads is fork-safe. Pool If a fork occurs while a pool is running then a forked process will get a copy of the pool object in an inconsistent state -- but that does not matter since trying to use a pool from a forked process will *never* work. Also, some of a pool's methods support callbacks which can execute arbitrary code in a background thread. This can create inconsistent state in a forked process As with Queue.put, pool methods should pickle immediately for similar reasons. I would suggest documenting clearly that a pool should only ever be used or deleted by the process which created it. We can use register_after_fork to make all of a pool's methods raise an error after a fork. We should also document that callbacks should only be used if no more processes will be forked. allow_connection_pickling - Currently multiprocessing.allow_connection_pickling() does not work because types are registered with ForkingPickler instead of copyreg -- see Issue 4892. However, the code in multiprocessing.reduction uses a background thread to support the transfer of sockets/connections between processes. If this code is ever resurrected I think the use of register_after_fork makes this safe. Managers A manager uses a threaded server process. This is not a problem unless you create a user defined manager which forks new processes. The documentation should just say Don't Do That. I think multiprocessing's threading issues are all fixable. -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12841] Incorrect tarfile.py extraction
STINNER Victor victor.stin...@haypocalc.com added the comment: You can get a lot of information on this guide: http://docs.python.org/devguide/setup.html#getting-set-up You can also ask on IRC (#python-dev on Freenode), or by email on the python-dev mailing list. It was really hard for me to switch from Subversion to Mercurial. Not because of the merge and the push things, but because of the 4 different Python branches! So don't hesitate to ask me questions about how I use Mercurial ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like a kernel bug !? And you know what? fdopendir() function has been introducted in OpenBSD 5.0! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10886] Unhelpful backtrace for multiprocessing.Queue
sbt shibt...@gmail.com added the comment: This shouldn't be a problem in Python 3.3, where the Connection classes are reimplemented in pure Python. What should not be a problem? Changes to the implementation of Connection won't affect whether Queue.put() raises an error immediately if it gets an unpicklable argument. Nor will they affect whether weakref callbacks or __del__ methods run in a background thread, causing fork-safety issues. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12762] EnvironmentError_str contributes to unportable code
Barry A. Warsaw ba...@python.org added the comment: I tend to agree that the errno is much less useful than the symbolic name. The former is useful and will be available as an attribute, but the latter should be used in the str. The change will probably break scads of doctests, but is probably worth it. :) BTW, this came up in the PEP 3151 discussions, but I agree it's orthogonal to that PEP. -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12762 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10886] Unhelpful backtrace for multiprocessing.Queue
Antoine Pitrou pit...@free.fr added the comment: Changes to the implementation of Connection won't affect whether Queue.put() raises an error immediately if it gets an unpicklable argument. Ah, right. Then indeed it won't make a difference. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10886 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11564] pickle not 64-bit ready
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset babc90f3cbf4 by Antoine Pitrou in branch '3.2': Issue #11564: Avoid crashes when trying to pickle huge objects or containers http://hg.python.org/cpython/rev/babc90f3cbf4 New changeset 56242682a931 by Antoine Pitrou in branch 'default': Issue #11564: Avoid crashes when trying to pickle huge objects or containers http://hg.python.org/cpython/rev/56242682a931 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11564 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
Charles-François Natali neolo...@free.fr added the comment: [Switching to process 21658, thread 0x20a519000] _readdir_unlocked (dirp=0xafb0e80, result=0x7f7d7ac0, skipdeleted=1) at /usr/src/lib/libc/gen/readdir.c:44 44 if (dirp-dd_loc = dirp-dd_size) Looks like dirp points to an invali location in memory. Could you try display it (p *dirp)? But this definitely looks like a kernel/libc bug... -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11564] pickle not 64-bit ready
Antoine Pitrou pit...@free.fr added the comment: Should be fixed as far as possible (OverflowErrors will be raised instead of crashing). Making people actually 64-bit compliant is part of PEP 3154 (http://www.python.org/dev/peps/pep-3154/). -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11564 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD
STINNER Victor victor.stin...@haypocalc.com added the comment: I think that the problem is that fdopendir() is not defined. If a function is not defined, C uses int as the result type. An int is not enough to store a 64-bit pointer. See in gdb output: dirp is 0x0afb0e80 whereas other pointers look like 0x20973fc30. You missed the highest hexa digit (0x2). fdopendir() requires IEEE 1003.1-2008 and so #define _POSIX_C_SOURCE 200809L, whereas pyconfig.h defines _POSIX_C_SOURCE to 200112L (POSIX 2001). Something should be done in configure.in, near: - case $ac_sys_system/$ac_sys_release in # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, # even though select is a POSIX function. Reported by J. Ribbens. # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. # In addition, Stefan Krah confirms that issue #1244610 exists through # OpenBSD 4.6, but is fixed in 4.7. OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@:@0123456@:@) define_xopen_source=no # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is # also defined. This can be overridden by defining _BSD_SOURCE # As this has a different meaning on Linux, only define it on OpenBSD AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features]) ;; OpenBSD/*) # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is # also defined. This can be overridden by defining _BSD_SOURCE # As this has a different meaning on Linux, only define it on OpenBSD AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features]) ;; - or maybe in - if test $define_xopen_source = yes then AC_DEFINE(_XOPEN_SOURCE, 600, Define to the level of X/Open that your system supports) # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else # several APIs are not declared. Since this is also needed in some # cases for HP-UX, we define it globally. AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate Unix95-and-earlier features) AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001) fi - I tried AC_DEFINE(_POSIX_C_SOURCE, 200809L, Define to activate features from IEEE Stds 1003.1-2008) but it doesn't work. Add #define _POSIX_C_SOURCE 200809L at the beginning of Modules/posixmodule.c does works around this issue. -- keywords: +patch Added file: http://bugs.python.org/file23064/posix_2008.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12852 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
New submission from Matthew Boehm boehm.matt...@gmail.com: A file opened with codecs.open() splits on a form feed character (\x0c) while a file opened with open() does not. with open(formfeed.txt, w) as f: ... f.write(line \fone\nline two\n) ... with open(formfeed.txt, r) as f: ... s = f.read() ... s 'line \x0cone\nline two\n' print s line one line two import codecs with open(formfeed.txt, rb) as f: ... lines = f.readlines() ... lines ['line \x0cone\n', 'line two\n'] with codecs.open(formfeed.txt, r, encoding=ascii) as f: ... lines2 = f.readlines() ... lines2 [u'line \x0c', u'one\n', u'line two\n'] Note that lines contains two items while lines2 has 3. Issue 7643 has a good discussion on newlines in python, but I did not see this discrepancy mentioned. -- components: Interpreter Core messages: 143182 nosy: Matthew.Boehm priority: normal severity: normal status: open title: open() and codecs.open() treat form-feed differently type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
STINNER Victor victor.stin...@haypocalc.com added the comment: U+000C (Form feed) is considered as a line boundary in Unicode (unicode type), but no for a byte string (str type). Example: u'line \x0cone\nline two\n'.splitlines(True) [u'line \x0c', u'one\n', u'line two\n'] 'line \x0cone\nline two\n'.splitlines(True) ['line \x0cone\n', 'line two\n'] -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12589] test_long.test_nan_inf() failed on OpenBSD (powerpc)
STINNER Victor victor.stin...@haypocalc.com added the comment: what information do you need to advance on this bug? It would be easier to debug if I had access to OpenBSD on a PowerPC host. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
Matthew Boehm boehm.matt...@gmail.com added the comment: Thanks for explaining the reasoning. Perhaps I should add this to the python wiki (http://wiki.python.org/moin/Unicode) ? It would be nice if it fit in the docs somewhere, but I'm not sure where. I'm curious how (or if) 2to3 would handle this as well, but I'm closing this issue as it's now clear to me why these two are expected to act differently. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
Changes by Matthew Boehm boehm.matt...@gmail.com: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
STINNER Victor victor.stin...@haypocalc.com added the comment: It would be nice if it fit in the docs somewhere, but I'm not sure where. See: http://docs.python.org/library/codecs.html#codecs.StreamReader.readline Can you suggest a patch for the documentation? Source code of this document: http://hg.python.org/cpython/file/bb7b14dd5ded/Doc/library/codecs.rst -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
Matthew Boehm boehm.matt...@gmail.com added the comment: I'll suggest a patch for the documentation when I get to my home computer in an hour or two. -- assignee: - docs@python components: +Documentation -Interpreter Core nosy: +docs@python resolution: wont fix - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12847] crash with negative PUT in pickle
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0d9e4ce1c010 by Antoine Pitrou in branch '3.2': Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in http://hg.python.org/cpython/rev/0d9e4ce1c010 New changeset fb8d7a666bed by Antoine Pitrou in branch 'default': Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in http://hg.python.org/cpython/rev/fb8d7a666bed -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12847] crash with negative PUT in pickle
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12785] list_distinfo_file is wrong
Nadeem Vawda nadeem.va...@gmail.com added the comment: I've tested the attached patch against 3.3 on Windows XP, and it seems to fix the test_database failures. There were some merge conflicts when I applied the patch (because some of the docstring and comment changes had already been committed in fixes from the other issue), so I've uploaded the exact diff of what I tested with. I tested both with and without the change you suggested in msg142773 - the tests pass in both cases. -- Added file: http://bugs.python.org/file23065/fix-list_distinfo_files-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12856] tempfile PRNG reuse between parent and child process
Ferringb ferri...@gmail.com added the comment: Bleh; pardon, reuploading the patch. hg export aparently appends to the output file rather than overwriting it (last patch had duplicated content in it). -- Added file: http://bugs.python.org/file23067/unique-seed-per-process-tempfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12856] tempfile PRNG reuse between parent and child process
New submission from Ferringb ferri...@gmail.com: Roughly; tempfile's uniqueness is derived from a global random instance; while there are protections for thread access, a forked child process /will/ inherit that PRNG source, resulting in children/parent trying the same set of names. Mostly it's proving annoying in some code I have to deal in, although it wouldn't surprise me if someone watching a known temp location could use the predictability in some fashion. As for affect, all versions of python have this; attached patch is cut against trunk. -- files: unique-seed-per-process-tempfile.patch keywords: patch messages: 143192 nosy: ferringb priority: normal severity: normal status: open title: tempfile PRNG reuse between parent and child process type: behavior Added file: http://bugs.python.org/file23066/unique-seed-per-process-tempfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12856] tempfile PRNG reuse between parent and child process
Changes by Ferringb ferri...@gmail.com: Removed file: http://bugs.python.org/file23066/unique-seed-per-process-tempfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12855] open() and codecs.open() treat form-feed differently
Matthew Boehm boehm.matt...@gmail.com added the comment: I'm taking a look at the docs now. I'm considering adding a table/list of characters python treats as newlines, but it seems like this might fit better as a note in http://docs.python.org/library/stdtypes.html#str.splitlines or somewhere else in stdtypes. I'll start working on it now, but please let me know what you think about this. This is my first attempt at a patch, so I greatly appreciate your help so far. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12856] tempfile PRNG reuse between parent and child process
Antoine Pitrou pit...@free.fr added the comment: Interesting, thank you. Two nits: - the test must be skipped where os.fork() isn't available (namely, under Windows) - I would do os.read(fd, 100) (or some other large value) rather than os.read(fd, 6), so that the test doesn't depend on the exact length of the random sequences produced -- components: +Library (Lib) nosy: +ncoghlan, pitrou stage: - patch review versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12856] tempfile PRNG reuse between parent and child process
Ferringb ferri...@gmail.com added the comment: the test must be skipped where os.fork() isn't available (namely, under Windows) Done, although I still humbly suggest telling windows to bugger off ;) I would do os.read(fd, 100) (or some other large value) rather than os.read(fd, 6), so that the test doesn't depend on the exact length of the random sequences produced 100 is no different than 6 (same potential exists); better to just use the length from the parent side access to the PRNG. That leaves open the unlikely scenario of child returning 7 chars, parent 6, and child/parent agreeing on the first 6... which would very likely be a bug anyways. -- Added file: http://bugs.python.org/file23068/unique-seed-per-process-tempfile.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()
David H. Gutteridge dhgutteri...@sympatico.ca added the comment: Terry: I wasn't aware xml.parsers.expat is deprecated, though it clearly says so in the documentation, I now see... (I'd been using it because it features prominently in various examples in Python books, and it's lightweight.) I haven't tested with the 3.x series, because I rely on the 2.6 branch as a dependency for a variety of software on NetBSD, but having said that, I can test it on Mac OS X. Your test output is the correct, expected results, yes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12829 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()
David H. Gutteridge dhgutteri...@sympatico.ca added the comment: Confirming that Python 3.2.1 crashes the same way on Mac OS X 10.6.8: Process: Python [9594] Path: /Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: ??? (???) Code Type: X86-64 (Native) Parent Process: bash [9570] Date/Time: 2011-08-30 00:35:53.863 -0400 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Interval Since Last Report: 292720 sec Crashes Since Last Report: 2 Per-App Crashes Since Last Report: 2 Anonymous UUID: 5504B203-8C24-427A-B74C-EDBD3EF8DB51 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0001006fb000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 pyexpat.so 0x0001006a03e9 normal_updatePosition + 57 1 pyexpat.so 0x00010068b2c4 PyExpat_XML_GetCurrentLineNumber + 84 2 pyexpat.so 0x00010068673e set_error + 62 3 pyexpat.so 0x0001006874e8 xmlparse_Parse + 200 4 org.python.python 0x0001000b39b2 PyEval_EvalFrameEx + 30530 5 org.python.python 0x0001000b2a4d PyEval_EvalFrameEx + 26589 6 org.python.python 0x0001000b431a PyEval_EvalCodeEx + 1770 7 org.python.python 0x0001000b462f PyEval_EvalCode + 63 8 org.python.python 0x0001000db82b PyRun_FileExFlags + 187 9 org.python.python 0x0001000dbaf9 PyRun_SimpleFileExFlags + 521 10 org.python.python 0x0001000f0a03 Py_Main + 3059 11 org.python.python 0x00010e5f 0x1 + 3679 12 org.python.python 0x00010d04 0x1 + 3332 Thread 0 crashed with X86 Thread State (64-bit): rax: 0xfffb rbx: 0x0001003a9b40 rcx: 0x0001003a9e48 rdx: 0x00010093b59f rdi: 0x0001006b76e0 rsi: 0x0001006fb000 rbp: 0x7fff5fbfed60 rsp: 0x7fff5fbfed60 r8: 0x0001006a0408 r9: 0x0001008cb400 r10: 0x0800 r11: 0x0001006d4dda r12: 0x r13: 0x0001005aa5f0 r14: 0x0009 r15: 0x0001002b6810 rip: 0x0001006a03e9 rfl: 0x00010293 cr2: 0x0001006fb000 Binary Images: 0x1 -0x10ff7 +org.python.python 3.2.1 (3.2.1) B2AFB510-C20A-61C8-C375-448C252C66A8 /Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python 0x13000 -0x100182ff7 +org.python.python 3.2.1, (c) 2004-2011 Python Software Foundation. (3.2.1) 9A9D8FC9-0EA2-8B57-D918-373F60ECF77A /Library/Frameworks/Python.framework/Versions/3.2/Python 0x1002fc000 -0x1002fcfff +_bisect.so ??? (???) 25A7A434-1970-9B41-5BFD-31B6F7AD6ECF /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_bisect.so 0x1005b -0x1005b1ff7 +_heapq.so ??? (???) 3E54D664-5279-8504-CA26-E23A15CF152D /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/_heapq.so 0x100682000 -0x1006b6fef +pyexpat.so ??? (???) F5A9710C-3B05-3BA8-66E1-5D34290441CA /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/lib-dynload/pyexpat.so 0x7fff5fc0 - 0x7fff5fc3bdef dyld 132.1 (???) B536F2F1-9DF1-3B6C-1C2C-9075EA219A06 /usr/lib/dyld 0x7fff8005d000 - 0x7fff801d4fe7 com.apple.CoreFoundation 6.6.5 (550.43) 31A1C118-AD96-0A11-8BDF-BD55B9940EDC /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff822f - 0x7fff824b1fef libSystem.B.dylib 125.2.11 (compatibility 1.0.0) 9AB4F1D1-89DC-0E8A-DC8E-A4FE4D69DB69 /usr/lib/libSystem.B.dylib 0x7fff82781000 - 0x7fff82792ff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) FB5EE53A-0534-0FFA-B2ED-486609433717 /usr/lib/libz.1.dylib 0x7fff8376d000 - 0x7fff837eafef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) 35ECA411-2C08-FD7D-11B1-1B7A04921A5C /usr/lib/libstdc++.6.dylib 0x7fff85577000 - 0x7fff8557bff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) 95718673-FEEE-B6ED-B127-BCDBDB60D4E5 /usr/lib/system/libmathCommon.A.dylib 0x7fff86259000 - 0x7fff86417fff libicucore.A.dylib 40.0.0 (compatibility 1.0.0) 4274FC73-A257-3A56-4293-5968F3428854 /usr/lib/libicucore.A.dylib 0x7fff86526000 - 0x7fff865dcff7 libobjc.A.dylib 227.0.0 (compatibility 1.0.0) 03140531-3B2D-1EBA-DA7F-E12CC8F63969 /usr/lib/libobjc.A.dylib 0x7fff8739a000 - 0x7fff873e6fff libauto.dylib ??? (???) F7221B46-DC4F-3153-CE61-7F52C8C293CF /usr/lib/libauto.dylib 0x7fe0 - 0x7fe01fff libSystem.B.dylib ??? (???)
[issue12855] linebreak sequences should be better documented
Matthew Boehm boehm.matt...@gmail.com added the comment: I've attached a patch for python2.7 that adds a small not to library/stdtypes.html#str.splitlines explaining which sequences are treated as line breaks: Note: Python recognizes \r, \n, and \r\n as line boundaries for strings. In addition to these, Unicode strings can have line boundaries of u\x0b, u\x0c, u\x85, u\u2028, and u\u2029 Additional thoughts: * Would it be better to put this note in a different place? * It looks like \x0b and \x0c (vertical tab and form feed) were first considered line breaks in Python 2.7, probably related to this note from What's New in 2.7: The Unicode database provided by the unicodedata module is now used internally to determine which characters are numeric, whitespace, or represent line breaks. It might be worth putting a changed in 2.7 note somewhere in the docs. Please let me know of any thoughts you have and I'll be glad to make any desired changes and submit a new patch. -- keywords: +patch title: open() and codecs.open() treat form-feed differently - linebreak sequences should be better documented Added file: http://bugs.python.org/file23069/linebreakdoc.py27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12855 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()
David H. Gutteridge dhgutteri...@sympatico.ca added the comment: Further details: - The original test case I'd submitted crashed on the development branch of NetBSD as well as Mac OS X Snow Leopard, but not the most recent stable branch of NetBSD. I've found a separate test case that crashes on both branches of NetBSD, but not OS X... This is quite possibly a separate bug, but the means of triggering it is directly related, so I'm including it here. - I also built Python 2.7.2 under Solaris to see if either test case resulted in a crash there, and they do not, so it seems this is BSDish somehow (or else, the Mac OS X and NetBSD crashes are two separate bugs). - With NetBSD, I also created tests in C that use the Expat library directly, submitting the very same test data, and they do not crash, they return the expected results, so it appears there's definitely something happening in Python somewhere that's causing this. This is the (non-debug) crash trace from the separate NetBSD test. (I will look at building a debug version of Python when I get a chance...) I'm running Python 2.6.7 on the NetBSD machines. #0 0xbb93ff64 in XML_ParserCreate () from /usr/X11R7/lib/libexpat.so.1 #1 0xbb9348a3 in XML_GetCurrentLineNumber () from /usr/X11R7/lib/libexpat.so.1 #2 0xbb956743 in set_error () from /usr/pkg/lib/python2.6/site-packages/pyexpat.so #3 0xbb956d21 in xmlparse_Parse () from /usr/pkg/lib/python2.6/site-packages/pyexpat.so #4 0xbbb048b0 in PyCFunction_Call () from /usr/pkg/lib/libpython2.6.so.1.0 #5 0xbbb5a3d7 in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.6.so.1.0 #6 0xbbb5add8 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.6.so.1.0 #7 0xbbb5914e in PyEval_EvalFrameEx () from /usr/pkg/lib/libpython2.6.so.1.0 #8 0xbbb5add8 in PyEval_EvalCodeEx () from /usr/pkg/lib/libpython2.6.so.1.0 #9 0xbbb5ae22 in PyEval_EvalCode () from /usr/pkg/lib/libpython2.6.so.1.0 #10 0xbbb72f12 in run_mod () from /usr/pkg/lib/libpython2.6.so.1.0 #11 0xbbb72fb5 in PyRun_FileExFlags () from /usr/pkg/lib/libpython2.6.so.1.0 #12 0xbbb745e4 in PyRun_SimpleFileExFlags () from /usr/pkg/lib/libpython2.6.so.1.0 #13 0xbbb74ce5 in PyRun_AnyFileExFlags () from /usr/pkg/lib/libpython2.6.so.1.0 #14 0xbbb80322 in Py_Main () from /usr/pkg/lib/libpython2.6.so.1.0 #15 0x080487e9 in main () -- versions: +Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23070/pyexpat_crash_isolation_nb.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12829 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12853] global name 'r' is not defined in upload.py
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12853 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12857] Expose called function on frame object
New submission from Eric Snow ericsnowcurren...@gmail.com: This patch adds f_func to PyFrameObject and sets it for functions that get called (in PyFrame_New). For classes and modules it is set to None. The difference in performance was not noticable, as far as I could tell. However, I am willing to do more than just time 'make test' a few times if there is any concern. A couple weeks ago a thread on python-ideas centered on the subject matter of PEP 3130[1]. The discussion started with, and mainly involved, the idea of adding __function__ to the frame locals during execution of the function. __function__ would point to the function that was called, which had resulted in the frame. I spent quite a bit of time getting this to work using a closure, but the result was overkill. It also made it too easy to use __function__ for recursion, which Guido did not like (and I agree). At this point it dawned on me that it would be much simpler to just add the called function to the frame object. This patch is the result. In the end it is much more efficient than the locals approach I had been taking. [1] http://mail.python.org/pipermail/python-ideas/2011-August/011062.html -- components: Interpreter Core files: called_function.diff keywords: patch messages: 143201 nosy: eric.snow priority: normal severity: normal status: open title: Expose called function on frame object type: feature request versions: Python 3.3 Added file: http://bugs.python.org/file23071/called_function.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12857 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com