[issue6715] xz compressor support
Changes by Nadeem Vawda nadeem.va...@gmail.com: Added file: http://bugs.python.org/file23158/95016f363e6c.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
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
Charles-François Natali neolo...@free.fr added the comment: I don't think that it's a problem to remove private functions. Alright. Is it mandatory to send a non-empty message (first argument for sendmsg, b'x' in your patch)? The original C function sends a random byte :-) Some implementation can return EINVAL if no data is sent (i.e. you can't send only ancillary data). multiprocessing_recvfd() contains cmsg_level=SOL_SOCKET and cmsg_type=SCM_RIGHTS, your Python function doesn't check cmsg_level or cmsg_type. Should it be checked? Yes, it should be checked, I'll update the patch. I don't know sendmsg/recvmsg API. Do they guarantee to send/receive all data? For data no, but ancillary data, yes. The only thing that could go wrong would be a buffer too short to hold the ancillary data, but: - the buffer size is computed with CMSG_DATA(), so it should be enough - if the ancillay data is truncated, struct.unpack will raise an exception -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ 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/file23159/3017ee1d548d.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
Changes by Nadeem Vawda nadeem.va...@gmail.com: Removed file: http://bugs.python.org/file23158/95016f363e6c.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
Changes by Nadeem Vawda nadeem.va...@gmail.com: Removed 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
Changes by Nadeem Vawda nadeem.va...@gmail.com: Removed file: http://bugs.python.org/file23129/fe2c9998f329.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: I've attached another patch that includes proper ReST documentation, a few more tests, and some fixups following Ezio and Amaury's reviews. -- stage: needs patch - patch review ___ 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
[issue12982] .pyo file cannot be imported
Eric O. LEBIGOT eric.lebi...@normalesup.org added the comment: Indeed. Thanks. I wish it had been in the documentation. :) This is yet another reason for me to check how I can submit patches to the doc. :) I also found out that renaming the .pyo file as .pyc makes Python happy upon import. That's the solution I chose, because I don't want users to have to type python -O when calling programs compiled with -O or -OO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12982] .pyo file cannot be imported
STINNER Victor victor.stin...@haypocalc.com added the comment: Indeed. Thanks. I wish it had been in the documentation. :) This is yet another reason for me to check how I can submit patches to the doc. :) Read http://docs.python.org/devguide/ to learn how to get the source of the documentation and how to write a patch. I also found out that renaming the .pyo file as .pyc makes Python happy upon import. That's the solution I chose, because I don't want users to have to type python -O when calling programs compiled with -O or -OO. Oh, I didn't know this trick, but yeah PYO and PYC are basically the same thing. The main difference is that PYO doesn't contain docstrings and doesn't contain set the current line to ... bytecode instructions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12982 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
STINNER Victor victor.stin...@haypocalc.com added the comment: - if the ancillay data is truncated, struct.unpack will raise an exception Well, the current C code doesn't check that the data is truncated and it works correctly, so I don't think that it would be different in Python. And yes, Python adds an extra check thanks to struct.unpack. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11149] [PATCH] Configure should enable -fwrapv for clang
Stefan Krah stefan-use...@bytereef.org added the comment: The buildbots are fine, though I think that in this instance Gentoo-Non-Debug-3.x is the only bot that actually exercises the new code path. So I tested manually on FreeBSD/clang-3.0 and I don't see anything surprising. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12985] Check signed arithmetic overflow in ./configure
New submission from Stefan Krah stefan-use...@bytereef.org: I'm not sure if this is a good idea: I wonder if it would be an option to check for overflow behavior at the bottom of ./configure and print a warning. The patch appears to work for gcc, clang and suncc. It would have caught the problem in #12973. The Intel compiler is the odd one here. Even with -O0 this particular overflow is undefined, but I can't remember seeing the specific test failures from #12973. So the drawback is that the patch might give false positives. $ cat overflow_is_defined.c #include limits.h int overflow_is_defined(int x) { if (x + 1000 x) return 0; return 1; } int main() { return overflow_is_defined(INT_MAX); } gcc-4.4.3 = $ gcc -Wall -W -O0 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined $ gcc -Wall -W -O2 -o overflow_is_defined overflow_is_defined.c overflow_is_defined.c: In function ‘overflow_is_defined’: overflow_is_defined.c:3: warning: assuming signed overflow does not occur when assuming that (X + c) X is always false $ ./overflow_is_defined || echo undefined undefined $ gcc -Wall -W -O2 -fwrapv -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined $ clang-3.0 = $ clang -Wall -W -O0 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined $ clang -Wall -W -O2 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined undefined $ clang -Wall -W -fwrapv -O2 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined $ suncc-12.2 == $ suncc -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined $ suncc -O2 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined $ icc-12.0.0 == $ icc -Wall -O0 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined undefined $ icc -Wall -O2 -o overflow_is_defined overflow_is_defined.c $ ./overflow_is_defined || echo undefined undefined $ -- files: configure_catch_overflow.diff keywords: patch messages: 144071 nosy: skrah priority: normal severity: normal stage: patch review status: open title: Check signed arithmetic overflow in ./configure type: feature request Added file: http://bugs.python.org/file23160/configure_catch_overflow.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12985] Check signed arithmetic overflow in ./configure
Changes by Stefan Krah stefan-use...@bytereef.org: -- versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12985] Check signed arithmetic overflow in ./configure
Mark Dickinson dicki...@gmail.com added the comment: I don't see how this is helpful---all it's reporting on is whether that compiler happened to decide to optimize away that particular comparison; something which is going to be highly dependent on compiler version, flags, platform, etc., and still doesn't tell us anything about whether that compiler guarantees to wrap all signed integer overflows. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12985] Check signed arithmetic overflow in ./configure
Mark Dickinson dicki...@gmail.com added the comment: BTW, I suspect that the reason there were no related test failures with the Intel compiler is that most of the problems in the Python code stem from multiplications rather than additions. Probably icc isn't sophisticated enough to optimize those multiplication + division checks away. Seems like we should probably be looking for an icc flag that forces wrapping on signed integer overflow. In the long run, it would still be good to eliminate the need for fwrapv and the like; it can have a significant performance hit (in theory; haven't done any timings recently). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1170] shlex have problems with parsing unicode
Andrew Jewett jewett@gmail.com added the comment: Proposed solution and patch to follow. Please let me know if I am posting it in the wrong place. The main problem with shlex is that the shlex interface is inadequate to handle unicode. Specifically it is no longer feasible to provide a list of every possible character that the user could want to appear within a token. Suppose the user wants the ability to parse words in simplified Chinese. If I understand correctly, then currently, they would have to set self.wordchars to a string (or some other container) of 6000 (unicode) characters, and this enormous string would need to be searched each time a new character is read. This was a problem with shlex from the beginning, but it became more acute when support for unicode was added. Generally, in some cases, it is much more convenient instead to specify a short list of characters you -don't- want to appear in a word (word delimiters), than to list all the characters you do. An obvious (although perhaps not optimal) solution is to add an additional data member to shlex, consisting of the characters which terminate the reading of a token. (In other words, the set-inverse of wordchars.) In the attached example code, I call it self.wordterminators. To remain backwards-compatible with shlex, self.wordterminators is empty by default. But if not-empty, self.wordterminators overrides self.wordchars. I've been distributing a customized version of shlex with my own software which implements this modest change (shlex_wt). (See attachment.) It is otherwise identical to the version of shlex.py that ships with python 3.2.2. (It has been further modified only slightly to be compatible with both python 2.7 and python 3.) It's not beautiful code, but it seems to be a successful kluge for this particular issue. I don't know if it makes a worthy patch, but perhaps somebody out there finds it useful. To make it easy to spot the changes, each of the lines I changed ends in a comment #WORDTERMINATORS. (There are only 15 of these lines.) -Andrew Jewett -- nosy: +wombat versions: -Python 2.7 Added file: http://bugs.python.org/file23161/shlex_wt.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11610] Improved support for abstract base classes with descriptors
Darren Dale dsdal...@gmail.com added the comment: Any additional comments? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11610 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1170] shlex have problems with parsing unicode
Andrew Jewett jewett@gmail.com added the comment: Not to get side-tracked, but on a related note, it would be nice if there was a python module which defined sets of unicode characters corresponding to different categories (similar to the categories listed here: http://www.fileformat.info/info/unicode/category/index.htm) That way, for example, if the user wants to categorically ignore ALL mathematical symbols or punctuation marks, they could assign: self.wordterminators = unicode_math + unicode_punctuation. (The + means set union.) If somebody tried to specify all of them manually, this would be painful. There are hundreds of punctuation symbols in unicode, for example. (I suppose most of the time, one does not need to be so thorough. This feature not really necessary for getting shlex to work. But I think this would be a easy feature to add.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1170] shlex have problems with parsing unicode
Ezio Melotti ezio.melo...@gmail.com added the comment: That can be done programmatically using the unicodedata module. The regex module (that will hopefully be include in 3.3) is also able to match characters that belongs to specific categories. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12820] Tests for Lib/xml/dom/minicompat.py
John Chandler therealmetal...@gmail.com added the comment: Just to let you know I haven't forgotten this! I've been pretty busy recently so might be a while before I implement the changes to the patch suggested in the code review. John -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12983] byte string literals with invalid hex escape codes raise ValueError instead of SyntaxError
Changes by Evgeny Kapun abacabadabac...@gmail.com: -- nosy: +abacabadabacaba ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12983 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug
Changes by Evgeny Kapun abacabadabac...@gmail.com: -- nosy: +abacabadabacaba ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12729 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12967] AttributeError distutils\log.py
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23147/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12967 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10968] threading.Timer should be a class so that it can be derived
Éric Araujo mer...@netwok.org added the comment: Victor: Yes, I know the doc needs an update, that’s why I posted a patch six weeks ago and asked for a review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10968 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12960] threading.Condition is not a class
Changes by Éric Araujo mer...@netwok.org: -- versions: -Python 2.6, Python 3.1, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12960 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1170] shlex have problems with parsing unicode
Éric Araujo mer...@netwok.org added the comment: Andrew: Thanks for your contribution, but your patch cannot go into 2.7, as we don’t add new features in stable versions (re-read the whole thread if you need more info). This report is still open because we need a doc patch to explain how to work around that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12967] AttributeError distutils\log.py
Éric Araujo mer...@netwok.org added the comment: when installing the distribute package How? Please tell exactly what command you ran with what Python version. it could be raised on any other usage as sys.stdout does not have an 'error' attribute. It does, in 3.x. Do you think Python has no tests or no users? :) -- assignee: tarek - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12967 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10968] threading.Timer should be a class so that it can be derived
STINNER Victor victor.stin...@haypocalc.com added the comment: that’s why I posted a patch six weeks ago and asked for a review Oh ok, cool, I missed the patches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10968 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12976] select module: only use EVFILT_TIMER if available (kqueue backend)
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12976 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5689] Support xz compression in tarfile module
Changes by Éric Araujo mer...@netwok.org: -- components: +Library (Lib) -Extension Modules nosy: +nadeem.vawda title: please support lzma compression as an extension and in the tarfile module - Support xz compression in tarfile module versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Éric Araujo mer...@netwok.org added the comment: I’ve just found another problem with MANIFEST files created in Windows: they use CRLF. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5689] Support xz compression in tarfile module
Lars Gustäbel l...@gustaebel.de added the comment: Attached is a patch with the current state of my work on lzma integration into tarfile (17 test errors). -- assignee: - lars.gustaebel keywords: +patch Added file: http://bugs.python.org/file23162/2011-09-15-tarfile-lzma.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6715] xz compressor support
Lars Gustäbel l...@gustaebel.de added the comment: Today I played around with lzma support for tarfile based on your last patch (see issue5689). There are a few minor issues that I just wanted to mention, as they break the tarfile testsuite: - LZMAFile does not expose a name attribute. BZ2File doesn't either (not in 3.x anyway), but GzipFile does. - LZMAFile does not allow a 'b' in the mode argument, unlike GzipFile and BZ2File. - The bz2 module exposes many error conditions as standard Python exceptions, e.g. IOError, EOFError. The lzma module uses LZMAError for all errors without distinction. -- ___ 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
[issue12785] list_distinfo_file is wrong
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c6d52971dd2a by Éric Araujo in branch 'default': Fix packaging.database.Distribution.list_distinfo_files (#12785). http://hg.python.org/cpython/rev/c6d52971dd2a -- nosy: +python-dev ___ 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
[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable
New submission from Matt Chaput m...@whoosh.ca: Currently the 'uuid' module uses os.urandom (in the absence of a system UUID generation function) to generate random UUIDs in the uuid.uudi4() function. This patch changes the implementation of uuid4() to use random.getrandbits() as the source of randomness instead, for the following reasons: * In my quick tests, using getrandbits() is much faster on Windows and Linux. Some applications do need to generate UUIDs quickly. setup = import uuid, os, random ur = uuid.UUID(bytes=os.urandom(16), version=4) grb = uuid.UUID(int=random.getrandbits(128), version=4) # Windows timeit.Timer(ur, setup).timeit() 22.861042160383903 timeit.Timer(grb, setup).timeit() 3.8689128309085135 # Linux timeit.Timer(ur, setup).timeit() 29.32686185836792 timeit.Timer(grb, setup).timeit() 3.7429409027099609 * The patched code is cleaner. It avoids the try...finally required by the possibly unavailable os.urandom function, and the fallback to generating random bytes. -- components: Library (Lib) files: fastuuid4.patch keywords: patch messages: 144087 nosy: mattchaput priority: normal severity: normal status: open title: Using getrandbits() in uuid.uuid4() is faster and more readable type: performance Added file: http://bugs.python.org/file23163/fastuuid4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12987] Demo/scripts/newslist.py has non-commercial license clause
New submission from jan matejek jmate...@suse.cz: from Demo/scripts/newslist.py : # Feel free to copy, distribute and modify this code for # non-commercial use. If you make any useful modifications, let me # know! # # (c) Quentin Stafford-Fraser 1994 # fra...@europarc.xerox.com qs...@cl.cam.ac.uk this is not very nice for commercial distros - we have to drop the file (for now anyway) i'm not sure what the right solution for upstream is - you might want to remove the file, ask Quentin to relicense it, or just acknowledge its existence and keep it -- components: Demos and Tools messages: 144088 nosy: matejcik priority: normal severity: normal status: open title: Demo/scripts/newslist.py has non-commercial license clause versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12987 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12986] Using getrandbits() in uuid.uuid4() is faster and more readable
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file23164/listobject_overflow.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file23165/itertools_overflow.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Stefan Krah stefan-use...@bytereef.org added the comment: With issue12975.diff, listobject_overflow.diff and itertools_overflow.diff I don't get any more failures. Also, of course issue12975.diff looks correct to me if we assume: http://mail.python.org/pipermail/python-dev/2009-December/094392.html http://yarchive.net/comp/linux/signed_unsigned_casts.html Mark, did you write those rules down somewhere? I had to think a bit about the unsigned - signed casts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12985] Check signed arithmetic overflow in ./configure
Stefan Krah stefan-use...@bytereef.org added the comment: My rationale was something like this: If a compiler optimizes away signed arithmetic overflow, this particular comparison will most likely be in the set of optimizations, since it seems like low hanging fruit. Of course it doesn't guarantee wrapping behavior in general. BTW, I suspect that the reason there were no related test failures with the Intel compiler is that most of the problems in the Python code stem from multiplications rather than additions. Probably icc isn't sophisticated enough to optimize those multiplication + division checks away. Yes, I think that's it. Seems like we should probably be looking for an icc flag that forces wrapping on signed integer overflow. I didn't find any in the man page or search engines. In the long run, it would still be good to eliminate the need for fwrapv and the like; it can have a significant performance hit. I agree, but it's progressing quite slowly. ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12985 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
Changes by Charles-François Natali neolo...@free.fr: Added file: http://bugs.python.org/file23166/multiprocessing_fd-1.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file23156/multiprocessing_fd.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced
Jakob Malm jakob.m...@gmail.com added the comment: Patch without reflow attached. This is my first patch to CPython. I considered submitting the patch without reflowing the paragraph, to make the changes clearer, but I thought that that would mean more work for the committer, if the patch were to be accepted. Are non-reflown paragraphs like this generally preferred, then? Concerning timezone aware objects in the examples, this may make the examples more verbose and less to-the-point, which may not be desirable. I'm still on Python 2.6 and haven't actually used the new timezone class yet... -- Added file: http://bugs.python.org/file23167/datetime_doc_noreflow.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Mark Dickinson dicki...@gmail.com added the comment: Gah; did I really misnumber that issue patch? Sorry. Mark, did you write those rules down somewhere? Well, they're all in the standard, which is publicly available. (Or at least, a draft of the standard that's pretty much interchangeable with the real thing is publicly available; Google for n1256.pdf, or see hyperlink [1] below.) The correctness of the patch depends on: (1) the 'usual arithmetic conversions', C99 6.3.1.8, paragraph 1. This implies that the other (uncast) long argument will be converted to unsigned long before the operation is performed. This part is safe. When reading the rules, note that the 'long' and 'unsigned long' types have the same rank. (C99 6.3.1.1, 4th listed point.) (2) an assumption that the C implementation will never raise an 'implementation-defined' signal (C99 6.3.1.3p3). This seems reasonable: I'm fairly sure that this provision is there mainly for systems using ones' complement or sign-magnitude representations for signed integers, and it's safe to assume that Python won't meet such systems. (3) an assumption that integer division for negative arguments follows C99 semantics, namely that the quotient is rounded towards zero. C99 requires this (C99 6.5.5p6); the older 1989 standard allows quotients to be truncated either towards zero (like C99), or towards -infinity (like Python does). In the presence of rounding towards -infinity, the style of overflow check used in int_pow can fail. Even on C89 systems, truncation is much more common than flooring for this, so I think we're safe again here: I don't know of any existing compilers with issues; new/future compilers are likely to follow the C99 standard here. [1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Mark Dickinson dicki...@gmail.com added the comment: an assumption that the C implementation will never raise an 'implementation-defined' signal (C99 6.3.1.3p3). Sorry, this should have been more explicit: will never raise ... when converting long to unsigned long -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: -There are two kinds of date and time objects: naive and aware. This +Date and time objects are either naive or aware. This Shouldn't we say datetime and time instead of date and time? There is no tzinfo attribute in date objects. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Mark Dickinson dicki...@gmail.com added the comment: Those two patches (for listobject and itertools) look fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced
Jakob Malm jakob.m...@gmail.com added the comment: Shouldn't we say datetime and time instead of date and time? There is no tzinfo attribute in date objects. Perhaps like this? :class:`datetime` and :class:`time` objects are... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1170] shlex have problems with parsing unicode
Andrew Jewett jewett@gmail.com added the comment: That can be done programmatically using the unicodedata module. The regex module (that will hopefully be include in 3.3) is also able to match characters that belongs to specific categories. Ezio: Thanks. (New to me, actually) Is this what you mean?: http://www.regular-expressions.info/unicode.html For the purposes of patching shlex, should we use regex instead of sets of characters (or strings) to test for membership in shlex.wordterminators? (Or should we create a different class member? Unfortunately, I guess shlex.wordchars has to be left as some kind of container object to maintain backwards compatibility.) Something like that would definitely solve the problem nicely. Andrew: Thanks for your contribution, but your patch cannot go into 2.7, as we don’t add new features in stable versions Eric: That's fine. I just posted here because this page currently gets the top hit when searching for shlex unicode. If you think it's appropriate to repost my message for python version 3.4, let me know. The issue with shlex.wordchars that I raised is valid for any version of python. I'm not sure my solution is optimal. (I like the regex idea). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12973] int_pow() implementation is incorrect
Stefan Krah stefan-use...@bytereef.org added the comment: Mark Dickinson rep...@bugs.python.org wrote: Well, they're all in the standard, which is publicly available. I have the real thing. :) The correctness of the patch depends on: (2) an assumption that the C implementation will never raise an 'implementation-defined' signal (C99 6.3.1.3p3). This seems reasonable: I'm fairly sure that this provision is there mainly for systems using ones' complement or sign-magnitude representations for signed integers, and it's safe to assume that Python won't meet such systems. This is what I was concerned about, but the assumption seems safe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced
anatoly techtonik techto...@gmail.com added the comment: On Thu, Sep 15, 2011 at 10:42 PM, Alexander Belopolsky rep...@bugs.python.org wrote: Shouldn't we say datetime and time instead of date and time? There is no tzinfo attribute in date objects. Does that mean that if aware `datetime` is converted to `date` and then back, the tzinfo information is lost and object implicitly becomes naive? In this case it should mentioned IMO. -- anatoly t. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch looks correct. Did you try it on Linux, FreeBSD and/or Windows? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: On Thu, Sep 15, 2011 at 4:17 PM, anatoly techtonik rep...@bugs.python.org wrote: .. Does that mean that if aware `datetime` is converted to `date` and then back, the tzinfo information is lost and object implicitly becomes naive? Yes, but one cannot convert back from date to datetime. To get a datetime object, one needs to combine date and time and tzinfo is attached to the time component. In this case it should mentioned IMO. I agree. The following is not really intuitive: - None In order to preserve tzinfo, one has to preserve it when extracting the time component: - datetime.timezone.utc -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
Charles-François Natali neolo...@free.fr added the comment: I only tried on Linux. By the way, what's the simplest way to create a personal clone to test patches on some of the buildbots before committing them? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12981] rewrite multiprocessing (senfd|recvfd) in Python
STINNER Victor victor.stin...@haypocalc.com added the comment: - Click on Server-side clone on http://hg.python.org/cpython - on your computer, hg clone default myclone # default if your local clone of cpython, default branch - cd myclone; edit code; hg ci - edit .hg/hgrc to update the repository URL - hg push - force a build on custom buildbots of your choice -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12981 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12935] Typo in findertools.py
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b5f4c4085ae6 by Ned Deily in branch '2.7': Issue #12935: Correct typo in findertools. http://hg.python.org/cpython/rev/b5f4c4085ae6 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12935] Typo in findertools.py
Ned Deily n...@acm.org added the comment: Thanks for the report. Fixed, although findertools is woefully obsolete and no longer exists in Python 3. For working with the Finder in current OS X releases, use appscript instead (http://pypi.python.org/pypi/appscript/). -- assignee: ronaldoussoren - ned.deily nosy: +ned.deily resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12988] IDLE on Win7 crashes when saving to Documents Library
New submission from Brian Gernhardt bcg2...@rit.edu: Python 3.2.1 (default, Jul 10 2011, 20:02:51) [MSC v.1500 64 bit (AMD64)] on win32 Steps: 1) Start IDLE 2) Open Save dialog (File Save or Ctrl-S) 3) Select Libraries from the buttons on the left or the dropdown on top. 4) Double-click on Documents 5) Enter any file name (test.txt) 6) Hit enter or click save 7) See pythonw.exe has stopped working dialog I tried running it from the command line (via c:\python32\python -m idlelib.idle) and it produced no useful error messages. -- components: IDLE messages: 144106 nosy: Brian.Gernhardt priority: normal severity: normal status: open title: IDLE on Win7 crashes when saving to Documents Library versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12988 ___ ___ 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/file23168/591277fe6b4a.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
Changes by Nadeem Vawda nadeem.va...@gmail.com: Removed file: http://bugs.python.org/file23159/3017ee1d548d.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: Thanks for getting the ball rolling with that. I'll want to try and familiarize myself with the code for tarfile module before I start changing stuff, but those points shouldn't be hard to fix, one way or the other. -- ___ 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
[issue12765] test_packaging failure under Snow Leopard
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d3e072083ff3 by Ned Deily in branch 'default': Issue #12765: Fix packaging.test.test_database failures on OS X due http://hg.python.org/cpython/rev/d3e072083ff3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12765 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12765] test_packaging failure under Snow Leopard
Ned Deily n...@acm.org added the comment: The database test failures were due to the fact that, on OS X, the tempdir was created in /var which on OS X is actually a symlink to /private/var so the tests for path inclusion which used startswith were failing. I added a call to os.path.realpath to normalize fake_dists_path to the actual full path. (/etc and /tmp on OS X are also symlinked to /private, BTW). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12765 ___ ___ 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)
Matt Chaput m...@whoosh.ca added the comment: Not sure if this is better as a separate feature request or a comment here, but... the new version of .NET includes an option to specify a time limit on evaluation of regexes (not sure if this is a feature in other regex libs). This would be useful especially when you're executing regexes configured by the user and you don't know if/when they might go exponential. Something like this maybe: # Raises an re.Timeout if not complete within 60 seconds match = myregex.match(mystring, maxseconds=60.0) -- nosy: +mattchaput ___ 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
[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
Changes by John Reese jre...@leetcode.net: -- nosy: -jreese ___ 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
[issue12537] mailbox's _become_message is very fragile
David Lam d...@dlam.me added the comment: Hm, it seems right now that the only time that happens is when creating a message based on an mbox message. The 'status' and 'x-status' attributes are deleted. Any hints on what I could to do figure out what special attributes should be deleted? I was thinking I might try to find and go through the mailbox specs, and find out what headers are mandatory for each of them. I think I see some hints on... http://docs.python.org/library/mailbox.html#mailbox.mboxMessage. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12537 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7201] double Endian problem and more on arm
Meador Inge mead...@gmail.com added the comment: I think Mark's original pointer to issue1762561 was right on. The last two cases are failing due to the mixed-endian format (mentioned in that issue) used in OABI. You can see this in the output of 'test_endian_double': '182D4454FB210940' != 'FB210940182D4454' Note that the values are the same except the two 32-bit words are swapped. Similarly, in 'test_unaligned_native_struct_fields': '123412007856341200B81E09401F85EB51' != '1234120078563412001F85EB51B81E0940' The first 8 bytes in each case are the same. The last 8 bytes of each (which represent floating-point doubles) are the same except, again, the words are swapped. I am going to close this out as won't fix. As mentioned in issue1762561, supporting OABI will involve taking on another host platform. EABI is surely more predominant these days anyway. -- resolution: - wont fix stage: - committed/rejected type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7201 ___ ___ 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
Changes by Brian Curtin br...@python.org: -- keywords: +needs review stage: - patch review type: - security versions: -Python 3.4 ___ 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