Re: id( ) function question

2009-10-14 Thread Chris Rebert
On Wed, Oct 14, 2009 at 1:37 PM, Laszlo Nagy gand...@shopzeus.com wrote: Andre Engels schrieb: What is going on is that a few objects that are often used, in particular the small (how small is small depends on the implementation) integers, are 'preloaded'. When one of these is then referred

Re: id( ) function question

2009-10-14 Thread Stephen Hansen
On Wed, Oct 14, 2009 at 1:37 PM, Laszlo Nagy gand...@shopzeus.com wrote: Andre Engels schrieb: None, True, False, NotImplemented are guaranteed to be singletons, all builtin types and exceptions can be considered as singletons, too. I thought that different mutable objects always have

Re: id( ) function question

2009-10-14 Thread Christian Heimes
Chris Rebert wrote: The built-ins aren't mutable, and the singletons are each immutable and/or unique; so in no case do objects that are both different and mutable have the same ID. Correct, the fact allows you to write code like type(egg) is str to check if an object *is* an instance of str.

Re: id( ) function question

2009-10-14 Thread Stephen Hansen
On Wed, Oct 14, 2009 at 4:19 PM, Chris Rebert c...@rebertia.com wrote: Although I have no idea how it is that `id({}) == id({})` as a prior posted showed; FWIW, I can't manage to reproduce that outcome. With Python 2.5.1 on MacOS X, I can; it looks like there's an optimization in there where

Re: The rap against while True: loops

2009-10-14 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes: Why should Python make that guarantee about this hypothetical loop forever construct? It doesn't make much sense for Python as normally practiced. Termination proofs (aka proofs of progress) are used in formal verification systems to

What command should be use when the testing of arguments is failed?

2009-10-14 Thread Peng Yu
I have the following python code snippet. I'm wondering what command I should use to terminate the program if the arguments are not right. #!/usr/bin/env python import sys import os if len(sys.argv) = 1: print usage:, os.path.basename(sys.argv[0]), 'something' return ## what command should

Re: What command should be use when the testing of arguments is failed?

2009-10-14 Thread Joe Riopel
On Wed, Oct 14, 2009 at 8:53 PM, Peng Yu pengyu...@gmail.com wrote: I have the following python code snippet. I'm wondering what command I should use to terminate the program if the arguments are not right. I usually use sys.exit. -- http://mail.python.org/mailman/listinfo/python-list

Re: What command should be use when the testing of arguments is failed?

2009-10-14 Thread Peng Yu
On Wed, Oct 14, 2009 at 7:57 PM, Joe Riopel goo...@gmail.com wrote: On Wed, Oct 14, 2009 at 8:53 PM, Peng Yu pengyu...@gmail.com wrote: I have the following python code snippet. I'm wondering what command I should use to terminate the program if the arguments are not right. I usually use

Re: The rap against while True: loops

2009-10-14 Thread Mensanator
On Oct 14, 6:08�pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 14 Oct 2009 09:34:28 -0700, Mensanator wrote: On Oct 14, 2:19 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator mensana...@aol.com declaimed the

Re: Python XMLRPC question

2009-10-14 Thread prasanna
On Oct 13, 1:22 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 13 Oct 2009 16:55:09 -0300, Falcolas garri...@gmail.com escribió: On Oct 13, 12:47 pm,prasannaprasa...@ix.netcom.com wrote: In using Python's XMLRPC, there is a statement that gets printed on stdout of the

Re: What command should be use when the testing of arguments is failed?

2009-10-14 Thread Xavier Ho
On Thu, Oct 15, 2009 at 10:58 AM, Peng Yu pengyu...@gmail.com wrote: I actually wanted to ask what return code should be returned in this case when the arguments are not right. Thank you1 I think that depends on the design of the program. Is there a return value that would make sense to be

Re: What command should be use when the testing of arguments is failed?

2009-10-14 Thread Cameron Simpson
On 14Oct2009 19:58, Peng Yu pengyu...@gmail.com wrote: | On Wed, Oct 14, 2009 at 7:57 PM, Joe Riopel goo...@gmail.com wrote: | On Wed, Oct 14, 2009 at 8:53 PM, Peng Yu pengyu...@gmail.com wrote: | I have the following python code snippet. I'm wondering what command I | should use to terminate

Re: The rap against while True: loops

2009-10-14 Thread Mensanator
On Oct 14, 12:07�pm, Ethan Furman et...@stoneleaf.us wrote: Mensanator wrote: On Oct 14, 2:19 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator mensana...@aol.com declaimed the following in gmane.comp.python.general: You're not getting

unicode-to-ascii: replace with space, not ?

2009-10-14 Thread Allen Fowler
Hello, I've been using data.encode('ascii','replace') to force an ASCII string out of Unicode data, with ? in the place of non-ASCII letters. However, now I want to use a blank space (or maybe a dash) instead of a question mark. How do I do this? Thank you, :) --

Re: id( ) function question

2009-10-14 Thread Mel
Chris Rebert wrote: Although I have no idea how it is that `id({}) == id({})` as a prior posted showed; FWIW, I can't manage to reproduce that outcome. Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information.

Re: id( ) function question

2009-10-14 Thread Luis Alberto Zarrabeitia Gomez
It's believable if id({}) does the following: 1. Construct an empty dict 2. Take the id of the dict 3. Reduce the reference-count on the now-unneeded dict. It's not too hard for the second empty dict to get allocated in the same memory that the first one (now dereferenced and

Re: What command should be use when the testing of arguments is failed?

2009-10-14 Thread Roger Binns
Peng Yu wrote: I actually wanted to ask what return code should be returned in this case when the arguments are not right. Thank you1 The BSD world attempted to standardize the codes so you may as well use their definitions. You can see them in /usr/include/sysexits.h on your nearest

Re: Python XMLRPC question

2009-10-14 Thread Gabriel Genellina
En Wed, 14 Oct 2009 22:08:09 -0300, prasanna prasa...@ix.netcom.com escribió: Out of curiosity--one more thing I haven't yet figured out, is there a xmlrpc command I can send that stops or restarts the server? If you're using Python 2.6, the easiest way is to register its shutdown()

Re: id( ) function question

2009-10-14 Thread Erik Max Francis
Tim Chase wrote: CPython has the option to cache frequently used items, and does so for a small range of ints. It's not guaranteed behavior (or a guaranteed range) so you shouldn't rely on it, but it's an efficiency thing. In my current version, it looks like it's ints from -5 to 256. YMMV

Re: unicode-to-ascii: replace with space, not ?

2009-10-14 Thread Mark Tolonen
Allen Fowler allen.fow...@yahoo.com wrote in message news:59796.73163...@web45608.mail.sp1.yahoo.com... Hello, I've been using data.encode('ascii','replace') to force an ASCII string out of Unicode data, with ? in the place of non-ASCII letters. However, now I want to use a blank space (or

Re: unicode-to-ascii: replace with space, not ?

2009-10-14 Thread Gabriel Genellina
En Wed, 14 Oct 2009 23:08:53 -0300, Allen Fowler allen.fow...@yahoo.com escribió: I've been using data.encode('ascii','replace') to force an ASCII string out of Unicode data, with ? in the place of non-ASCII letters. However, now I want to use a blank space (or maybe a dash) instead of a

subprocess hangs on reading stdout

2009-10-14 Thread Tim Arnold
Hi, I'm querying a list of network servers for processes belonging to a specific user. The problem is that when I try to read the stdout from the subprocess it sometimes hangs. Not always though. I thought maybe I needed to set unbufferered to true, so at the beginning of the code I set

Re: subprocess hangs on reading stdout

2009-10-14 Thread Minesh Patel
Any ideas? comments on code welcome also. Here's something that I would probably do, there may be better ways. This only works on python2.6 for the terminate() method. import signal import subprocess def timeout_handler(signum, frame): print About to kill process p.terminate() for

Re: python performance on Solaris

2009-10-14 Thread John Nagle
inaf wrote: I have been following this group for quite some time and I figured (after searching enough on google --and on this group-- and not finding anything useful) I could pose this question here. Can anyone shed some light on python's performance on Solaris? Note that multithreaded

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Whatever the value of logMultiprocessing is, I suggest to not import the multiprocessing module if the application did not import it before: something like: if multiprocessing in sys.modules: from multiprocessing import

[issue7111] core dump when stderr is moved

2009-10-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: 3.1 exits silently. Did you use print? pythonw.exe 3.1 sets sys.stdout to None. if you use sys.stdout.write, you get an exception. But print() silently does nothing if the file is None. -- nosy: +amaury.forgeotdarc

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Here is my experimental patch. -- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file15122/samefile.patch ___ Python tracker rep...@bugs.python.org

[issue7111] core dump when stderr is moved

2009-10-14 Thread Peter Eisentraut
Peter Eisentraut pete...@gmx.net added the comment: For what it's worth, the code in question is used here (using import distutils instead of pass): http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/config/python.m4?rev=1.15;content-type=text%2Fx-cvsweb-markup This is obviously a completely

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Whatever the value of logMultiprocessing is, I suggest to not import the multiprocessing module if the application did not import it before: something like: if multiprocessing in sys.modules: from multiprocessing import

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Erik Sandberg
Erik Sandberg sandb...@virtutech.com added the comment: An alternative solution which I would have considered, is to extend stat/fstat on Windows to set st_dev and st_ino to sensible values (based on dwVolumeSerialNumber and nFileIndexLow/High), and then use the POSIX implementations of

[issue7069] inspect.isabstract to return boolean values only

2009-10-14 Thread chuck
chuck jan.hos...@gmail.com added the comment: That's fine with me. Looks like nobody wants to check it in anyways. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7069 ___

[issue7122] multiprocessing.Pool() problem in windows

2009-10-14 Thread Alex
New submission from Alex nabrozi...@gmail.com: Maybe I didn't understand how multiprocessing works but when running the test code below I get 200+ processes in Windows and it never finishes. It works fine on Linux. -- components: Library (Lib) files: prueba.py messages: 93975 nosy:

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: `self.processName` could be a lazily computed property, since it doesn't seem to be used anywhere by default. Something like: _processName = None @property def processName(self): n = self._processName if n is not

[issue7122] multiprocessing.Pool() problem in windows

2009-10-14 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This difference between Unix and Windows is documented there: http://docs.python.org/library/multiprocessing.html#windows Please carefully read the paragraph named Safe importing of main module. You will certainly need to add a

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Peter Saunders
New submission from Peter Saunders p...@fodder.org.uk: I have an example code that works fine on Python 2.6.3, but when run in Python 3.1.1 - after a very short period of time, will go wrong. Summary: We have a queue, and when the queue has something in it (a list), we start a thread to deal

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: extend stat/fstat on Windows to set st_dev and st_ino to sensible values (based on dwVolumeSerialNumber and nFileIndexLow/High) Once I considered this approach, but problems was that nFileIndexLow/High can change every time file

[issue7124] idle.py -n : help() doesn't work in a reopened shell window

2009-10-14 Thread Gregor Lingl
New submission from Gregor Lingl gregorli...@users.sourceforge.net: The following procedure reveals a problem with help: 1) Start IDLE with -n option (no subprocess) 2) Create a script (e. g. helloworld one-liner 3) Run script 4) Close Shell Window 5) Via Menu: Run | Python Shell reopen Shell

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Peter Saunders
Peter Saunders p...@fodder.org.uk added the comment: Further information: it doesn't fail everytime in Python 3.1 - usually 1 in 4, or 1 in 5 times. It never fails with Python 2.6.3 Example output from the script when its failing (python 3.1): Starting data1 Starting data2 Started subproc:

[issue7058] Add some test execution environment protection to regrtest

2009-10-14 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Removed file: http://bugs.python.org/file15107/refactored_environment_checking.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7058 ___

[issue7058] Add some test execution environment protection to regrtest

2009-10-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is an updated patch that doesn't break -j. -- Added file: http://bugs.python.org/file15125/refactored_environment_checking.patch ___ Python tracker rep...@bugs.python.org

[issue7058] Add some test execution environment protection to regrtest

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Looks good to me. Not sure it should be backported though, the patch has become really sizeable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7058

[issue7058] Add some test execution environment protection to regrtest

2009-10-14 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I agree about not backporting the new patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7058 ___

[issue1104249] configure doesn't set up CFLAGS properly

2009-10-14 Thread M Joonas Pihlaja
M Joonas Pihlaja jpihl...@cc.helsinki.fi added the comment: Here's a test case: $ CFLAGS=--haflkhlaiuhfnafkghnaf ./configure; make [... configure does its thing... ] [... make does its thing and completes successfully ...] Expected result: The build fails due to an unknown flag in CFLAGS.

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - jnoller components: +Library (Lib) nosy: +jnoller priority: - normal type: - behavior versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7123

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Erik Carstensen
Erik Carstensen sandb...@virtutech.com added the comment: Once I considered this approach, but problems was that nFileIndexLow/High can change every time file handle is opened, so it's not unique. Ah, I see, then your approach makes sense. There's another part of your patch that I don't

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Acccording to http://blogs.sun.com/chrisg/entry/lwp_park_and_lwp_unpark, the lwp_park() call could point to a mutex which is waiting to be acquired. -- nosy: +pitrou ___ Python tracker

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Peter Saunders
Peter Saunders p...@fodder.org.uk added the comment: Well, if it helps, here is the output of the dtrace script from starting of a loop with the failure, and stopping during the failure. -- Added file: http://bugs.python.org/file15126/dtrace.txt ___

[issue7125] typo (English) in threading.py

2009-10-14 Thread Yinon Ehrlich
New submission from Yinon Ehrlich yino...@users.sourceforge.net: threading.py line 122: cannot release un-aquired lock -- cannot release un-acquired lock -- components: Library (Lib) messages: 93989 nosy: Yinon severity: normal status: open title: typo (English) in threading.py

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Does it not happen if you call your checkAlive() function directly from your main() function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7123

[issue5596] memory leaks in py3k

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: With r75397: test___all__ leaked [1, 1] references, sum=2 test_asyncore leaked [1, 0] references, sum=1 test_distutils leaked [0, 2] references, sum=2 test_httpservers leaked [-259, 0] references, sum=-259 test_os leaked [-23, 23] references,

[issue7125] typo (English) in threading.py

2009-10-14 Thread Yinon Ehrlich
Yinon Ehrlich yino...@users.sourceforge.net added the comment: just saw now that the word 'un-aquired' is repeated several times in the threading module... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7125

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: I'm not sure about this neither. So, XXX is in comment. ;-) On abspath() above, it also tries to import native method _getfullpathname(), and when it fails alternative implementation runs. (probably when someone calls

[issue7126] Contradictory documentation for os.putenv and os.system

2009-10-14 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: The documentation for os.putenv states that changes to the environment affect subprocesses started with os.system(), popen() or fork() and execv() and assignments to items in os.environ are automatically translated into

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As for the dtrace output: I'm not a Solaris expert unfortunately, I was just trying to suggest a possible direction for diagnosing this problem. -- ___ Python tracker rep...@bugs.python.org

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Peter Saunders
Peter Saunders p...@fodder.org.uk added the comment: If you mean, in main() instead of doing: while True: q.put([data1, data2]) t = Process(target=popJobs, args=(q, )) t.start() t.join() and doing: while True: q.put([data1, data2]) popJobs(q) instead. Then, the bug

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Peter Saunders
Peter Saunders p...@fodder.org.uk added the comment: Further oddness: When running the script (i've reduced its size further now, see attached): I get the following output: Reaping PID: 23215 True Started subproc: PID: 23216 : args: data1 Started subproc: PID: 23216 : args: data1 Started

[issue7125] typo (English) in threading.py

2009-10-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r75402. Not backporting, since an exception message is changed. Thanks! -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Notice the Started subprod of the SAME PID and the Same args twice, yet this print only occurs once in the code, and I can't see how this should happen? This is a thread-safety issue in sys.stdout/stderr, it will be fixed in 3.1.2 (see

[issue7126] Contradictory documentation for os.putenv and os.system

2009-10-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r75403. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7126 ___

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-14 Thread Peter Saunders
Peter Saunders p...@fodder.org.uk added the comment: Sorry for the spam on the updates :) - but, its the same thread printing this out too. I changed the print line to: curThread = threading.current_thread() print(Started subproc: PID: %d : args: %s Thread ID: %s %(newJob.pid, str(args),

[issue7127] regrtest -j fails when tests write to stderr

2009-10-14 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: If a test writes to stderr, then the -j (multiprocessing) support in regrtest fails to correctly extract the JSON data from the test output, resulting in a JSON traceback followed by a failure of the worker thread. Antoine has suggested

[issue7128] cPickle looking for non-existent package copyreg

2009-10-14 Thread Joseph C Wang
New submission from Joseph C Wang joequ...@gmail.com: When running cPickle in restricted mode, the module tries to import copyreg which does not appear to exist anywhere. The problem is in cPickle.c 2980 if (PyEval_GetRestricted()) { 2981 /* Restricted execution, get private

[issue7091] Distutils build ignores the --compiler command line option

2009-10-14 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Duplicate of #7068 -- resolution: - duplicate status: open - closed superseder: - 2.6.3 does not use specified compiler ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7091

[issue7112] unicodetype_db.h warning: integer constant is too large for 'long'

2009-10-14 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7112 ___ ___

[issue7065] bytes.maketrans segfaults

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Patch committed in r75404 and r75406. Thanks! -- nosy: +pitrou resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7065

[issue7069] inspect.isabstract to return boolean values only

2009-10-14 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - benjamin.peterson nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7069 ___

[issue7129] 'filling' missing in __all__

2009-10-14 Thread Gregor Lingl
New submission from Gregor Lingl gregorli...@users.sourceforge.net: By oversight the turtle graphics function filling is missing in the __all__ list which is composed by several parts, among them _tg_turtle_functions. So 'filling' has to be added to _tg_turtle_functions a path is attached

[issue7129] 'filling' missing in __all__ ot turtle.py

2009-10-14 Thread Gregor Lingl
Changes by Gregor Lingl gregorli...@users.sourceforge.net: -- title: 'filling' missing in __all__ - 'filling' missing in __all__ ot turtle.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7129

[issue7129] 'filling' missing in __all__ ot turtle.py

2009-10-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r75416. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7129 ___

[issue7116] str.join() should be documented as taking an iterable

2009-10-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r75418. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7116 ___

[issue7130] json uses sre_* modules which may not work on alternate implemenations

2009-10-14 Thread Dino Viehland
New submission from Dino Viehland di...@microsoft.com: Currently the json module is using the sre_* modules to construct it's regular expressions instead of just using the re module directly. Because of this it's taking a dependency on what would appear to be CPython specific implementation

[issue4610] Unicode case mappings are incorrect

2009-10-14 Thread Jeff Senn
Jeff Senn s...@users.sourceforge.net added the comment: Feel free to upload it here. I'm fairly skeptical that it is possible to implement casing correctly in a locale-independent way. Ok. I will try to find time to complete it enough to be readable. Unicode (see sec 3.13) specifies the

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I've fixed a bunch of them: aifc (r75407), test_atexit (r75408), bsddb (r75409), test_calendar (r75410), StringIO (r75411), socket (r75412), sndhdr (r75413), test_memoryio (r75415), test_profilehooks (r75417), test_random (r75419), httplib

[issue1754094] Tighter co_stacksize computation in stackdepth_walk

2009-10-14 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: Committed to the Python 2.x and 3.x trunks. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1754094

[issue7131] Extension module build fails for MinGW: missing vcvarsall.bat

2009-10-14 Thread Dieter Verfaillie
New submission from Dieter Verfaillie diet...@optionexplicit.be: Using Python 2.6.3 on Windows XP, distutils fails building an extension module when mingw32 is specified as the compiler. Distutils fails with the error message Unable to find vcvarsall.bat. Looking back in the subversion history

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a record of stderr after a new regrtest run. -- Added file: http://bugs.python.org/file15129/stderr.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2009-10-14 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: (interestingly, one of the culprits for py3k warnings is lib2to3) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___

[issue7110] Output test failures on stderr in regrtest.py

2009-10-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7110 ___ ___

[issue4610] Unicode case mappings are incorrect

2009-10-14 Thread Jeff Senn
Jeff Senn s...@users.sourceforge.net added the comment: Yikes! I just noticed that u''.title() is really broken! It doesn't really pay attention to word breaks -- only characters that have case. Therefore when there are (caseless) combining characters in a word it's really broken e.g.

[issue6855] ihooks support for relative imports

2009-10-14 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: I've been using this version of ihooks for some time and it seems to work fine. Committing the patch. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed

[issue4152] ihooks module cannot handle absolute imports

2009-10-14 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: Fixed in SVN rev 75423. -- nosy: +nascheme resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4152

[issue1101399] dict subclass breaks cPickle noload()

2009-10-14 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: Applied to 2.x trunk. The 3.x version _pickle.c doesn't have the noload method. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix checked into release26-maint (r75425). Please verify in GAE environment, will make same fix in trunk and py3k once verified. Fixed based on Antoine's message, though not identical to his posted code. -- resolution: - fixed

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Philippe Verdy
New submission from Philippe Verdy verd...@wanadoo.fr: For now, when capturing groups are used within repetitions, it is impossible to capure what they match individually within the list of matched repetitions. E.g. the following regular expression:

[issue4610] Unicode case mappings are incorrect

2009-10-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Jeff Senn wrote: Jeff Senn s...@users.sourceforge.net added the comment: Yikes! I just noticed that u''.title() is really broken! It doesn't really pay attention to word breaks -- only characters that have case. Therefore when

[issue4610] Unicode case mappings are incorrect

2009-10-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Jeff Senn wrote: However .capitalize() is a bit weird; and I'm not sure it isn't incorrectly implemented now: It UPPERCASES the first character, rather than TITLECASING, which is probably wrong in the very few cases where it makes a

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Philippe Verdy
Philippe Verdy verd...@wanadoo.fr added the comment: I'd like to add that the same behavior should also affect the span(index) method of MatchObject, that should also not just return a single (start, end) pair, but that should in this case return a list of pairs, one for each occurence, when

[issue4610] Unicode case mappings are incorrect

2009-10-14 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: .swapcase() is just ...err... dumb^h^h^h^h questionably useful. FWIW, it appears that the original use case (as an Emacs macro) was to correct blocks of text where touch typists had accidentally left the CapsLocks key

[issue812369] module shutdown procedure based on GC

2009-10-14 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Does this patch fix issue1545463 by any chance? I am away from a development box ATM and cannot test the patch myself. -- nosy: +belopolsky ___ Python tracker

[issue812369] module shutdown procedure based on GC

2009-10-14 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- assignee: - gregory.p.smith nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue812369 ___

[issue6855] ihooks support for relative imports

2009-10-14 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Sorry I didn't get to this, Neil. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6855 ___ ___

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Philippe Verdy
Philippe Verdy verd...@wanadoo.fr added the comment: Rationale for the compilation flag: You could think that the compilation flag should not be needed. However, not using it would mean that a LOT of existing regular expressions that already contain capturing groups in repetitions, and for

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Philippe Verdy
Philippe Verdy verd...@wanadoo.fr added the comment: Implementation details: Currently, the capturing groups behave quite randomly in the values returned by MachedObject, when backtracking occurs in a repetition. This proposal will help fix the behavior, because it will also be much easier

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - low ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7132 ___ ___

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Confirmed, the stack limit error is gone now. Thanks!! (There's another error, the import of _scproxy from urllib, but that's easily added to the App Engine SDK's whitelist. I am still concerned about the amount of change in the 2.6 branch,

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: (I don't know why the tracker reopened the issue when I added a comment. Anyway, is the fix going into 2.6.4 or will it have to wait for 2.6.5?) -- ___ Python tracker rep...@bugs.python.org

[issue812369] module shutdown procedure based on GC

2009-10-14 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: It should fix issue1545463 and running a quick test seems to show that it does. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue812369

[issue7132] Regexp: capturing groups in repetitions

2009-10-14 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm skeptical about what you are proposing for the following reasons: 1) it doesn't exist in any other implementation that I know; 2) if implemented as default behavior: * it won't be backward-compatible; * it will increase the

[issue7120] logging depends on multiprocessing

2009-10-14 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Guido van Rossum added the comment: (I don't know why the tracker reopened the issue when I added a comment. Anyway, is the fix going into 2.6.4 or will it have to wait for 2.6.5?) That's OK, I'll close it once I've made the same

[issue6412] Titlecase as defined in Unicode Case Mappings not followed

2009-10-14 Thread Jeff Senn
Jeff Senn s...@users.sourceforge.net added the comment: Referred to this from issue 4610... anyone following this might want to look there as well. -- nosy: +senn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6412

<    1   2   3   >