Re: Database access benchmarks for use in web-frameworks - How does Python compare?

2011-11-04 Thread 88888 Dihedral
I suggest that the use of dynamical page forwarding to different severs which run the same software package. This can be done in python! -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-04 Thread Steven D'Aprano
On Thu, 03 Nov 2011 17:54:52 +, Andrea Crotti wrote: All these ideas (shell and git hooks) are nice, but unfortunately - it's svn not git - it's windows not *nix - we have to remove only the ones without the corresponding *py... Does it matter? The other .pyc files will be recreated when

Re: ctypes: catch system exit from C library

2011-11-04 Thread Nobody
On Thu, 03 Nov 2011 14:16:50 +, Grant Edwards wrote: in my python application I am calling functions from a C library via `ctypes` interface. Some fns from that C library calls `exit()` on error. Just curious, which library is that? I'm reasonably sure that he's talking about the GRASS

Re: Database access benchmarks for use in web-frameworks - How does Python compare?

2011-11-04 Thread Stefan Behnel
Alec Taylor, 03.11.2011 11:19: I'm building a large e-commerce site, and it is very important that what I write can: - Handle larger server load - Deliver pages quickly - Make transactions quickly Those are pretty broad requirements. If a framework can satisfy them or not depends more on how

Re: leftover pyc files

2011-11-04 Thread Jonathan Hartley
I like to install a Bash shell of some kind on windows boxes I work on, specifically so I can use shell commands like this, just like on any other operating system. Cywin works just fine for this. svn also has hooks, but sadly not a checkout hook: http://svnbook.red-bean.com/en/1.1/ch05s02.html

Re: leftover pyc files

2011-11-04 Thread Jonathan Hartley
Apologies for all my messasges appearing twice. I'm using google groups web ui and have no idea why it's doing that. I'll stop using it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Ulrich Eckhardt
Am 04.11.2011 01:33, schrieb Anthony Kong: I would like to find out what is the current prevailing view or consensus (if any) on the use of Design Pattern in python? My consensus with myself is that design patterns are language-agnostic. If I write class Foo serves as view and controller for

Re: Dictionary sorting

2011-11-04 Thread Hrvoje Niksic
Ben Finney ben+pyt...@benfinney.id.au writes: Tim Chase python.l...@tim.thechases.com writes: On 11/03/11 16:36, Terry Reedy wrote: CPython iterates (and prints) dict items in their arbitrary internal hash table order, which depends on the number and entry order of the items. It is a bug

Re: leftover pyc files

2011-11-04 Thread Andrea Crotti
On 11/04/2011 09:27 AM, Jonathan Hartley wrote: I like to install a Bash shell of some kind on windows boxes I work on, specifically so I can use shell commands like this, just like on any other operating system. Cywin works just fine for this. svn also has hooks, but sadly not a checkout

Re: leftover pyc files

2011-11-04 Thread Chris Angelico
On Fri, Nov 4, 2011 at 9:34 PM, Andrea Crotti andrea.crott...@gmail.com wrote: Uhm yes it makes sense also to just remove all of them, I don't know why it was done like this but probably for performance reasons. I will try both ways, but I would definitively avoid the shell scripting,

Re: SystemError when defining

2011-11-04 Thread Joshua Landau
On 11/3/11, Chris Angelico ros...@gmail.com wrote: Fascinating! Awesome to know! I did some introspection with this: *snip* Variations on the theme show that during compilation of foo, the name is normally cemented as either a global or a local - but if it's keyword-only, then a LOAD_NAME

Re: leftover pyc files

2011-11-04 Thread Andrea Crotti
On 11/04/2011 10:39 AM, Chris Angelico wrote: If you're removing them all, you don't need to use a powerful shell. Much much easier! Just recursively del *.pyc and you're done. ChrisA Discussing with the guy that did it I think it's actually a good idea instead, because removing them *all*

python-based downloader (youtube-dl) missing critical feature ...

2011-11-04 Thread lbrt
python-based youtube-dl ~ http://rg3.github.com/youtube-dl/ ~ is sorely missing a flag in order to indicate the maximum file length of the data feed it would download (well, unless, for some reason, it is considered a feature). ~ I wonder what developers were thinking about when they came

Re: Dictionary sorting

2011-11-04 Thread Ben Finney
Hrvoje Niksic hnik...@xemacs.org writes: Ben Finney ben+pyt...@benfinney.id.au writes: Tim Chase python.l...@tim.thechases.com writes: Does this never trust it hold even for two consecutive iterations over an unchanged dict? I didn't see anything in the docs[1] to make such a claim,

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread John Roth
On Nov 3, 6:33 pm, Anthony Kong anthony.hw.k...@gmail.com wrote: Sorry to resurrect this topic. By google search the last discussion was in 2003. I would like to find out what is the current prevailing view or consensus (if any) on the use of Design Pattern in python? I am doing some

Re: python-based downloader (youtube-dl) missing critical feature ...

2011-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2011 11:48:02 +, lbrt chx _ gemale wrote: python-based youtube-dl ~ http://rg3.github.com/youtube-dl/ ~ is sorely missing a flag in order to indicate the maximum file length of the data feed it would download (well, unless, for some reason, it is considered a

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Joe Riopel
On Fri, Nov 4, 2011 at 8:28 AM, John Roth johnro...@gmail.com wrote: The first is that if you use TDD (Test Driven Development) and refactor relentlessly to remove duplication, most of the basic design patterns will emerge naturally from the code as you work. I agree, and there is a pretty

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Andrea Crotti
On 11/04/2011 12:33 AM, Anthony Kong wrote: Sorry to resurrect this topic. By google search the last discussion was in 2003. I would like to find out what is the current prevailing view or consensus (if any) on the use of Design Pattern in python? I am doing some 'fact-finding' in this area

Re: python-based downloader (youtube-dl) missing critical feature ...

2011-11-04 Thread Philipp Hagemeister
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 As already said, you should file your request at https://github.com/rg3/youtube-dl/issue , not here. A few things to note: * Not all sites necessarily send the Content-Length header. * RTMP URLs would have to be treated differently * Sending a

Re: python-based downloader (youtube-dl) missing critical feature ...

2011-11-04 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: On Fri, 04 Nov 2011 11:48:02 +, lbrt chx _ gemale wrote: python-based youtube-dl ~ http://rg3.github.com/youtube-dl/ ~ is sorely missing a flag in order to indicate the maximum file length of the data feed it would download (well, unless, for some reason, it

Re: leftover pyc files

2011-11-04 Thread 88888 Dihedral
Uhn, thanks for the easy way Just delete all *.pyc recursively. spend another 5-20 minutes to recompile all to get everything sync.. That is trivial! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python advanced course (preferably in NA)

2011-11-04 Thread Behnam
This was great. Thank you all! /Behnam On Nov 3, 5:18 pm, Catherine Moroney catherine.m.moro...@jpl.nasa.gov wrote: I've taken twoPythonclasses from David Beazley and can second Eric's recommendation.  The advanced class is reallyadvanced and goes into some pretty mind-blowing stuff.  The

Line continuation issue\

2011-11-04 Thread Steven Lehar
Is this the right place to propose language extensions? My Python code keeps expanding rightwards, it is difficult to keep it contained within reasonable limits. But the standard line continuation \ is positively anti-Pythonic because an *invisible* white space between \ and [CR] will render it

Re: Line continuation issue\

2011-11-04 Thread Peter Otten
Steven Lehar wrote: Is this the right place to propose language extensions? My Python code keeps expanding rightwards, it is difficult to keep it contained within reasonable limits. You should attack this by breaking large expressions into smaller ones and factoring out some of your code

Re: Line continuation issue\

2011-11-04 Thread Chris Angelico
On Sat, Nov 5, 2011 at 2:10 AM, Steven Lehar sle...@gmail.com wrote: But the standard line continuation \ is positively anti-Pythonic because an *invisible* white space between \ and [CR] will render it useless. How's it anti-Pythonic for invisible whitespace differences to be significant?

Re: Line continuation issue\

2011-11-04 Thread Steven Lehar
How's it anti-Pythonic for invisible whitespace differences to be significant? A central idea of Python was to replace {curly;braces{and;parentheses;}}, which are easily overlooked by the programmer, and use WHITESPACE instead, something that is clearly visible to the programmer, as the defining

Re: Line continuation issue\

2011-11-04 Thread Chris Angelico
On Sat, Nov 5, 2011 at 2:53 AM, Steven Lehar sle...@gmail.com wrote: How's it anti-Pythonic for invisible whitespace differences to be significant? A central idea of Python was to replace {curly;braces{and;parentheses;}}, which are easily overlooked by the programmer, and use WHITESPACE

short reading materials about anthropological, universal themes for students with no reading habit ...

2011-11-04 Thread lbrt
A few things to note: * Not all sites necessarily send the Content-Length header. * RTMP URLs would have to be treated differently ~ No some don't, but at least for the ones that do (like youtube) it would be a useful feature. The Content-Length header is used in the code anyway ~ *

Re: SystemError when defining

2011-11-04 Thread Joshua Landau
def x(nonlocal_var): ... def y(): ... z = lambda *, keyword_only=nonlocal_var: None ... return y ... x(None)() Traceback (most recent call last): File stdin, line 1, in module File stdin, line 3, in y SystemError: no locals when loading 'nonlocal_var'

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Terry Reedy
On 11/4/2011 8:46 AM, Andrea Crotti wrote: Well this book is work in progress Though not touched since May 2009 https://bitbucket.org/BruceEckel/python-3-patterns-idioms/src but it actually looks very interesting The slightly older .pdf version is a bit bizarre as parts of both text and

Re: leftover pyc files

2011-11-04 Thread Terry Reedy
For those not aware, the compiled file caching and import system was changed for 3.2. Given test.py, the compiled file is no longer test.pyc, in the same directory, but (for cpython32) __pycache__/test.cpython-32.pyc. Given the statement 'import test', the __pycache__ directory is only

Re: Line continuation issue\

2011-11-04 Thread Terry Reedy
On 11/4/2011 11:10 AM, Steven Lehar wrote: Is this the right place to propose language extensions? Yes, especially for beginners not familiar with previous discussions. My Python code keeps expanding rightwards, it is difficult to keep it contained within reasonable limits. But the standard

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Ned Deily
Search for presentations and videos by Alex Martelli. He's the goto (so to speak) person on Python design patterns. Here, for instance: http://code.google.com/edu/languages/#_python_patterns -- Ned Deily, n...@acm.org -- http://mail.python.org/mailman/listinfo/python-list

Re: leftover pyc files

2011-11-04 Thread Steven D'Aprano
On Fri, 04 Nov 2011 16:01:14 -0400, Terry Reedy wrote: For those not aware, the compiled file caching and import system was changed for 3.2. Given test.py, the compiled file is no longer test.pyc, in the same directory, but (for cpython32) __pycache__/test.cpython-32.pyc. Given the statement

Re: SystemError when defining

2011-11-04 Thread Terry Reedy
On 11/4/2011 3:10 PM, Joshua Landau wrote: def x(nonlocal_var): ... def y(): ... z = lambda *, keyword_only=nonlocal_var: None ... return y ... x(None)() ... SystemError: no locals when loading 'nonlocal_var' ... Now - where shall I report

Re: SystemError when defining

2011-11-04 Thread Joshua Landau
Joshua found bugs.python.org and, 2 hours later, a fix was applied. http://bugs.python.org/**issue13343 http://bugs.python.org/issue13343 It was impressively fast. Those python devs are like a hawk. Although I wasn't expecting a three-line patch (plus a three line test). --

Can I fully replace GNU Bash with Python?

2011-11-04 Thread Jason Hsu, Mr. Swift Linux
This question concerns my process of creating Swift Linux from the base distro (antiX Linux in the past, Linux Mint Debian Edition now). (NOTE: The process I'm describing here is an oversimplification.) All of my development work takes place in the ~/develop directory. This is the directory where

[issue13339] Missing semicolon at Modules/posixsubprocess.c:4511

2011-11-04 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Thanks! -- assignee: - rosslagerwall nosy: +rosslagerwall resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: This is a hairy issue Indeed. Performing partial read/write may sound imperfect, but using buffered I/O around non-blockind FD is definitely not a good idea. Also, the advantage of the current approach is that at least, no data is

[issue13254] maildir.items() broken

2011-11-04 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: Removed file: http://bugs.python.org/file23586/issue13254_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13254 ___

[issue13254] maildir.items() broken

2011-11-04 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- keywords: -needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13254 ___ ___

[issue12342] characters with ord above 65535 fail to display in IDLE

2011-11-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5f49b496d161 by Victor Stinner in branch 'default': Issue #12342: Fix compilation on Mac OS X http://hg.python.org/cpython/rev/5f49b496d161 -- ___ Python tracker

[issue13340] list.index does not accept None as start or stop

2011-11-04 Thread Carl Friedrich Bolz
New submission from Carl Friedrich Bolz cfb...@gmx.de: The list.index method does not accept None as start and stop, which makes the error message quite confusing: [1, 2, 3].index(2, None, None) Traceback (most recent call last): File stdin, line 1, in module TypeError: slice indices must

[issue13140] ThreadingMixIn.daemon_threads is not honored when parent is daemon

2011-11-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f09e3b1603ee by Florent Xicluna in branch '2.7': Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn. http://hg.python.org/cpython/rev/f09e3b1603ee New changeset 94017ce9304d by Florent Xicluna in

[issue13341] Incorrect documentation for u PyArg_Parse format unit

2011-11-04 Thread Ilya Novoselov
New submission from Ilya Novoselov ilya.novose...@gmail.com: Documentation states that u format unit returns buffer of 16-bit Unicode (UTF-16) data while it returns pointer to internal buffer of unicode data, which is either UCS-16 or UCS-32 http://docs.python.org/c-api/arg.html --

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Also, the advantage of the current approach is that at least, no data is ever lost But what about the buggy readline() behaviour? -- ___ Python tracker rep...@bugs.python.org

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Note that Java's BufferedInputStream and ReadableByteChannel also return partial reads. Apparently, they are specified to, even for blocking streams (which I find a bit weird, and the language in the docs seems deliberately vague). Python's

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread stefanholek
New submission from stefanholek ste...@epy.co.at: The input builtin always uses strict error handling for Unicode conversions. This means that when I enter a latin-1 string in a utf-8 environment, input breaks with a UnicodeDecodeError. Now don't tell me not to do that, I have a valid

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-04 Thread Lucas Sinclair
Lucas Sinclair blastoc...@mac.com added the comment: I'm on 10.7.2, with XCode is 4.2 and the problem is still present. The command ggc -v produces the following output: gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) The command ./configure --with-pydebug make -j2

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: There's no reason you couldn't write your own input() function in Python to do this. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread stefanholek
stefanholek ste...@epy.co.at added the comment: I am not quite sure how I would write a custom, readline-using input function in Python (access to PyOS_Readline seems required), that's why I did it in C. Have an example? -- ___ Python tracker

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread sbt
sbt shibt...@gmail.com added the comment: No one has suggested raising BlockingIOError and DISCARDING the data when a partial read has occurred. The docs seem to imply that the partially read data should be returned since they only say that BlockingIOError should be raised if there is

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: There cannot be a reason input() should be confined to strict, or can there? ;-) Actually, there's a good reason: in the non-interactive case, input() simply calls sys.stdin.read(), which doesn't have encoding or errors attributes. You want

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342 ___ ___

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread sbt
sbt shibt...@gmail.com added the comment: But what about the buggy readline() behaviour? Just tell people that if the return value is a string which does not end in '\n' then it might caused by EOF or EAGAIN. They can just call readline() again to check which. --

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread sbt
sbt shibt...@gmail.com added the comment: The third arg of BlockingIOError is used in two quite different ways. In write(s) it indicates the number of bytes of s which have been consumed (ie written to the raw file or buffered). But in flush() and flush_unlocked() (in _pyio) it indicates the

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Apparently, they are specified to, even for blocking streams (which I find a bit weird, and the language in the docs seems deliberately vague). As an additional convenience, it attempts to read as many bytes as possible by

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-04 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Lucas, exactly what source version of Python are you trying to build (i.e what does hg summary say)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241

[issue13283] removal of two unused variable in locale.py

2011-11-04 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Our policy is to not commit code cleanup patches that are not strict bug fixes; see thread at http://mail.python.org/pipermail/python-dev/2011-October/114281.html and http://mail.python.org/pipermail/python-dev/2011-November/114301.html

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-04 Thread Xavier de Gaye
Xavier de Gaye xdeg...@gmail.com added the comment: Attached yet another patch. This patch does not use a while loop in handle_close() and handles POLLHUP as suggested by Charles-François. No changes have been made to both tests (test_half_duplex_close). -- Added file:

[issue5301] add mimetype for image/vnd.microsoft.icon (patch)

2011-11-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 33680de042e7 by Éric Araujo in branch '2.7': Revert commit that was not a bugfix (#5301). http://hg.python.org/cpython/rev/33680de042e7 -- ___ Python tracker

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2011-11-04 Thread Lucas Sinclair
Lucas Sinclair blastoc...@mac.com added the comment: I just cloned cpython today. The output of hg summary is: parent: 73351:2bec7c452b39 tip Fix C89 incompatibility. branch: default commit: (clean) update: (current) -- ___ Python tracker

[issue12260] Make install default to user site-packages

2011-11-04 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: With the raise of virtualenv and its inclusion in CPython for 3.3, this is even less a concern, even for UNIX. I’m withdrawing the idea and will continue to advertise --user and warn against sudo in documentation and other venues. --

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch. The bugfix itself is quite pedestrian, but the test is more interesting. I did what I could to fork a subprocess into a pseudoterminal so as to trigger the GNU readline code path. The only limitation I've found is that I'm

[issue13314] ImportError ImportError: Import by filename, should be deferred until sys.meta_path hooks are processed

2011-11-04 Thread Rob Bairos
Rob Bairos rbai...@gmail.com added the comment: Yah, thinking about this further, the real error is that sys.meta_path allows processing of names with #,?* etc. I can see why this would cause problems, as python names must only be _ and alphanumeric characters. I'll re-implement this.

[issue13311] asyncore handle_read should call recv

2011-11-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Since this patch may break existing valid code, I think it should be closed as invalid. Yes. Since the benefit is not clear and it may break existing code, it's probably wiser. -- resolution: - rejected stage: patch review

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread sbt
sbt shibt...@gmail.com added the comment: Currently a BlockingIOError exception raised by flush() sets characters_written to the number of bytes fushed from the internal buffer. This is undocument (although there is a unit test which tests for it) and causes confusion because characters_written

[issue13341] Incorrect documentation for u PyArg_Parse format unit

2011-11-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you write a patch? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13341 ___

[issue13287] urllib.request exposes too many names

2011-11-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: test_urllib2.test___all__() is failing on Windows. Example: http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/5498/steps/test/logs/stdio ==

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Joshua Landau
New submission from Joshua Landau joshua.landau...@gmail.com: When setting defaults to keyword-only arguments in lambdas which are inside non-global scopes, cPython doesn't push the name to it's closure's co_freevars. EXAMPLE: global_variable = None (lambda: (lambda *,

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: But what about the buggy readline() behaviour? Just tell people that if the return value is a string which does not end in '\n' then it might caused by EOF or EAGAIN. They can just call readline() again to check which. Sounds

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: But then what's the point of using buffered I/O at all? If it can't offer anything more than raw I/O, I'd rather do something like raise a RuntimeError(buffered I/O doesn't work with non-blocking streams) when the raw stream returns

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: The bugfix itself is quite pedestrian, but the test is more interesting. Indeed. Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- priority: normal - critical stage: - needs patch versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13343 ___

[issue3067] setlocale error message is confusing

2011-11-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 931ae170e51c by Petri Lehtinen in branch '3.2': Issue #3067: Fix the error raised by locale.setlocale() http://hg.python.org/cpython/rev/931ae170e51c New changeset d90d88380aca by Petri Lehtinen in branch 'default':

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is a patch, with a minimal test. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file23611/issue13343.patch ___ Python tracker rep...@bugs.python.org

[issue3067] setlocale error message is confusing

2011-11-04 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Terry: Do you still think there's need for a doc update? -- resolution: - fixed status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: same patch, without tabs. -- Added file: http://bugs.python.org/file23612/issue13343.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13343

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: Removed file: http://bugs.python.org/file23611/issue13343.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13343 ___

[issue13321] fstat doesn't accept an object with fileno method

2011-11-04 Thread Petri Lehtinen
Changes by Petri Lehtinen pe...@digip.org: -- resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13321 ___

[issue13321] fstat doesn't accept an object with fileno method

2011-11-04 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Closing as wontfix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13321 ___ ___

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread stefanholek
stefanholek ste...@epy.co.at added the comment: Thank you Antoine, this looks good. However when I try your example I get sys.stdin = io.TextIOWrapper( sys.stdin.detach(), 'ascii', 'replace') ValueError: underlying buffer has been detached /helpforum --

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: However when I try your example I get sys.stdin = io.TextIOWrapper( sys.stdin.detach(), 'ascii', 'replace') ValueError: underlying buffer has been detached Which version of Python (and which OS?). It works fine here on latest 3.2 and

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Patch looks good to me. -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13343 ___

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Stefan Holek
Stefan Holek ste...@epy.co.at added the comment: This is with Python 3.2.2 on Mac OS X 10.6 (SL). I have built Python from source with: ./configure; make; make install. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342

[issue13344] closed sockets don't raise EBADF anymore

2011-11-04 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: This decrepancy between 2.x and 3.x is witnessed under Windows: Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import socket sock =

[issue13287] urllib.request exposes too many names

2011-11-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ca78ed7393bf by Florent Xicluna in branch 'default': Fix test_urllib2 error on Windows in relation with issue #13287. http://hg.python.org/cpython/rev/ca78ed7393bf -- ___

[issue13287] urllib.request exposes too many names

2011-11-04 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13287 ___ ___

[issue13344] closed sockets don't raise EBADF anymore

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: discrepancy, not decrepancy :S (10038 is WSAENOTSOCK, by the way) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13344 ___

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-04 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: I think this thread is becoming a little messy and since asyncore/asynchat are in a situation where even the slightest change can break existent code I recommend to be really careful. I see 3 different issues here: 1 -

[issue13344] closed sockets don't raise EBADF anymore

2011-11-04 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13344 ___ ___

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1e0e821d2626 by Amaury Forgeot d'Arc in branch '3.2': Issue #13343: Fix a SystemError when a lambda expression uses a global http://hg.python.org/cpython/rev/1e0e821d2626 New changeset bddb455439d0 by Amaury Forgeot

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It was a bug in Python compiler, thanks for the report! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13343

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Stefan Holek
Stefan Holek ste...@epy.co.at added the comment: Python 3.2.2 (default, Nov 4 2011, 22:28:55) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license for more information. import sys, io w = io.TextIOWrapper(sys.stdin.detach(), 'ascii', 'replace')

[issue13343] Lambda keyword-only argument not updating co_freevars

2011-11-04 Thread Joshua Landau
Joshua Landau joshua.landau...@gmail.com added the comment: Glad to help :) It's made my day. I get to boast at school now! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13343 ___

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Stefan Holek
Stefan Holek ste...@epy.co.at added the comment: Oops, the last one wasn't meant for the bug tracker. blush -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342 ___

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread sbt
sbt shibt...@gmail.com added the comment: Another possibility would be that, since lines are usually reasonably sized, they should fit in the buffer (which is 8KB by default). So we could do the extra effort of buffering the data and return it once the line is complete: if the buffer fills

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Stefan Holek
Stefan Holek ste...@epy.co.at added the comment: I can make it work at the interpreter prompt with your patch applied. Sorry for cluttering up the ticket. ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13342

[issue13342] input() builtin always uses strict error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I can make it work at the interpreter prompt with your patch applied. Sorry for cluttering up the ticket. ;-) That's ok, thanks a lot for testing. -- ___ Python tracker rep...@bugs.python.org

[issue13290] get vars for object with __slots__

2011-11-04 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: New features only go in future versions: Given the doc: With a module, class or class instance object as argument (or anything else that has a __dict__ attribute), return that attribute. So you are proposing a change in the definition of

  1   2   >