[issue16750] Python Code module implements uncomputable function

2012-12-21 Thread pleed
New submission from pleed: The "code" class implements the __eq__ operator which is known to be uncomputable. -- messages: 177923 nosy: pleed priority: normal severity: normal status: open title: Python Code module implements uncomputable function type: behavior versions: Python 2.7 __

[issue16689] stdout stderr redirection mess

2012-12-21 Thread anatoly techtonik
anatoly techtonik added the comment: I don't know. I don't write C. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-21 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue16749] Fatal Python Error

2012-12-21 Thread Leonardo DaVinci
Leonardo DaVinci added the comment: Hi David, I keep trying to unsuccessfully. Here's the problem details Problem signature: Problem Event Name: APPCRASH Application Name: python.exe Application Version: 0.0.0.0 Application Timestamp: 4f84a6c8 Fault Module Name: python27.dll Fault

[issue16712] collections.abc.Sequence should not provide __reversed__

2012-12-21 Thread INADA Naoki
INADA Naoki added the comment: I believe that using Sequence ABC as mix-in is recommended when implementing custom sequence. But mixing-in it violates "should only provide __reversed__() if they can provide an implementation that is more efficient than the one provided by reversed()." Defini

[issue16749] Fatal Python Error

2012-12-21 Thread Leonardo DaVinci
Leonardo DaVinci added the comment: Ok thanks for the quick reply. I'll check with them. Regards Ciro On Fri, Dec 21, 2012 at 9:09 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Given the error message, my guess would be that there is a bug in the > Solidoodle Python ext

[issue16749] Fatal Python Error

2012-12-21 Thread R. David Murray
R. David Murray added the comment: Given the error message, my guess would be that there is a bug in the Solidoodle Python extension module. That is, it is unlikely to be a bug in Python. -- nosy: +r.david.murray ___ Python tracker

[issue16743] mmap accepts files > 1 GB, but processes only 1 GB

2012-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: The immediate fix is to use a 64 bit build. That aside, what change in behavior are you suggesting? (and for 32 bit builds only?) Should mmap.mmap warn if the file is longer that would be supported? This could be added to all current versions. Should it raise

[issue16741] `int()`, `float()`, etc think python strings are null-terminated

2012-12-21 Thread Matthew Barnett
Matthew Barnett added the comment: Python takes a long way round when converting strings to int. It does the following (I'll be talking about Python 3.3 here): 1. In function 'fix_decimal_and_space_to_ascii', the different kinds of spaces are converted to " " and the different kinds of digits

[issue16741] `int()`, `float()`, etc think python strings are null-terminated

2012-12-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.6, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue16712] collections.abc.Sequence should not provide __reversed__

2012-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I would expect that the default method of reversed() and collections.abc.Sequence.__reverse__ are more or less the same. If so, this should be closed as invalid. But I want to hear from the abc experts. -- nosy: +rhettinger, stutzbach, terry.reedy vers

[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-21 Thread Zachary Ware
New submission from Zachary Ware: As pointed out by Éric Araujo in msg177908 of issue16694, tests using the idiom presented in PEP 399 are subject to breakage of test discovery. This issue's goal is to root out and fix all usages of this idiom. So far, only test_heapq is known to be affected.

[issue16709] unittest discover order is filesystem specific - hard to reproduce

2012-12-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.1, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue16689] stdout stderr redirection mess

2012-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Is that really the simplest example that will exhibit the cited behavior? Why do you think this is a Python issue rather than a Windows issue? What happens, for instance, with a C program than alternately outputs to stdout and stderr? -- nosy: +terry.

[issue16686] audioop overflow issues

2012-12-21 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue16747] Remove 'file' type reference from 'iterable' glossary entry

2012-12-21 Thread Zachary Ware
New submission from Zachary Ware: Here's a patch that changes the reference to :class:`file` in the iterable entry in Doc/glossary.rst to :term:`file objects `, along with minor grammatical fixes to make it fit, and reflowing of the text. -- assignee: docs@python components: Documentat

[issue16694] Add pure Python operator module

2012-12-21 Thread Zachary Ware
Zachary Ware added the comment: Did not know that about test discovery, thank you Éric. Fixed in v6. A few other test modules may need the same fix; I based my changes to Lib/test/test_operator.py on Lib/test/test_heapq.py which has the same issue. I'll open a new report for it and any other

[issue16684] Unicode property value abbreviated names and long names

2012-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: This seems like a plausible request to me. The three dicts comprise 70 code-alias pairs. If unicodedata had a Python version (should it?), the simplest thing would be to add bididict, eawdist, and gcdict to that version (and not to the C version). I don't know

[issue16694] Add pure Python operator module

2012-12-21 Thread Éric Araujo
Éric Araujo added the comment: The base test class should not inherit from TestCase: it will be picked up by test discovery and then will break, as self.module will be None. Typical usage: class OperatorTestsMixin: module = None class COperatorTests(OperatorTestsMixin, unittest.TestCase):

[issue16694] Add pure Python operator module

2012-12-21 Thread Éric Araujo
Éric Araujo added the comment: FYI Mercurial can use the extended diff format invented by git, which supports renames, changes to file permissions, etc. -- ___ Python tracker __

[issue16682] Document that audioop works with bytes, not strings

2012-12-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: Patch looks good to me, all three occurrences of 'string' are fixed. -- nosy: +terry.reedy stage: patch review -> commit review ___ Python tracker _

[issue16746] clarify what should be sent to peps@

2012-12-21 Thread R. David Murray
R. David Murray added the comment: The editors do more than your sentence suggests. They also (sometimes) edit peps, (sometimes) provide advice about preparing one, and commit and update peps when the author(s) do not have commit access. The distinction in the types of email that PEP 1 is att

[issue16746] clarify what should be sent to peps@

2012-12-21 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon nosy: +brett.cannon priority: normal -> low stage: -> patch review ___ Python tracker ___ ___

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 24f6c6f3b7bf by Stefan Krah in branch '3.3': Issue #16745: Hide a couple of symbols by making them local. http://hg.python.org/cpython/rev/24f6c6f3b7bf -- nosy: +python-dev ___ Python tracker

[issue14373] C implementation of functools.lru_cache

2012-12-21 Thread Alexey Kachayev
Alexey Kachayev added the comment: Added additional Py_DECREF(s) for key and value. -- Added file: http://bugs.python.org/file28390/14373.v4.diff ___ Python tracker ___ _

[issue16694] Add pure Python operator module

2012-12-21 Thread Zachary Ware
Zachary Ware added the comment: Nits are no fun; thank you for picking them, Serhiy ;) -- ___ Python tracker ___ ___ Python-bugs-list

[issue16694] Add pure Python operator module

2012-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: One comment to a committer. Don't forget to run `hg rename Modules/operator.c Modules/_operator.c` before applying the patch. -- ___ Python tracker _

[issue16496] Simplify and optimize random_seed()

2012-12-21 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue16496] Simplify and optimize random_seed()

2012-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset db75553ff333 by Mark Dickinson in branch 'default': Simplify random_seed to use _PyLong_AsByteArray. Closes issue #16496. http://hg.python.org/cpython/rev/db75553ff333 -- nosy: +python-dev ___ Python tra

[issue16694] Add pure Python operator module

2012-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good work, Zachary. I have no more nitpicks for you. ;) LGTM. -- stage: patch review -> commit review ___ Python tracker ___

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm involved in both issues and I think it's good to have so much simple Python implementations as possible and to have C accelerators for any performance critical code. -- ___ Python tracker

[issue16743] mmap accepts files > 1 GB, but processes only 1 GB

2012-12-21 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib), Windows -None nosy: +brian.curtin, tim.golden versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___

[issue16746] clarify what should be sent to peps@

2012-12-21 Thread Chris Jerdonek
Changes by Chris Jerdonek : -- keywords: +patch Added file: http://bugs.python.org/file28389/issue-16746-1.patch ___ Python tracker ___ __

[issue16746] clarify what should be sent to peps@

2012-12-21 Thread Chris Jerdonek
New submission from Chris Jerdonek: Currently, PEP 1 can be read to mean that should be CC'ed on all e-mails related to PEPs. However, this isn't the intent because, for example, it is okay to have discussions about PEPs on python-dev or python-ideas without involving . I'm attaching a patc

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Meador Inge
Meador Inge added the comment: Ah, I missed how big of a line range these pragmas are covering when I scanned the patch before. In that case, I agree with the current patch. -- ___ Python tracker

[issue16694] Add pure Python operator module

2012-12-21 Thread Zachary Ware
Zachary Ware added the comment: Here's another new version. Changes include: - Address Serhiy's Rietveld comments - Fix length_hint() the way it was meant to be fixed last time. - Remove __getitem__ check on 'b' in concat and iconcat. More notes on this below. - Fix methodcaller as Serhiy sug

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Stefan Krah
Stefan Krah added the comment: Meador Inge wrote: > Personally I prefer using attributes instead of pragmas. The GCC manual > recommends such as well. I followed www.akkadia.org/drepper/dsohowto.pdf . Drepper seems to be fine with the use of pragmas in internal headers. > There are also othe

[issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS

2012-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops. int.from_bytes doesn't exist in Python 2.7. -- Added file: http://bugs.python.org/file28387/pyc_mtime4.patch ___ Python tracker ___ ___

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-21 Thread Philip Jenvey
Philip Jenvey added the comment: The guidelines for this are in PEP 399. Basically, adding 'accelerated' implementations when necessary isn't a bad thing as long as there are pure Python equivalents (unless it's a special case) and both are tested. issue14373's latest patch seems to be followi

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-21 Thread Meador Inge
Meador Inge added the comment: I noticed functools in the list. issue14373 was opened somewhat recently to reimplement functools.lru_cache in C. This issue seems to be promoting have more things implemented in pure Python. Someone involved in this issue might want to weigh in on issue14373

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Meador Inge
Meador Inge added the comment: Personally I prefer using attributes instead of pragmas. The GCC manual recommends such as well. There are also other sources in Modules/* that use '__attribute__ ((visibility ("hidden")))'. Namely ctypes and zlib. I can understand that it is more work, but I

[issue14373] C implementation of functools.lru_cache

2012-12-21 Thread Alexey Kachayev
Alexey Kachayev added the comment: Fixed my previous patch according to all comments from review, except removing keyword arguments from lru_cache_new function. -- Added file: http://bugs.python.org/file28386/14373.v3.diff ___ Python tracker

[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-21 Thread Vinay Sajip
Vinay Sajip added the comment: > FTR, distutils only recommends and supports running “python setup.py”, i.e. > relative path in the script’s directory. Right, but this behaviour is seen even when the script is in the current directory. -- ___ Pytho

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-21 Thread Éric Araujo
Éric Araujo added the comment: Oops, sorry I slipped :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue16694] Add pure Python operator module

2012-12-21 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Stefan Krah
Stefan Krah added the comment: Adding everyone from issue #4555, in case you can think of a different (portable) solution for hiding symbols (with minimal effort). -- nosy: +christian.heimes, dmalcolm, doko, lemburg, loewis, pitrou ___ Python tracker

[issue16731] xxlimited/xxmodule docstrings ambiguous

2012-12-21 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue16713] "tel" URIs should support params

2012-12-21 Thread Éric Araujo
Éric Araujo added the comment: It’s easy sure, but I think it’s still a bug :) -- nosy: +eric.araujo ___ Python tracker ___ ___ Python

[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-21 Thread Éric Araujo
Éric Araujo added the comment: FTR, distutils only recommends and supports running “python setup.py”, i.e. relative path in the script’s directory. -- nosy: +eric.araujo ___ Python tracker

[issue16745] Hide symbols in _decimal.so

2012-12-21 Thread Stefan Krah
New submission from Stefan Krah: This issue is for the _decimal specific parts from #4555. The patch depends on _Pragma (C99) and gcc >= 4.0 for the contents of the pragma. I think it will work for clang, too. Should the libmpdec API symbols (i.e. the ones starting with mpd_*) be hidden for _dec

[issue16744] sys.path.append causes wrong behaviour

2012-12-21 Thread Christian Heimes
Christian Heimes added the comment: You have to either quote the backslashes or use raw strings: >>> "\a" '\x07' >>> "\\a" '\\a' >>> r"\a" '\\a' -- nosy: +christian.heimes resolution: -> invalid status: open -> closed ___ Python tracker

[issue16744] sys.path.append causes wrong behaviour

2012-12-21 Thread rappy
New submission from rappy: In bug.py print gives ['C:\\Users\\Glenn\\Desktop', 'C:\\Windows\\system32\\python27.zip', C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Users\\Glenn\\D

[issue16731] xxlimited/xxmodule docstrings ambiguous

2012-12-21 Thread Daniel Shahaf
Daniel Shahaf added the comment: Re the review, yes there is a typo in the comment: the comment in xxlimited.c should say "xxmodule.c" rather than "xxlimited.c". (Got a traceback from the review app) -- ___ Python tracker

[issue16743] mmap accepts files > 1 GB, but processes only 1 GB

2012-12-21 Thread Marc Schlaich
New submission from Marc Schlaich: Platform: Windows 7 64 bit Interpreter: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit Intel)] on win32 Here are the steps to reproduce: 1. Create a big file (5 GB): with open('big', 'wb') as fobj: for _ in xrange(1024 * 1024 * 5):

[issue16728] Missing cross-reference in sequence glossary entry

2012-12-21 Thread INADA Naoki
INADA Naoki added the comment: And nice symmetry with mapping entry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue16728] Missing cross-reference in sequence glossary entry

2012-12-21 Thread INADA Naoki
INADA Naoki added the comment: So, I feel the 2nd meaning of "sequence" should be collections.abc.(Mutable)Sequence. "sequence types in stdlib" have richer API then the ABC. (e.g. comparison, +, *, etc...) They are "APIs that sequence may have" but not "APIs makes the type sequence."

[issue16365] IDLE for Windows 8

2012-12-21 Thread amundell
amundell added the comment: I had a similar issue in Win8, but occured after installing another program. My issue was related to the TCL_Library environment variable. If it is related to this error it can be confirmed by opening the command prompt, changing dir to cd c:\python33\ and typing py

[issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib}

2012-12-21 Thread Matthias Klose
Matthias Klose added the comment: fixed in experimental, pyvenv's are now handled the same way as python-virtualenvs. closing the issue here. -- resolution: -> works for me status: open -> closed ___ Python tracker

[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2012-12-21 Thread Trent Nelson
New submission from Trent Nelson: Relevant thread: http://mail.python.org/pipermail/python-dev/2012-December/123225.html PyOS_StdioReadline features numerous calls that require the GIL to be held. Ideally, the GIL drop-take should be moved closer to the actual underlying read system call. -

[issue16728] Missing cross-reference in sequence glossary entry

2012-12-21 Thread Nick Coghlan
Nick Coghlan added the comment: No, that runs counter to the purpose of ABCs. If you have a type that is "good enough" for your purposes, then you can just register it. -- ___ Python tracker __

[issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip

2012-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: zipinfo detects /usr/bin/zip as a zip archive too. -- ___ Python tracker ___ ___ Python-bugs-list

[issue16694] Add pure Python operator module

2012-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: About length_hint(): I were mean something like (even explicit getattr() not needed): try: hint = type(obj).__length_hint__ except AttributeError: return default try: val = hint(obj) except TypeError: return default ... This is a little faste

[issue16728] Missing cross-reference in sequence glossary entry

2012-12-21 Thread INADA Naoki
INADA Naoki added the comment: Thanks, Nick. I see that the "sequence" doesn't have strict definition. Though, I think collections.abc module's document should describe this manner. For example: "But checking type with these abc may be too strict for most case. For example, some user defined s

[issue16728] Missing cross-reference in sequence glossary entry

2012-12-21 Thread Nick Coghlan
Nick Coghlan added the comment: As Amaury notes, implicit ducktyping is not feasible for sequences or mappings, as the method names overlap - you have to add explicit semantic information to say which kind of container you're implementing. -- ___ Py

[issue16728] Missing cross-reference in sequence glossary entry

2012-12-21 Thread Nick Coghlan
Nick Coghlan added the comment: Many algorithms that require a sequence only need __len__ and __getitem__. The term "sequence" is used to distinguish such containers from mere iterables that only provide "__iter__" (and may be consumed by iteration). The glossary entry covers this use of the t

[issue14373] C implementation of functools.lru_cache

2012-12-21 Thread Alexey Kachayev
Alexey Kachayev added the comment: Serhiy, thank you for review. Working further on fixes. -- ___ Python tracker ___ ___ Python-bugs-l