Re: why () is () and [] is [] work in other way?

2012-04-24 Thread rusi
On Apr 23, 9:34 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: is is never ill-defined. is always, without exception, returns True if the two operands are the same object, and False if they are not. This is literally the simplest operator in Python. Circular definition: In

class versions and object deserialization

2012-04-24 Thread J. Mwebaze
We have classes of this form classA version1, classA version2, classA version3 .. etc. This is same class that has been modified. Each modification creates a new version of a class. Each object has a version attribute which refers to the version of the class from which it was derived.

Re: why () is () and [] is [] work in other way?

2012-04-24 Thread Thomas Rachel
Am 24.04.2012 08:02 schrieb rusi: On Apr 23, 9:34 am, Steven D'Apranosteve +comp.lang.pyt...@pearwood.info wrote: is is never ill-defined. is always, without exception, returns True if the two operands are the same object, and False if they are not. This is literally the simplest operator in

Re: why () is () and [] is [] work in other way?

2012-04-24 Thread Kiuhnm
On 4/24/2012 8:02, rusi wrote: On Apr 23, 9:34 am, Steven D'Apranosteve +comp.lang.pyt...@pearwood.info wrote: is is never ill-defined. is always, without exception, returns True if the two operands are the same object, and False if they are not. This is literally the simplest operator in

finding a regular expression in a file

2012-04-24 Thread S.B
Hello friends. Newb question here. I'm trying to find an efficient way to grep a file with python. The problem is that all the solutions I find on the web read a line at a time from the file with a for line in loop and check each line for the RE instead of sweeping through the entire file. This

Re: finding a regular expression in a file

2012-04-24 Thread Jussi Piitulainen
S.B writes: Hello friends. Newb question here. I'm trying to find an efficient way to grep a file with python. The problem is that all the solutions I find on the web read a line at a time from the file with a for line in loop and check each line for the RE instead of sweeping through the

Re: finding a regular expression in a file

2012-04-24 Thread Kushal Kumaran
On Apr 24, 2012 6:32 PM, S.B hyperboo...@gmail.com wrote: Hello friends. Newb question here. I'm trying to find an efficient way to grep a file with python. The problem is that all the solutions I find on the web read a line at a time from the file with a for line in loop and check each line

Re: why () is () and [] is [] work in other way?

2012-04-24 Thread rusi
On Apr 24, 4:06 pm, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5- a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 24.04.2012 08:02 schrieb rusi: On Apr 23, 9:34 am, Steven D'Apranosteve +comp.lang.pyt...@pearwood.info  wrote: is is never ill-defined. is always, without exception, returns

Re: why () is () and [] is [] work in other way?

2012-04-24 Thread Kiuhnm
On 4/24/2012 15:25, rusi wrote: On Apr 24, 4:06 pm, Thomas Rachelnutznetz-0c1b6768-bfa9-48d5- a470-7603bd3aa...@spamschutz.glglgl.de wrote: Am 24.04.2012 08:02 schrieb rusi: On Apr 23, 9:34 am, Steven D'Apranosteve +comp.lang.pyt...@pearwood.infowrote: is is never ill-defined. is

Re: class versions and object deserialization

2012-04-24 Thread Ian Kelly
On Tue, Apr 24, 2012 at 1:02 AM, J. Mwebaze jmweb...@gmail.com wrote: We have classes of this form classA version1, classA version2, classA version3 .. etc. This is same class that has been modified. Each modification creates a new version of a class. Each object has a version attribute which

trying to use spec file

2012-04-24 Thread George Georgalis
Hi I posted this yesterday to compiler-sig, but I'm not sure there is any traffic there? There is a rather complex spec file for making rpm of python interpreter, but I'm only seeing doc on making rpm packages (ie programs); and, the spec file has difficult errors. Is anyone interested in the

Re: trying to use spec file

2012-04-24 Thread Ned Deily
In article cahk3fnzr1-j6wnepnbjjeb32bjd0ubezvydqnzwwe_daczw...@mail.gmail.com, George Georgalis geo...@galis.org wrote: I posted this yesterday to compiler-sig, but I'm not sure there is any traffic there? There is a rather complex spec file for making rpm of python interpreter, but I'm

Re: from calendar import* doesn't import everything

2012-04-24 Thread Tim Chase
On 04/24/12 18:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: from calendar import* Calendar Traceback (most recent call last): File pyshell#9, line 1, inmodule Calendar NameError: name 'Calendar' is not defined from calendar import

Re: from calendar import* doesn't import everything

2012-04-24 Thread Kiuhnm
On 4/25/2012 1:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: from calendar import* Calendar Traceback (most recent call last): File pyshell#9, line 1, in module Calendar NameError: name 'Calendar' is not defined from calendar import Calendar

Re: from calendar import* doesn't import everything

2012-04-24 Thread Rotwang
On 25/04/2012 00:42, Kiuhnm wrote: On 4/25/2012 1:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: from calendar import* Calendar Traceback (most recent call last): File pyshell#9, line 1, inmodule Calendar NameError: name 'Calendar' is not defined

Re: from calendar import* doesn't import everything

2012-04-24 Thread Justin Ezequiel
see http://docs.python.org/tutorial/modules.html#importing-from-a-package http://stackoverflow.com/questions/2187583/whats-the-python-all-module-level-variable-for I know the 1st link is for importing from a package but the same applies for modules --

Re: from calendar import* doesn't import everything

2012-04-24 Thread Kiuhnm
On 4/25/2012 1:54, Rotwang wrote: On 25/04/2012 00:42, Kiuhnm wrote: On 4/25/2012 1:18, Rotwang wrote: Sorry if this is a stupid question, but what is up with this: from calendar import* Calendar Traceback (most recent call last): File pyshell#9, line 1, inmodule Calendar NameError: name

generate random numbers in a deterministic way

2012-04-24 Thread Jabba Laci
Hi, I'm working with some sorting algorithms and I want to compare their efficiency. One test fills a list with one million random integers, which serves as input for the algorithms. However, if this list is different each time I run the tests, the tests wouldn't be fair. At the moment the

[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack

2012-04-24 Thread frank
New submission from frank zhang.guoc...@zte.com.cn: #0 0x1dbaa480:0 in PyObject_GC_UnTrack () at Modules/gcmodule.c:1149 1149Modules/gcmodule.c: No such file or directory. in Modules/gcmodule.c (gdb) where #0 0x1dbaa480:0 in PyObject_GC_UnTrack () at

[issue3177] Add shutil.open

2012-04-24 Thread Hobs
Hobs hobsonl...@gmail.com added the comment: I can see why this partial implementation of `operation` in this ver seems useless. But it is a placeholder for eventually providing Linux/Mac users with the same functionality as windows. The os.startfile() or shutil.launch() function can easily fill

[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack

2012-04-24 Thread frank
frank zhang.guoc...@zte.com.cn added the comment: in addtion, the version of our python is 2.3.4 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14659 ___

[issue14657] Avoid two importlib copies

2012-04-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: So why the mutation? Are you that worried someone is going to import importlib._bootstrap directly? Well, importing importlib *does* import importlib._bootstrap, and creates another copy of the module. importlib.__import__ is then wired to

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Thank you, Antoine. It is interesting results, that on 64 bits greatly accelerated the case, which on 32 bits sped up a little. It was the pathology that a 2-byte to UCS1 was decoded in 1.5x slower than a 2-byte to UCS2. Interestingly, a

[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack

2012-04-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The complete call stack shows that Python is embedded in another application (OCPro). The issue is most probably with this application which makes a bad usage of the C Python API, or somehow overwrites memory. I suggest that you

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25338/utf8-signed.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14654 ___

[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack

2012-04-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: In addition, Python 2.3.4 is completely outdated. The current supported versions are 2.7.x and 3.2.x. I recommend you upgrade your Python before posting further bug reports. -- nosy: +pitrou status: pending - closed

[issue14657] Avoid two importlib copies

2012-04-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This would also mean that changes to importlib._bootstrap would actually take effect for user code almost immediately, *without* rebuilding Python, as the frozen version would *only* be used to get hold of the pure Python version. Actually,

[issue14657] Avoid two importlib copies

2012-04-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: This would also mean that changes to importlib._bootstrap would actually take effect for user code almost immediately, *without* rebuilding Python, as the frozen

[issue12892] UTF-16 and UTF-32 codecs should reject (lone) surrogates

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: * fix an error in the error handler for utf-16-le. (In, Python3.2 b'\xdc\x80\x00\x41'.decode('utf-16-be', 'ignore') returns \x00 instead of A for some reason) The patch for issue14579 fixes this in Python 3.2. The patch for

[issue2857] Add java modified utf-8 codec

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: As far as I understand, this codec can be implemented in Python. There is no need to modify the interpreter core. def decode_cesu8(b): return re.sub('[\uD800-\uDBFF][\uDC00\DFFF]', lambda m: chr(0x1 | ((ord(m.group()[0]) 0x3FF)

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
New submission from Eric V. Smith e...@trueblade.com: I have created a branch features/pep-420 where I'll be developing a proof of concept implementation of PEP 420. I've checked in a basic version, but it has these issues: - We need to decide how finders communicate that they've found part

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'm -1 on using signed char in the implementation. If this gives any advantage, it's because the compiler is not able to generate as efficient code for unsigned char as it does for signed char. So the performance results may again change

[issue2857] Add java modified utf-8 codec

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Serhiy: your functions to not constitute a Python codec. For example, there is no support for error handlers in them. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I'm -1 on using signed char in the implementation. I completely agree with you, for these and for other not mentioned reasons. So I don't released this patch yesterday, and did not suggest it to accept. I showed him just out of curiosity

[issue14579] Vulnerability in the utf-16 decoder after error handling

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Now I see the problem: make_decode_exception creates a new bytes object in any case, regardless of whether the error handler will update it or not. Therefore, decoding will continue in this new bytes object. I think the same issue also

[issue2857] Add java modified utf-8 codec

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Serhiy: your functions to not constitute a Python codec. For example, there is no support for error handlers in them. Yes, it is not a codec in Python library terminology. It's just a pair of functions, the COder and DECoder, which is

[issue2857] Add java modified utf-8 codec

2012-04-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Ok, I'm closing this entire issue as won't fix, then. There apparently is a need for functionality like this, but there is apparently also a concern that this is too specialized for the standard library. As it is possible to implement this

[issue14579] Vulnerability in the utf-16 decoder after error handling

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I think the same issue also applies to the ASCII decoder in 3.3. No, the ASCII decoder is not affected by this vulnerability. In a loop, in which unicode_decode_call_errorhandler is called, do not use any cached and not-updatable data.

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Failing to maintain GC tracking in setdefault and copy (for split-tables) Patch attached -- Added file: http://bugs.python.org/file25339/gc_tracking.patch ___ Python tracker rep...@bugs.python.org

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-24 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14658 ___ ___

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread Stefano Taschini
Stefano Taschini tasch...@ieee.org added the comment: Shouldn't this be reopened for Python 2.7 ? -- type: - behavior versions: +Python 2.7 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't think so. We aren't promising unicode support in pydoc in 2.x, and it is too late to add it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1065986

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-24 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14658 ___ ___ Python-bugs-list

[issue11603] Python crashes or hangs when rebinding __repr__ as __str__

2012-04-24 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I claim the correct behavior of this is actually to give an recursion provoked RuntimeError. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 507a6703d6a3 by Benjamin Peterson in branch 'default': fix dict gc tracking (#13903) http://hg.python.org/cpython/rev/507a6703d6a3 -- ___ Python tracker

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-24 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: My bad. For some reason I assumed that the latest patch would be at the top of the files list. David, the patch is good. Should I go ahead and commit? -- ___ Python tracker

[issue14605] Make import machinery explicit

2012-04-24 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Of course you did because you just like making my life a living hell when it comes to the __file__ attribute. =) OK, I will have another look when I get home, but last time I dealt with this the issue is some tests expect a relative path while

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-24 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Great to hear, Alexander. Thanks for reviewing! Is it also possible to get the pyhton2.7 version one in? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Loaders are not meant to have a find_module method; that is purely for finders which can be distinct objects. So having a namespace loader is expected and there is no expectation that it have a find_module method (actually almost all of the

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-24 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: On Tue, Apr 24, 2012 at 10:42 AM, Joe Peterson rep...@bugs.python.org wrote: ..  Is it also possible to get the pyhton2.7 version one in? I don't see any reason not to. This is a bug fix and should go into a maintenance

[issue13756] Python3.2.2 make fail on cygwin

2012-04-24 Thread Lohoris
Changes by Lohoris loo...@gmail.com: -- nosy: +Lohoris type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13756 ___ ___

[issue14605] Make import machinery explicit

2012-04-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Brett Cannon wrote: I am not exposing SourcelessFileLoader because importlib publicly tries to discourage the shipping of .pyc files w/o their corresponding source files. Otherwise all objects as used by importlib for performing imports

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Right, that's a typo. I meant load_module(). I'm currently working on implementing the loader for namespace modules, so my comment about the loader is premature. -- ___ Python tracker

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: If you are satisfied with the time logic then yes, please apply it. I suspect that the number of people using the code and not aware of the problem (or not caring enough to do anything about it) exceeds the number aware of it who have

[issue11603] Python crashes or hangs when rebinding __repr__ as __str__

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 971865f12377 by Benjamin Peterson in branch '3.2': don't use a slot wrapper from a different special method (closes #14658) http://hg.python.org/cpython/rev/971865f12377 --

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 971865f12377 by Benjamin Peterson in branch '3.2': don't use a slot wrapper from a different special method (closes #14658) http://hg.python.org/cpython/rev/971865f12377 New changeset 0c1c8f8955d8 by Benjamin

[issue14657] Avoid two importlib copies

2012-04-24 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: To start, I'm *not* going to make the final call on this issue's solution. I'm inches away from importlib burnout and general integration frustration with trying to clean up the implicit behaviour. So to prevent me from making a bad decision I

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e3eda2d91e93 by Benjamin Peterson in branch '2.7': don't use a slot wrapper from a different special method (closes #14658) http://hg.python.org/cpython/rev/e3eda2d91e93 --

[issue11603] Python crashes or hangs when rebinding __repr__ as __str__

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e3eda2d91e93 by Benjamin Peterson in branch '2.7': don't use a slot wrapper from a different special method (closes #14658) http://hg.python.org/cpython/rev/e3eda2d91e93 --

[issue14605] Make import machinery explicit

2012-04-24 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: That initial comment is out-of-date. If you look that the commit I made I documented importlib.machinery._SourcelessFileLoader. I am continuing the discouragement of using bytecode files as an obfuscation technique (because it's a bad one),

[issue14657] Avoid two importlib copies

2012-04-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le mardi 24 avril 2012 à 15:10 +, Brett Cannon a écrit : Both get the same outcome but with different approaches, it's just a question of which one is easiest to maintain. I don't have any strong preference. Nick's proposal sounds slightly

[issue13934] sqlite3 test typo

2012-04-24 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: poq, would you like to also prepare a patch for the documentation with what Thomas suggested? I'd be happy to review when ready -- nosy: +sandro.tosi ___ Python tracker rep...@bugs.python.org

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread Stefano Taschini
Stefano Taschini tasch...@ieee.org added the comment: Oh well, in that case I guess we'll have to work around it. Here's the monkey patch I use to overcome this limitation in pydoc, in case others wish to add it to their PYTHONSTARTUP or sitecustomize: def pipepager(text, cmd): Page

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I created the NamespaceLoader in the feature branch. It has a load_module, but it's only ever called by the code in PathFinder.load_module: loader = NamespaceLoader(namespace_path) return

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Failed to differentiate between failure and error in make_split_table(). Patch attached -- Added file: http://bugs.python.org/file25340/make_split_table_error.patch ___ Python tracker

[issue13587] Correcting the typos error in Doc/howto/urllib2.rst

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4dda3000c932 by Sandro Tosi in branch '2.7': Issue #13587: use the right RFC2617 name for WWW-Authenticate; patch by Aaron Maenpaa http://hg.python.org/cpython/rev/4dda3000c932 New changeset 01abffa8842a by Sandro

[issue13587] Correcting the typos error in Doc/howto/urllib2.rst

2012-04-24 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Aaron: thanks for the patch! -- nosy: +sandro.tosi resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue14660] Implement PEP 420: Implicit Namespace Packages

2012-04-24 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Yeah, having to pass in the name to load_module is silly. I'm seriously considering making it optional for some loaders when the name was passed in to the constructor. One thing I would like to see is that PathFinder take a new, keyword-only

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: -giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___

[issue13478] No documentation for timeit.default_timer

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 86b927859155 by Sandro Tosi in branch '2.7': Issue #13478: document timeit.default_timer() http://hg.python.org/cpython/rev/86b927859155 New changeset 8165b59a4000 by Sandro Tosi in branch '3.2': Issue #13478:

[issue13478] No documentation for timeit.default_timer

2012-04-24 Thread Sandro Tosi
Changes by Sandro Tosi sandro.t...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13478 ___

[issue1065986] Fix pydoc crashing on unicode strings

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Hmm. Making it not raise an error while still producing useful output would be acceptable as a bug fix if that's all it takes, I think. -- status: closed - open ___ Python tracker

[issue14661] posix module: add O_EXEC, O_SEARCH, O_TTY_INIT

2012-04-24 Thread Pino Toscano
New submission from Pino Toscano toscano.p...@tiscali.it: The posix module exposes already quite some O_* constants, but it misses few POSIX ones (see [1]), but it misses O_EXEC, O_SEARCH, and O_TTY_INIT. The attached patch adds them. [1]

[issue14554] test module: correction

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 22767284de99 by Sandro Tosi in branch '2.7': Issue #14554: correct example for captured_stdout() http://hg.python.org/cpython/rev/22767284de99 New changeset d1ba0421d65f by Sandro Tosi in branch '3.2': Issue #14554:

[issue14554] test module: correction

2012-04-24 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: Thanks for the patch, Tshepang! -- nosy: +sandro.tosi resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

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

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I think that what is going to happen is that both of these functions are going to be deprecated in favor of functions that use datetimes. That said, this might be a worthwhile as a bug fix. I'm adding Alexander as nosy to see what he

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b044e0568be2 by Martin v. Loewis in branch 'default': Account for shared keys in type's __sizeof__ (#13903). http://hg.python.org/cpython/rev/b044e0568be2 -- ___ Python

[issue14657] Avoid two importlib copies

2012-04-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: test me thod. Another option is we hide the source as _importlib or something to allow direct importation w/o any tricks under a protected name. Using the freeze everything approach you make things easier for the implementation, since you

[issue14661] posix module: add O_EXEC, O_SEARCH, O_TTY_INIT

2012-04-24 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14661 ___ ___

[issue14654] More fast utf-8 decoding

2012-04-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Here are two new patches. The first one takes into account the Martin wishes about comments. The second also rejects optimization for ASCII. On the Intel Atom last patch annihilates acceleration for some cases (mostly-ascii with UCS2

[issue14448] Mention pytz in datetime's docs

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e0e421133d0f by Sandro Tosi in branch '2.7': Issue #14448: mention pytz; patch by Andrew Svetlov http://hg.python.org/cpython/rev/e0e421133d0f New changeset 3aec41794584 by Sandro Tosi in branch '3.2': Issue #14448:

[issue14448] Mention pytz in datetime's docs

2012-04-24 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: I've reworded a bit the patch: thanks for it, Andrew -- nosy: +sandro.tosi resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker

[issue14605] Make import machinery explicit

2012-04-24 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Brett Cannon wrote: That initial comment is out-of-date. If you look that the commit I made I documented importlib.machinery._SourcelessFileLoader. I am continuing the discouragement of using bytecode files as an obfuscation technique

[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-24 Thread Fabian Groffen
New submission from Fabian Groffen grob...@gentoo.org: With current working dir an NFS-mounted ZFS share, and /var/tmp (OSX default) HFS+: % echo test /var/tmp/testfile % python Python 2.7.3 (default, Apr 24 2012, 19:33:45) [GCC 4.2.1 (Gentoo 4.2.1_p5666, Apple Inc. build 5666) (dot 3)] on

[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-04-24 Thread Armin Rigo
Armin Rigo ar...@users.sourceforge.net added the comment: Sorry to re-open this issue. The following example shows that it was not fully resolved: def f(): return u'\U00023456abcdef'[3] import dis; dis.dis(f) print f() On a wide build it should print 'c' and on a narrow

[issue14663] Cannot comment out comments

2012-04-24 Thread Nul Character
New submission from Nul Character nulcharac...@gmail.com: When attempting to comment out a comment and thus nullifying it, the interpreter just double comments the line. This behavior works with multiline comments, however, the single line comments double-comment the line. --

[issue14663] Cannot comment out comments

2012-04-24 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: A comment is a comment. *All* characters after the # are ignored, including other #s. Also, Python doesn't have multiline comments. (Well, you can use a triple quoted string as a multiline comment, but it is still a string, and

[issue14369] make __closure__ writable

2012-04-24 Thread Richard Oudkerk
Richard Oudkerk shibt...@gmail.com added the comment: Shouldn't test___closure__() also test what happens when the closure is replaced with None, or a tuple which is too long or too short or contains non-cell objects? All of these things seem to be checked when you create a new function using

[issue14661] posix module: add O_EXEC, O_SEARCH, O_TTY_INIT

2012-04-24 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: I will take care of this. -- assignee: - jcea nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14661 ___

[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: I guess a “best effort” approach would be best here. I presume Python 3.2+ have the same behavior? -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14662

[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-24 Thread Fabian Groffen
Fabian Groffen grob...@gentoo.org added the comment: I presume Python 3.2+ have the same behavior? I cannot compile that or get it working normally, so I can't tell for sure. Judging from the code, I'd say yes. -- ___ Python tracker

[issue14657] Avoid two importlib copies

2012-04-24 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: would be great if we had a command to stop module execution or code execution for a block to make that more elegant, e.g. break at module scope :-) I floated that proposal on python-list a while back and the reaction was mixed. [1]

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

2012-04-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Your strace output looks strange :-) Unless it's truncated, we see that the wait4() doesn't return when the test pthread executable exits... Could you try building this code : #include pthread.h void* routine(void* p){return NULL;}

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5d5b72a71898 by Benjamin Peterson in branch 'default': distiguish between refusing to creating shared keys and error (#13903) http://hg.python.org/cpython/rev/5d5b72a71898 --

[issue14661] posix module: add O_EXEC, O_SEARCH, O_TTY_INIT

2012-04-24 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: I add some other constants too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14661 ___ ___

[issue14632] Race condition in WatchedFileHandler leads to unhandled exception

2012-04-24 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I can't see why this always works, while John's script sometimes fails. It does fail consistently on my machine. I'm attaching the diff just in case. -- Added file: http://bugs.python.org/file25345/test_logging_race.diff

[issue14661] posix module: add O_EXEC, O_SEARCH, O_TTY_INIT

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 34de406f566d by Jesus Cea in branch 'default': Issue #14661: posix module: add O_EXEC, O_SEARCH, O_TTY_INIT http://hg.python.org/cpython/rev/34de406f566d New changeset 2023f48b32b6 by Jesus Cea in branch 'default':

[issue14661] posix module: add O_EXEC, O_SEARCH, O_TTY_INIT

2012-04-24 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14661 ___

[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Now that’s odd. I just looked into the code at http://hg.python.org/cpython/file/2.7/Lib/shutil.py#l103 and there is a guard against EOPNOTSUPP: try: os.chflags(dst, st.st_flags) except OSError, why: if (not hasattr(errno, 'EOPNOTSUPP') or

[issue14160] TarFile.extractfile fails to extract targets of top-level relative symlinks

2012-04-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0adf4fd8df83 by Lars Gustäbel in branch '3.2': Issue #14160: TarFile.extractfile() failed to resolve symbolic links http://hg.python.org/cpython/rev/0adf4fd8df83 New changeset 38df99776901 by Lars Gustäbel in branch

  1   2   >