Re: netCDF4 variable manipulation

2012-02-21 Thread Sheldon
On Feb 21, 12:53 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 20 Feb 2012 12:37:22 -0800, Sheldon wrote: Hi, I'm trying to read a netCDF4 variable from a file (no problem) and then scale it before writing over the original variable in the file. I'm using

Re: netCDF4 variable manipulation

2012-02-21 Thread Chris Rebert
On Tue, Feb 21, 2012 at 12:29 AM, Sheldon shejo...@gmail.com wrote: On Feb 21, 12:53 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Mon, 20 Feb 2012 12:37:22 -0800, Sheldon wrote: Hi, I'm trying to read a netCDF4 variable from a file (no problem) and then scale it

Re: Python as a default shell, replacement of bash, sh, cmd ?

2012-02-21 Thread Serhiy Storchaka
18.02.12 20:58, SherjilOzair написав(ла): Has it been considered to add shell features to python, such that it can be used as a default shell, as a replacement for bash, etc. I'm sure everyone would agree that doing this would make the terminal very powerful. What are your views on this?

xlwt 0.7.3 released!

2012-02-21 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlwt 0.7.3. This release is long overdue and has been over 2.5 years in the making! The highlights: - Added user_set and best_fit attributes to Column class. - Fixed an [Errno 0] Error raised when Worksheet.flush_row_data() was called after

xlrd 0.7.2 released!

2012-02-21 Thread Chris Withers
Hi All, I'm pleased to announce the release of xlrd 0.7.2. This release, like the xlwt release, is long overdue and has been over 2.5 years in the making! The highlights: - All messaging and debug logging is now written to the logfile provided to open_workbook. - Tolerant handling of file

[bug] imaplib case sensitive

2012-02-21 Thread Petite Abeille
Hello, Looks like imaplib is case sensitive, even though the IMAP protocol isn't: (1) Except as noted otherwise, all alphabetic characters are case-insensitive. The use of upper or lower case characters to define token strings is for editorial clarity only.

Re: xlwt 0.7.3 released!

2012-02-21 Thread Karim
Hello chris, Thanks for the greet news! Is there any chance that xlrd read .xlsx format and arrive to decode special unicode instead of firing some unicode Exception? Cheers Karim Le 21/02/2012 10:18, Chris Withers a écrit : Hi All, I'm pleased to announce the release of xlwt 0.7.3.

Re: Should I acquire lock for logging.Handler.flush()?

2012-02-21 Thread Vinay Sajip
On Feb 21, 7:23 am, Fayaz Yusuf Khan fayaz.yusuf.k...@gmail.com wrote: I'm writing a custom logging Handler that sends emails through AWS Simple Email Service using the boto library. As there's a quota cap on how many (200) emails I can send within 24hrs, I think I need to buffer my log

Re: PyKota, Python: AttributeError: 'module' object has no attribute '_quote'

2012-02-21 Thread JohannesTU
Thanks for your advice. The command itself didn't work, but it brought me on the right path and car and engine are running now! ;-) I fixed the problem by copying the correct pg.py-file to the python2.7 path. After that the error didn't show up again and I'm now able to create users etc. Thank

Re: [pyxl] xlrd 0.7.2 released!

2012-02-21 Thread python-excel
Chris Withers wrote: Hi All, I'm pleased to announce the release of xlrd 0.7.2. This release, like the xlwt release, is long overdue and has been over 2.5 years in the making! [...snip...] I've currently only put up .tar.gz sdists, if anyone requires anything else, please explain why

ali

2012-02-21 Thread Umair Ahmed
http://sharecash.org/download.php?file=2652910 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as a default shell, replacement of bash, sh, cmd ?

2012-02-21 Thread Kyle T. Jones
On 2/19/12 2:16 AM, SherjilOzair wrote: Well, if not modify python itself, I was thinking of making another shell, which borrows a lot from python, something like merging bash and python. such that I can do `cd ~/Desktop/dev` and `for i in open('file.txt'): print i` at the some shell. This I

Python LOC, .exe size, and refactoring

2012-02-21 Thread CM
I have an application that I was hoping to reduce a bit the size of its .exe when packaged with py2exe. I'm removing some Python modules such as Tkinter, etc., but now wonder how much I could size I could reduce by refactoring--and therefore shortening--my code. Is there a rule of thumb that

Campaign to raise $200 for python code statistics tool

2012-02-21 Thread umar nawaz
If $200 of contributions are made, I will create a python code statistics tool. To contribute go to this link on invested.in, a crowdfunding site (I cannot use kickstarter because I'm from Canada). http://invested.in/P2127/python-code-statistics-tool --

Re: Should I acquire lock for logging.Handler.flush()?

2012-02-21 Thread Fayaz Yusuf Khan
On Tuesday 21 Feb 2012 12:52:14 PM Vinay Sajip wrote: If you are using SMTPHandler, calling flush() won't do anything. You'll probably need to subclass the handler to implement rate limiting. Oh, no! I'm writing my own handler. https://github.com/fayazkhan/ses_handler/blob/master/ses_handler.py

Re: Python LOC, .exe size, and refactoring

2012-02-21 Thread Steven D'Aprano
On Tue, 21 Feb 2012 19:51:07 -0800, CM wrote: I have an application that I was hoping to reduce a bit the size of its .exe when packaged with py2exe. I'm removing some Python modules such as Tkinter, etc., but now wonder how much I could size I could reduce by refactoring--and therefore

[issue14053] Make patchcheck work with MQ

2012-02-21 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Patch looks good; I've just got one more small suggestion. The variable 'some_applied' in mq_patches_applied isn't really necessary - it would be clearer if you just said: return st.returncode == 0 and bstdout after the call to

[issue13866] {urllib, urllib.parse}.urlencode should not use quote_plus

2012-02-21 Thread Michele Orrù
Changes by Michele Orrù maker...@gmail.com: -- nosy: +maker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13866 ___ ___ Python-bugs-list mailing

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-02-21 Thread Ivan Herman
Changes by Ivan Herman ivan.her...@cwi.nl: -- components: None nosy: ivan_herman priority: normal severity: normal status: open title: urlparse on tel: URI-s misses the scheme in some cases type: behavior versions: Python 2.7 ___ Python tracker

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-02-21 Thread Ivan Herman
New submission from Ivan Herman ivan.her...@cwi.nl: I think that the screen dump below is fairly clear: 10:41 Ivan python Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type help, copyright, credits or license for more

[issue13703] Hash collision security issue

2012-02-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Question: Should sys.flags.hash_randomization be True (1) when PYTHONHASHSEED=0?  It is now. Saying yes working as intended is fine by me. It is documented that PYTHONHASHSEED=0 disables the randomization, so

[issue13703] Hash collision security issue

2012-02-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Gregory P. Smith wrote: Gregory P. Smith g...@krypto.org added the comment: Question: Should sys.flags.hash_randomization be True (1) when PYTHONHASHSEED=0? It is now. The flag should probably be removed - simply because the env var

[issue14072] urlparse on tel: URI-s misses the scheme in some cases

2012-02-21 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14072 ___

[issue13703] Hash collision security issue

2012-02-21 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@gmail.com added the comment: Question: Should sys.flags.hash_randomization be True (1) when PYTHONHASHSEED=0? It is now. Saying yes working as intended is fine by me. It is

[issue14068] problem with re split

2012-02-21 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: 启朗.杨, are you using text.split() in the second case? text.split() splits on any whitespace character including newlines while re.split(text, ) splits on a space. -- nosy: +ramchandra.apte ___

[issue14068] problem with re split

2012-02-21 Thread harvey yang
harvey yang yangqil...@gmail.com added the comment: i am not use it to split whitespace or newline. i use it to split Chinese full stop. and the result is showed at the earlier message. -- ___ Python tracker rep...@bugs.python.org

[issue14068] problem with re split

2012-02-21 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: When you used str split, you had to use a unicode string: content.split(u'。') It's the same with re.split: when I use pattern = re.compile('。') nothing is split, it works much better with: pattern = re.compile(u'。') --

[issue14070] Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True)

2012-02-21 Thread Tim McNamara
Changes by Tim McNamara paperl...@timmcnamara.co.nz: -- title: reload(module, ignore_pyc=True) flag - Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True) ___ Python tracker rep...@bugs.python.org

[issue14034] Add argparse howto

2012-02-21 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I have no objections on adding a howto, and something like the attached patch would be fine with me (though I don't have time to review it in full and trust you to). You might want to coordinate with Issue 13850 a bit - they want a

[issue14068] problem with re split

2012-02-21 Thread Ramchandra Apte
Ramchandra Apte maniandra...@gmail.com added the comment: The problem is not in re, it is because you are passing '。' to re.split which in Python 2.x is actually passed as '\xe3\x80\x82'. You should pass u'。' to re.compile. Could we raise a SyntaxError when in a progam a unicode character is in

[issue13703] Hash collision security issue

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That is a good question. I don't really care either way, but let's say +0 for turning it off when seed == 0. +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703

[issue8033] sqlite: broken long integer handling for arguments to user-defined functions

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e67715b87131 by Petri Lehtinen in branch '3.2': sqlite3: Fix 64-bit integer handling in user functions on 32-bit architectures http://hg.python.org/cpython/rev/e67715b87131 New changeset cf12fe9ce2b0 by Petri

[issue14071] allow more than one hash seed per process (move _Py_HashSecret into PyInterpreterState)

2012-02-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +grahamd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14071 ___ ___ Python-bugs-list mailing

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-02-21 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Latest version looks good to me - I vote for landing it whenever you're ready :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___

[issue14073] allow per-thread atexit()

2012-02-21 Thread Tarek Ziadé
New submission from Tarek Ziadé ziade.ta...@gmail.com: If you try to run the code below and stop it with ctrl+C, it will lock because atexit is never reached. Antoine proposed to add a way to have one atexit() per thread, so we can call some cleanup code when the app shuts down and there are

[issue14073] allow per-thread atexit()

2012-02-21 Thread Tarek Ziadé
Changes by Tarek Ziadé ziade.ta...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073 ___ ___ Python-bugs-list

[issue14073] allow per-thread atexit()

2012-02-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Interpreter Core, Library (Lib) nosy: +neologix type: behavior - enhancement versions: -Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14073

[issue13703] Hash collision security issue

2012-02-21 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Feb 21, 2012, at 09:48 AM, Marc-Andre Lemburg wrote: Exposing the seed value as sys.hashseed would be better and more useful to applications. That makes the most sense to me. -- ___ Python

[issue13703] Hash collision security issue

2012-02-21 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Feb 21, 2012, at 09:48 AM, Marc-Andre Lemburg wrote: The flag should probably be removed - simply because the env var is not a flag, it's a configuration parameter. Exposing the seed value as sys.hashseed would be better and more useful to

[issue10580] Minor grammar change in Python’s MSI installer

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d9e895d07396 by Martin v. Löwis in branch '2.7': Issue #10580: Minor grammar change in Windows installer. http://hg.python.org/cpython/rev/d9e895d07396 -- nosy: +python-dev

[issue10580] Minor grammar change in Python’s MSI installer

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b349c932765a by Martin v. Löwis in branch '3.2': Issue #10580: Minor grammar change in Windows installer. http://hg.python.org/cpython/rev/b349c932765a -- ___ Python

[issue10580] Minor grammar change in Python’s MSI installer

2012-02-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is now fixed in all relevant branches. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10580

[issue13703] Hash collision security issue

2012-02-21 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: +1 to what barry and __ap__ discussed and settled on. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___

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

2012-02-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: For some reason that I'm unable to follow right now, fstat in the crt does this dance to obtain st_mtime: - obtain time stamps using GetFileInformationByHandle - convert ftLastWriteTime using FileTimeToLocalFileTime to LocalFTime - convert

[issue6807] No such file or directory: 'msisupport.dll' in msi.py

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bc66484b0d73 by Martin v. Löwis in branch '3.2': Issue #6807: Run msisupport.mak earlier. http://hg.python.org/cpython/rev/bc66484b0d73 -- nosy: +python-dev ___ Python

[issue6807] No such file or directory: 'msisupport.dll' in msi.py

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e78acdb54841 by Martin v. Löwis in branch '2.7': Issue #6807: Run msisupport.mak earlier. http://hg.python.org/cpython/rev/e78acdb54841 -- ___ Python tracker

[issue6807] No such file or directory: 'msisupport.dll' in msi.py

2012-02-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is now fixed, though in a different way. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6807

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

2012-02-21 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file24590/079ab75d29a4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521950 ___

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

2012-02-21 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I updated the patch to reflect Éric's comments on Rietveld, but there are also some other changes: Previously when punctuation chars were set, wordchars was being augmented by '-'. This was incomplete, so the augmentation is now with

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

2012-02-21 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Plus I also changed a few instances of the anachronism a = a + b to a += b -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1521950

[issue14074] argparse does not allow nargs1 for positional arguments but doesn't allow metavar to be a tuple

2012-02-21 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe tshep...@gmail.com: Here's four commands to demonstrate my problem: My sample code: $ cat prog.py import argparse parse = argparse.ArgumentParser() parse.add_argument(foo, nargs=2, metavar=(foo, bar)) args = parse.parse_args() print(args) This output

[issue12406] msi.py needs updating for Python 3.3

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2fed68cf102a by Martin v. Löwis in branch 'default': Issue #12406: prevent case where shortened name could conflict with short name. http://hg.python.org/cpython/rev/2fed68cf102a --

[issue14060] Implement a CSP-style channel

2012-02-21 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: I'd like to veto changing the meaning of 0, it's going to break somebody's code. It's easy enough to add some other keyword argument to request an unbuffered queue. Other than that, (1) and (2) seem fine to me. Please consider making

[issue8942] __path__ attribute of modules loaded by zipimporter is untested

2012-02-21 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8942 ___ ___ Python-bugs-list

[issue14070] Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True)

2012-02-21 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I don't quite follow what you want. You say you want to *ignore* changes to source files, but that's the whole point of a reload. And I don't see how ignoring bytecode changes anything unless you are mucking with bytecode formats and don't want

[issue14070] Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True)

2012-02-21 Thread Tim McNamara
Tim McNamara paperl...@timmcnamara.co.nz added the comment: No no, I don't want to ignore source files. I want to be able to change a .py file, then reload in the Python shell and for the changes to be applied. At the moment, .pyc files within a project complicate this. --

[issue14075] argparse: unused method?

2012-02-21 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe tshep...@gmail.com: It appears to me that the function I removed (see attached patch) is unused. Since I wasn't sure, I ran the entire test suite, and there wasn't a regression. -- components: Library (Lib) files: rm-unused-function.patch

[issue9098] MSYS build fails with `S_IXGRP' undeclared

2012-02-21 Thread mewalig
mewalig mewa...@gmail.com added the comment: If I am reading this right, then in the below part of the patch, slave_name does not get set before it is used if __MINGW32__ is not defined. this can be fixed by moving the #endif up to the line before slave_name = ptsname(master_fd); /* get

[issue14067] Avoid more stat() calls in importlib

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: While I don't think the delay in noticing filesystem changes is reasonable as the default behaviour, it might be interesting to see how tricky it would be to create a custom importer (for either meta_path or path_hooks) that did this. Mmmh.

[issue14070] Idea: Add a flag to reload from source, e.g. reload(module, ignore_pyc=True)

2012-02-21 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Then I'm not understanding the problem as changes to source trump .pyc files in a reload(). It should make no difference that .pyc files even exist to a reload() as long as source is around. -- status: open - pending

[issue12406] msi.py needs updating for Python 3.3

2012-02-21 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 75990a013d4d by Martin v. Löwis in branch 'default': Issue #12406: Update list of files. http://hg.python.org/cpython/rev/75990a013d4d -- ___ Python tracker

[issue12406] msi.py needs updating for Python 3.3

2012-02-21 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: msi.py is now up-to-date as of 75990a013d4d. If further changes are made to the tree that require further changes to msi.py, a new issue should be opened. -- resolution: - fixed status: open - closed

[issue8033] sqlite: broken long integer handling for arguments to user-defined functions

2012-02-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: Thanks for the patches, Philippe! I committed the latest one after some modifications. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8033

[issue14075] argparse: unused method?

2012-02-21 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14075 ___ ___ Python-bugs-list

[issue14076] sqlite3 module ignores placeholers in CREATE TRIGGER code

2012-02-21 Thread GuGu
New submission from GuGu and...@kostenko.name: When I try to use placeholders in CREATE TRIGGER (for django-denorm module) SQLite module just ignores placeholders and sends `None` to it. For example: In [11]: c.cursor().execute('CREATE TRIGGER test1 after insert on a for each row begin

[issue14075] argparse: unused method?

2012-02-21 Thread Petri Lehtinen
Petri Lehtinen pe...@digip.org added the comment: The _get_args() looks like an obsolete function indeed. However, _AttributeHolder is a base class for other classes, so the function was probably meant to be overridden by a subclass. Steven probably knows the best whether it should be kept or

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Just saw this on a buildbot: == ERROR: test_rapid_restart (test.test_multiprocessing.WithProcessesTestManagerRestart)

[issue14006] Improve the documentation of xml.etree.ElementTree

2012-02-21 Thread Leon Matthews
Leon Matthews l...@lost.co.nz added the comment: The ElementTree.py module has good JavaDoc-style function-level documentation, but as it's not in docstring format, it can't be seen from the interactive help. I'd be willing to convert the current comments into docstrings, as long as I

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I am proposing the following patch to have a better unique filename: diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -129,8 +129,8 @@ def

[issue14075] argparse: unused method?

2012-02-21 Thread Geoffrey Spear
Changes by Geoffrey Spear geoffsp...@gmail.com: -- nosy: +geoffreyspear ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14075 ___ ___

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: LGTM -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14077 ___ ___

[issue14071] allow more than one hash seed per process (move _Py_HashSecret into PyInterpreterState)

2012-02-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: I'm not sure that it could work because many C functions use caches using static variables. Just a random example: int _PyUnicode_HasNULChars(PyObject* s) { static PyObject *nul = NULL; if (nul == NULL) nul =

[issue14053] Make patchcheck work with MQ

2012-02-21 Thread Francisco Martín Brugué
Francisco Martín Brugué franci...@email.de added the comment: Ok! I haven't added NEWS as I thing is easier for the person that applies the patch to simply write the line directly there instead of merging. Is that ok? let me know if something has to be improved. Thanks again for your

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: I am proposing the following patch to have a better unique filename: It's unneeded, O_EXCL ensures the file won't be corrupted. It's actually a regression introduced by de6703671386. My bad. Here's a patch. -- keywords:

[issue14073] allow per-thread atexit()

2012-02-21 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: My take on this is that if wanting to interact with a thread from an atexit callback, you are supposed to call setDaemon(True) on the thread. This is to ensure that on interpreter shutdown it doesn't try and wait on the thread

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I am proposing the following patch to have a better unique filename: It's unneeded, O_EXCL ensures the file won't be corrupted. It's actually a regression introduced by de6703671386. My bad. Here's a patch. But is there still a reason to

[issue14078] Add 'sourceline' property to xml.etree Elements

2012-02-21 Thread Leon Matthews
New submission from Leon Matthews l...@lost.co.nz: The lxml implementation of the ElementTree API puts a `sourceline` property onto every Element object, which I recently found useful when producing diagnostic messages. I think it would be a useful improvement to make the standard library's

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: But is there still a reason to use id(path) then? IIRC, the reason is to avoid having a stale pyc file indefinitely in case of crash: if we always used, let's say, path + '.tmp', if the process crashes before the rename, then all

[issue14075] argparse: unused method?

2012-02-21 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Yeah, the intention was that you could just override _get_args in a subclass to get a better __repr__. I think these days all the argparse classes only have keyword arguments, so _get_args probably isn't necessary anymore. --

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: IIRC, the reason is to avoid having a stale pyc file indefinitely in case of crash: if we always used, let's say, path + '.tmp', if the process crashes before the rename, then all subsequent attempts to write the bytecode will fail because of

[issue14077] sporadic test_multiprocessing failure

2012-02-21 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: But that will also fail if id(path) happens to be fairly deterministic Well, if you always get the same id(path), then yes, but I really doubt it, especially with CPython where it's the object's address (I guess there's the same

[issue14079] Problems with recent test_subprocess changes

2012-02-21 Thread Vinay Sajip
New submission from Vinay Sajip vinay_sa...@yahoo.co.uk: There appears to be a problem with a recent change made to test_subprocess to try and speed it up a bit. The commit with a problem seems to be 834650d63130 by Ross Lagerwall on 12 Feb 2012, and the problem is in test_poll(), which now

[issue14052] importlib mixes up '.' and os.getcwd()

2012-02-21 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: It just happened again on the new FreeBSD-9.0 bot: http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1845/steps/test/logs/stdio ==

[issue14057] Speedup sysconfig startup

2012-02-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: Updated patch: continue to simplify the config parser. Using this patch, Python startup is ~20% faster on my computer. Use http://bugs.python.org/file24447/bench_startup.py to measure startup time. -- Added file:

[issue14057] Speedup sysconfig startup

2012-02-21 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file24572/sysconfig_parser.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14057 ___

[issue13405] Add DTrace probes

2012-02-21 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Dave, I am in Europe (Spain), and I can't afford (money and time) to go to PyCon. If you are going and are interested in pushing this, we can talk about our respectives ideas and plans, to present a consensus plan. --

[issue12801] C realpath not used by os.path.realpath

2012-02-21 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: realpath.patch: - Add os.realpath() - posixpath.realpath() uses os.realpath(), or os.getcwd() if the path is an empty string - os.realpath() uses canonicalize_file_name() if available, or use realpath() with a buffer of MAXPATHLEN

[issue14080] Sporadic test_imp failure

2012-02-21 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1845/steps/test/logs/stdio == FAIL: test_package___file__ (test.test_imp.PEP3147Tests)

[issue14080] Sporadic test_imp failure

2012-02-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Updated build URL (the buildbot changed name): http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/1845/steps/test/logs/stdio -- ___ Python tracker rep...@bugs.python.org

[issue14068] problem with re split

2012-02-21 Thread harvey yang
harvey yang yangqil...@gmail.com added the comment: i see. thanks :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14068 ___ ___

[issue14081] Allow maxsplit argument to str.split() to be passed as a keyword argument

2012-02-21 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Currently, setting maxsplit for the default any whitespace behaviour requires the following cryptic incantation: 'do re mi fa'.split(None, 1) That would be significantly more comprehensible as: 'do re mi fa'.split(maxsplit=1) (I

[issue14068] problem with re split

2012-02-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: As long as you don't mix str and unicode everything works. With strings: s = '与清新。阿德莱' re.split('。', s) ['\xe4\xb8\x8e\xe6\xb8\x85\xe6\x96\xb0', '\xe9\x98\xbf\xe5\xbe\xb7\xe8\x8e\xb1'] s.split('。')

[issue5411] Add xz support to shutil

2012-02-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +hynek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5411 ___ ___ Python-bugs-list mailing list

[issue14082] shutil doesn't support extended attributes

2012-02-21 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: shutil doesn't provide any function which copies extended attributes on files. Note that cp -a does copy xattrs, but cp -p doesn't (and copy2() claims to work like cp -p). -- components: Library (Lib) messages: 153922 nosy:

[issue14083] Use local timezone offset by default in datetime.timezone

2012-02-21 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Currently, datetime.timezone requires that the offset be specified explicitly. It would be more convenient if the local offset was used by default. Since the time module already exposes the offset details for the local timezone, this would

[issue14081] Allow maxsplit argument to str.split() to be passed as a keyword argument

2012-02-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: +1 Patch attached. -- assignee: - ezio.melotti keywords: +patch nosy: +ezio.melotti stage: needs patch - commit review Added file: http://bugs.python.org/file24597/issue14081.diff ___ Python

[issue14083] Use local timezone offset by default in datetime.timezone

2012-02-21 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: The problem with this idea is that while evaluating datetime.datetime.now(datetime.timezone()), python will have to query the real time clock twice (first in timezone() and then in now()). At a particularly unfortunate

[issue14079] Problems with recent test_subprocess changes

2012-02-21 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: This was hopefully fixed in e5a94b56d6bc. Was it one of the buildbots that was failing? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14079

[issue14083] Use local timezone offset by default in datetime.timezone

2012-02-21 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Marking as a duplicate of #9527. If that API is added, the local fixed offset timezone will be accessible as datetime.datetime.localtime().tzinfo which would be simple enough. -- resolution: - duplicate superseder: - Add aware local

[issue14083] Use local timezone offset by default in datetime.timezone

2012-02-21 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14083 ___ ___ Python-bugs-list

  1   2   >