[issue1065986] Fix pydoc crashing on unicode strings

2012-04-23 Thread Stefano Taschini
Changes by Stefano Taschini : -- nosy: +taschini ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: Here's a quick stab at 2/3rds of an implementation, and some docs. -- Added file: http://bugs.python.org/file25310/shutil_open.py ___ Python tracker _

[issue14644] test_logging failure on OS X Tiger

2012-04-23 Thread Vinay Sajip
Vinay Sajip added the comment: I've increased the SMTPHandler timeouts and the tests now seem to be passing, so I'll close this now. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-04-23 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14596] struct.unpack memory leak

2012-04-23 Thread Robert Elsner
Robert Elsner added the comment: Well then at least the docs need an update. I simply fail to see how a cache memory leak constitutes "just fine" (while the caching behavior of struct.unpack is not documented - if somebody wants caching, he ought to use struct.Struct.unpack which does cache and

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: Test passes on Ubuntu Oneiric Linux and 'open' action appropriately defaults to launching an editor for my particular OS settings. Tests on Windows in work. -- Added file: http://bugs.python.org/file25311/shutil_launch.py __

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: Implement shutil.launch() & fix minor shutil.disk_usage() doctext typo Name changed from shutil.open to shutil.launch due to namespace conflict with open() builtin within the shutil module and for users that do from shutil import * On Ubuntu Oneiric Linux shutil.l

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: > # or os.name == 'mac' ??? Nope, that refers to retro Mac OS 9 (and probably lower). Mac OS X is 'posix' for os.name purposes. -- ___ Python tracker __

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: `operation` seems questionable. IMO, the verbs seem stronger / more important than mere optional suggestions (particularly "open" vs. "edit" for files with read-only viewers), and only Windows supports them (so anyone requiring that feature might as well just u

[issue3177] Add shutil.open

2012-04-23 Thread Ram Rachum
Changes by Ram Rachum : -- nosy: -cool-RR ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue3177] Add shutil.open

2012-04-23 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-04-23 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue3177] Add shutil.open

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Is the error raising PEP 3151 compliant? -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: No, it isn't. Changing the `IOError(errno.ENOENT, "...`s to `FileNotFoundError("...`s would half fix it. The other half, the `OSError(errno.ENOSYS)`s, has a FIXME for what's the right error to raise in that case ("no application associated with files of this t

[issue3177] Add shutil.open

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > ENOSYS was the closest approximation I could find. Thoughts? Custom > error class? Different errno? Something else? Why not ValueError? -- nosy: +pitrou ___ Python tracker _

[issue14596] struct.unpack memory leak

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Other of our functions that do caching have been fixed so that the cache does not grow unbounded (usually by using lrucache, I think). IMO a cache that is unbounded by default is a bug. -- nosy: +r.david.murray _

[issue14596] struct.unpack memory leak

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: AFAIU, it's not unbounded, but it's the memory footprint of individual cached objects which can grow senseless. -- ___ Python tracker ___

[issue14596] struct.unpack memory leak

2012-04-23 Thread R. David Murray
R. David Murray added the comment: If that is the case, then a doc footnote that a large repeat count will result in a large cache seems appropriate. Some way to control the max size of the cache would also be a reasonable enhancement request, at which point the cache size issue could be doc

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread Dmitry Dvoinikov
New submission from Dmitry Dvoinikov : Using Python 3.3.0a2 (default, Apr 1 2012, 19:34:58) [MSC v.1500 64 bit (AMD64)] on win32. This line of code "{0:s}{1:s}".format("ABC", "\u0410\u0411\u0412") results in SystemError: Cannot copy UCS2 characters into a string of ascii characters ---

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread R. David Murray
R. David Murray added the comment: I get this result on a debug build of default on linux: >>> "{0:s}{1:s}".format("ABC", "\u0410\u0411\u0412") python: Objects/unicodeobject.c:1223: _copy_characters: Assertion `ch <= to_maxchar' failed. -- nosy: +haypo, loewis, r.david.murray priority

[issue1521950] shlex.split() does not tokenize like the shell

2012-04-23 Thread Éric Araujo
Éric Araujo added the comment: > I'd like to take a look at this (I wasn't aware of it before). Are you interested in shlex in general or only this bug? If the former, then I’ll try to remember to make you nosy on future issues. BTW, what is the shlex unicode bug you mentioned a few times on

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Mark Shannon
Changes by Mark Shannon : Added file: http://bugs.python.org/file25313/73423916a242.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue3177] Add shutil.open

2012-04-23 Thread Éric Araujo
Éric Araujo added the comment: Thanks for relaunching this! > I'm not sure I understand why this was moved to shutil.open. It seems > appropriate to try to accomplish what > os.startfile() does in a cross-platform way. Don't many of the other os.* > calls do this--check os.name and > then "do

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Mark Shannon
Mark Shannon added the comment: I've updated the repository and uploaded a new patch in response to Benjamin's review. (And the contributor form is in the post). One remaining issue is the return value of __sizeof__(). If it is an int, then it cannot accurately reflect the memory use, but retu

[issue1521950] shlex.split() does not tokenize like the shell

2012-04-23 Thread R. David Murray
R. David Murray added the comment: I am interested in shell stuff in general. The unicode bug is issue 1170. -- ___ Python tracker ___ ___

[issue3177] Add shutil.open

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Launch is far better than open for this, I think. If someone can come up with an even better name, that would be good. But I would not like to use open for this function, because it does not behave like other open functions. The one exception I know of is

[issue10942] xml.etree.ElementTree.tostring returns type bytes, expected type str

2012-04-23 Thread Gunnar Eikman
Gunnar Eikman added the comment: I moved a working script from Ubuntu (Python 3.1.2) to Windows (Python 3.2.3) today. Had to revise script. The tostring method returns a string on Linux (contradicts this issue), but bytes on Windows (as described in this issue)... I used tostring with a sing

[issue14649] doctest.DocTestSuite error misleading when module has no docstrings

2012-04-23 Thread Chris Jerdonek
New submission from Chris Jerdonek : When invoking doctest.DocTestSuite's constructor with a module that has no docstrings, doctest raises the following exception: ... File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/doctest.py", line 2280, in DocTestSuite r

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c7163a7f7cd2 by Benjamin Peterson in branch 'default': inherit maxchar of field value where needed (closes #14648) http://hg.python.org/cpython/rev/c7163a7f7cd2 -- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/reje

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread R. David Murray
R. David Murray added the comment: A test needs to be added for this. -- keywords: +easy priority: release blocker -> normal stage: committed/rejected -> test needed status: closed -> open ___ Python tracker _

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: What makes you think there isn't one? -- nosy: +benjamin.peterson status: open -> closed ___ Python tracker ___

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread STINNER Victor
STINNER Victor added the comment: > New changeset c7163a7f7cd2 by Benjamin Peterson in branch 'default': > inherit maxchar of field value where needed (closes #14648) > http://hg.python.org/cpython/rev/c7163a7f7cd2 The patch is wrong if the format only gets a substring instead of the full strin

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ah, you are right. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e5855854a2e by Benjamin Peterson in branch 'default': Implement PEP 412: Key-sharing dictionaries (closes #13903) http://hg.python.org/cpython/rev/6e5855854a2e -- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rej

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: Does no one like "os.startfile" as a home for this? Besides myself and the original 2008 proposer, of course. Can anyone explain to us newbies why it's a bad idea to have the cross-platform module do things identically across platforms? @David, `shutils.wmopen` locks yo

[issue3177] Add shutil.open

2012-04-23 Thread Éric Araujo
Éric Araujo added the comment: Please trust us that this is our policy. os is a thin wrapper only. -- ___ Python tracker ___ ___ Pyth

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay. I committed the latest patch. Subtleties like __sizeof__ can be worked out as people start using it. -- ___ Python tracker ___ __

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Yury Selivanov
Yury Selivanov added the comment: Mark, did you add the test that your patch initially was failing with? http://mail.python.org/pipermail/python-dev/2012-February/116605.html -- ___ Python tracker ___

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread R. David Murray
R. David Murray added the comment: > What makes you think there isn't one? Poor eyesight? Sorry. -- ___ Python tracker ___ ___ Pyth

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: @Éric Thanks for clearing up my misunderstanding of os and shutil. I get it now. I'm sure you know this, and it's clear you agree with changing the name, but just to add fire to your resolve, the difference between shutil.open() and the other `*.open()` modules you ment

[issue14650] 1-character typo in shutils doctext

2012-04-23 Thread Hobs
New submission from Hobs : This patch fixes a 1-character typo in the docstring for shutil.disk_usage(). -- assignee: docs@python components: Documentation files: shutil_disk_usage_doc.patch keywords: patch messages: 159035 nosy: Hobson.Lane, docs@python, eric.araujo priority: normal sev

[issue13684] httplib tunnel infinite loop

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 790ae45b52be by Senthil Kumaran in branch '2.7': Fix for Issue13684 - httplib tunnel infinite loop http://hg.python.org/cpython/rev/790ae45b52be New changeset 7787a9aebdc6 by Senthil Kumaran in branch '3.2': 3.2 - Fix for Issue13684 - httplib tunne

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: New patch incorporates improvements from pitrou, cvrebert, r.david.murray, eric.araujo, cool-RR -- Added file: http://bugs.python.org/file25315/shutil_open.patch ___ Python tracker

[issue3177] Add shutil.open

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Initially this issue was about implementing a startfile-equivalent on posix. But if you have to add a gui option to startfile to not lanuch a GUI, and your real goal is a consistent way to launch non-gui programs on posix, then I don't see that this is abou

[issue3177] Add shutil.open

2012-04-23 Thread Sven Marnach
Sven Marnach added the comment: The semantics of "associated application" change considerably from operating system to operating system. As an example, ``os.startfile("a.py")`` will usually run `a.py` in the Python interpreter, while ``xdg-open a.py`` it will usually open the source code in

[issue14651] `pysetup run [cmd]` can't handle option values in the setup.cfg

2012-04-23 Thread Takayuki SHIMIZUKAWA
New submission from Takayuki SHIMIZUKAWA : `pysetup run [cmd]` can't handle option values in the setup.cfg setup.cfg:: [sdist] formats = gztar dist-dir = _dist run on windows:: C:> pysetup run sdist That command generate `dist/package-version.zip` instead of `_dist/packcage-version.

[issue14650] 1-character typo in shutil docstring

2012-04-23 Thread Éric Araujo
Éric Araujo added the comment: Thanks. Can you check if the typo is also present in the documentation (i.e. in Doc/library)? -- title: 1-character typo in shutils doctext -> 1-character typo in shutil docstring ___ Python tracker

[issue14651] pysetup run cmd can't handle option values in the setup.cfg

2012-04-23 Thread Éric Araujo
Éric Araujo added the comment: Thanks for the report. This is weird, given that the code for setting command options in setup.cfg directly comes from distutils and works there. I think that this error may come from another bug in pysetup (i.e. in distutils2.run) where the config file is par

[issue3177] Add shutil.open

2012-04-23 Thread Éric Araujo
Éric Araujo added the comment: > The semantics of "associated application" change considerably from > operating system to operating system. As an example, > ``os.startfile("a.py")`` will usually run `a.py` in the Python > interpreter, while ``xdg-open a.py`` it will usually open the source > co

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: Last patch was invalid and untested. New patch passes `make patchtest`, but still doing the full test suite on Windows and Linux. Still unsure if I raised the right exceptions with the right arguments. -- Added file: http://bugs.python.org/file25317/shutil_ope

[issue14635] telnetlib uses select instead of poll - limited to FD_SETSIZE fds

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Éric: there are devices that still only allow telnet. Older cisco routers (*many* of which are still in the field) are just one example I'm familiar with. I don't currently have any tools that use telnetlib to talk to them, but I've got at least two I'd li

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-23 Thread Charles-François Natali
Charles-François Natali added the comment: > Charles-François: Certainly I can reduce the iterations to make the test > faster. As it is, I did reproduce the failure on my dev system, but only > once, after running John's test script about a dozen times: every other > time, it completed successf

[issue14638] pydoc error on instance of a custom class

2012-04-23 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray nosy: +r.david.murray stage: -> commit review ___ Python tracker ___ ___

[issue14638] pydoc error on instance of a custom class

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2a35dfbe3d99 by R David Murray in branch '3.2': #14638: pydoc now treats non-str __name__ as None instead of raising http://hg.python.org/cpython/rev/2a35dfbe3d99 New changeset 86b4b54bb0fa by R David Murray in branch 'default': merge #14638: pydoc

[issue14638] pydoc error on instance of a custom class

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Thanks Peter. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Mark Shannon
Mark Shannon added the comment: I fixed it back then, but didn't add the test. It subsequently regressed. Should know better. Patch (with test this time) attached. -- resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file25318/str_subclass.patch _

[issue10731] UnicodeDecodeError in OS X tkinter when binding to

2012-04-23 Thread Ned Deily
Ned Deily added the comment: A potential fix has been generated for Tk. I'll close this issue once the fix has been verified with _tkinter. -- resolution: -> out of date stage: needs patch -> status: open -> pending ___ Python tracker

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: I'll be happy to code, test, and use the new .() function wherever it ends up and whatever it is named... but... > Initially this issue was about implementing a startfile-equivalent on > posix. But if you have to add a gui option to startfile to not lanuch > a

[issue14641] Minor fixes in sockets.rst

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset f24d8dc1a986 by Sandro Tosi in branch '2.7': Issue #14641: minor fixes to sockets Howto; patch by Dionysios Kalofonos http://hg.python.org/cpython/rev/f24d8dc1a986 New changeset 9bb9604519ce by Sandro Tosi in branch '3.2': Issue #14641: minor fixes

[issue14652] Better error messages for wsgiref validator failures

2012-04-23 Thread Sidney San Martín
New submission from Sidney San Martín : wsgiref’s validation middleware is missing messages for many of its assertions, and its docstring doesn’t reflect read() now requiring an argument (said that it took an optional argument). Here’s a patch to add some and update the comment. -- co

[issue14641] Minor fixes in sockets.rst

2012-04-23 Thread Sandro Tosi
Sandro Tosi added the comment: Thanks for your contribution! -- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 ___ Python tracker __

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34b6998efd2c by Benjamin Peterson in branch 'default': fix instance dicts with str subclasses (#13903) http://hg.python.org/cpython/rev/34b6998efd2c -- ___ Python tracker

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: >> ENOSYS was the closest approximation I could find. Thoughts? Custom >> error class? Different errno? Something else? > > Why not ValueError? Because the value they provided was perfectly valid (the file/directory *did* exist), so the caller's request was reas

[issue14650] 1-character typo in shutil docstring

2012-04-23 Thread Hobs
Hobs added the comment: Eric, the documentation (shutil.rst) looks fine. Just a code comment typo. -- ___ Python tracker ___ ___ Pyth

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: Hobs, why is exit code 4 of xdg-open (which the manpage describes as the extremely generic "The action failed.") interpreted as FileNotFoundError in your new version? -- ___ Python tracker

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: Because that's how I caused the exception in Ubuntu--shutil.launch('file_that_doesnt_exist'). That's why I changed the message to "file may not exist" for both 2 and 4, but should probably prove that 2 sometimes happens when the file does exist (like with permission or vi

[issue14650] 1-character typo in shutil docstring

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 629d4c2faa87 by Sandro Tosi in branch 'default': Issue #14650: fix typo in shutil.disk_usage() docstring; patch by Hobson Lane http://hg.python.org/cpython/rev/629d4c2faa87 -- nosy: +python-dev ___ Pytho

[issue14650] 1-character typo in shutil docstring

2012-04-23 Thread Sandro Tosi
Sandro Tosi added the comment: Thanks for your contribution! -- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: Also: The FileNotFoundErrors quote the path twice: Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) >>> path = "/foo/bar" >>> print "Path '%s' may not exist" % repr(path) Path ''/foo/bar'' may not exist The ValueError error message isn't grammat

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: The xdg-open source code (http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-open ) shows that exit code 4 is used whenever an invocation of another opener script (e.g. kde-open, gnome-open) fails for any reason besides said script not being installed.

[issue3177] Add shutil.open

2012-04-23 Thread Hobs
Hobs added the comment: Yea, I hosed up the path quoting in a misguided attempt at shortening for 80-col line-wrapping. Yours is better, will revert. On Tue, Apr 24, 2012 at 2:09 AM, Chris Rebert wrote: > > Chris Rebert added the comment: > > Also: > > The FileNotFoundErrors quote the path tw

[issue3177] Add shutil.open

2012-04-23 Thread Chris Rebert
Chris Rebert added the comment: >> The semantics of "associated application" change considerably from >> operating system to operating system. As an example, >> ``os.startfile("a.py")`` will usually run `a.py` in the Python >> interpreter, while ``xdg-open a.py`` it will usually open the source

[issue14640] Typos in pyporting.rst

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7b002e5cac7 by R David Murray in branch '3.2': #14640: Fix typos/syntax in pyporting.rst. http://hg.python.org/cpython/rev/f7b002e5cac7 New changeset 13c30fe3f427 by R David Murray in branch 'default': Merge #14640: Fix typos/syntax in pyporting.r

[issue14640] Typos in pyporting.rst

2012-04-23 Thread R. David Murray
R. David Murray added the comment: Thanks, Dionysios. -- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.2 ___ Python tracker

[issue3177] Add shutil.open

2012-04-23 Thread R. David Murray
R. David Murray added the comment: I'm not a lawyer (duh), but my understanding is that *looking* at GPL code (as opposed to proprietary code, where someone might sue you about it and not looking is a good defense) is OK, you just can't copy it. -- ___

[issue3177] Add shutil.open

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not a lawyer (duh), but my understanding is that *looking* at GPL > code (as opposed to proprietary code, where someone might sue you > about it and not looking is a good defense) is OK, you just can't copy > it. You could probably copy a one- or two-line

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-23 Thread Vinay Sajip
Vinay Sajip added the comment: [snip] >With this change, I can trigger a failure reliably in around 1s, and >my computer is rather slow. I'm working in a VM, and although I can get John's script to fail more regularly (with the reduced timeouts and counts of 1000), a version of the test which

[issue11618] Locks broken wrt timeouts on Windows

2012-04-23 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Any thougts? Is a 60% performance increase for the common case of acquiring an uncontested lock worth doing? Btw, for our console game I also opted for non-semaphore based locks in thread_pthread.h, because our console profilers were alarmed at all t

[issue11618] Locks broken wrt timeouts on Windows

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Is a 60% performance increase for the common case of acquiring an > uncontested lock worth doing? Yes, I agree it is. However, the Vista-specific path seems uninteresting, if it's really 2% faster. > our console profilers were alarmed at all the kernel tran

[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-23 Thread Raphael Cruzeiro
Raphael Cruzeiro added the comment: Here is the output of sh -x ./configure -- Added file: http://bugs.python.org/file25321/output_sh ___ Python tracker ___

[issue14653] Improve mktime_tz to use calendar.timegm instead of time.mktime

2012-04-23 Thread Mitar
New submission from Mitar : I would suggest improvement of mktime_tz to use calendar.timegm internally instead of time.mktime. The problem is that on Windows mktime_tz fails with "mktime argument out of range" for this code: mktime_tz(parsedate_tz('Thu, 1 Jan 1970 00:00:00 GMT')) if user is i

[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-23 Thread Raphael Cruzeiro
Raphael Cruzeiro added the comment: Posting the strac output -- Added file: http://bugs.python.org/file25322/strace.output.txt ___ Python tracker ___ ___

[issue14339] Optimizing bin, oct and hex

2012-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can only do this tomorrow. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue14624] Faster utf-16 decoder

2012-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are the results of benchmarking (numbers in MB/s). On 32-bit Linux, AMD Athlon 64 X2 4600+ @ 2.4GHz: Py2.7Py3.2Py3.3 patch utf-16le 'A'*1 504 (+282%) 1905 (+1%

[issue14625] Faster utf-32 decoder

2012-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are the results of benchmarking (numbers in MB/s). On 32-bit Linux, AMD Athlon 64 X2 4600+ @ 2.4GHz: Py2.7 Py3.2 Py3.3 patchA patchB utf-32le 'A'*1 461

[issue14596] struct.unpack memory leak

2012-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that implements method __sizeof__ for Struct. This can be used to limit the caching. In any case, it is useful to know the real memory consumption of the object. I'm not sure of the correctness of the method implementation. -- Added f

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The utf-8 decoder is already well optimized. I propose a patch, which accelerates the utf-8 decoder for some of the frequent cases even more (+10-30%). In particular, for 2-bites non-latin1 codes will get about +30%. This is not the final result of optimi

[issue11618] Locks broken wrt timeouts on Windows

2012-04-23 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: The vista specific path is included there for completeness, if and when code moves to that platform, besides showing what the "emulated CV" is actually emulating. Also, I am aware of the old/new GIL, but our console game uses python 2.7 and the old G

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are the results of benchmarking (numbers in MB/s). On 32-bit Linux, AMD Athlon 64 X2 4600+ @ 2.4GHz: Py2.7 Py3.2 Py3.3 patch utf-8 'A'*1 191 (+790%) 1170

[issue3177] Add shutil.open

2012-04-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread STINNER Victor
STINNER Victor added the comment: "{0:s}{1:s}".format("ABC", "\u0410\u0411\u0412") > python: Objects/unicodeobject.c:1223: _copy_characters: Assertion `ch <= > to_maxchar' failed. Attached patch fixes this issue. -- keywords: +patch Added file: http://bugs.python.org/file25327/fo

[issue14655] traceback module docs should show how to print/fomat an exception object

2012-04-23 Thread R. David Murray
New submission from R. David Murray : Suppose you have an exception object acquired from somewhere. The exception is no longer active on the stack. Now you want to format the exception like format_exception would (to log it, perhaps). To do this you apparently need to call: format_except

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: 64-bit Linux, Intel Core i5-2500K CPU @ 3.30GHz: vanilla 3.3 patched utf-8 'A'*1 6668 (+7%)7145 utf-8 'A'*+'\x80' 2358 (+3%)2418 utf-8 'A'*+'\u

[issue14654] More fast utf-8 decoding

2012-04-23 Thread STINNER Victor
STINNER Victor added the comment: > 64-bit Linux, Intel Core i5-2500K CPU @ 3.30GHz: (...) Hum, the patch doesn't look very interesting if it only optimize one specific case: > utf-8     '\x80'*1                    366 (+53%)    559 -- ___ Pyth

[issue14648] Attempt to format ascii and non-ascii strings together fails with "... UCS2 ..."

2012-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 139c3ae84772 by Victor Stinner in branch 'default': Close #14648: Compute correctly maxchar in str.format() for substrin http://hg.python.org/cpython/rev/139c3ae84772 -- resolution: -> fixed stage: test needed -> committed/rejected status:

[issue14656] Add a macro for unreachable code

2012-04-23 Thread Benjamin Peterson
New submission from Benjamin Peterson : It would be nice to have a macro Py_UNREACHABLE to keep compiler warnings away in unreachable code. This is can call __builtin_unreachable on gcc and abort elsewhere. -- components: Interpreter Core keywords: easy messages: 159088 nosy: benjamin.

[issue14572] 2.7.3: sqlite module does not build on centos 5

2012-04-23 Thread Marc Abramowitz
Marc Abramowitz added the comment: This patch worked for me as well. Thanks, Joakim! $ cat /etc/redhat-release CentOS release 5.5 (Final) -- nosy: +Marc.Abramowitz ___ Python tracker

[issue14624] Faster utf-16 decoder

2012-04-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: 64 bit Linux, Intel Core i5-2500K @ 3.30GHz: vanilla 3.3 patched utf-16le 'A'*1 1384 (+278%) 5233 utf-16le 'A'*+'\x80' 1303 (+259%) 4684 utf-16le 'A'*+'\u010

[issue14654] More fast utf-8 decoding

2012-04-23 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

  1   2   >