SQLObject 1.3.2 and 1.2.4

2012-10-20 Thread Oleg Broytman
Hello! I'm pleased to announce versions 1.3 2 and 1.2.4, minor bugfix releases of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to

Re: Preventing crap email from google?

2012-10-20 Thread rusi
On Oct 20, 8:35 am, Michael Torrie torr...@gmail.com wrote: On 10/19/2012 06:43 PM, Mark Lawrence wrote: Good morning/afternoon/evening all, Is there any possibility that we could find a way to prevent the double spaced rubbish that comes from G$ infiltrating this ng/ml?  For example,

Re: A desperate lunge for on-topic-ness

2012-10-20 Thread rusi
On Oct 20, 8:27 am, Tim Chase python.l...@tim.thechases.com wrote: On 10/19/12 17:14, Steven D'Aprano wrote: Code never *needs* to be long, because it can always be shortened. I advocate one bit per line: 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1

How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Jennie
The dir() built-in does not show the __name__ attribute of a class: '__name__' in Foo.__dict__ False Foo.__name__ 'Foo' I implementd my custom __dir__, but the dir() built-in do not want to call it: class Foo: ... @classmethod ... def __dir__(cls): ... return ['python']

Re: How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Peter Otten
Jennie wrote: The dir() built-in does not show the __name__ attribute of a class: '__name__' in Foo.__dict__ False Foo.__name__ 'Foo' I implementd my custom __dir__, but the dir() built-in do not want to call it: class Foo: ... @classmethod ... def __dir__(cls): ...

Re: Preventing crap email from google?

2012-10-20 Thread Jorgen Grahn
On Sat, 2012-10-20, Michael Torrie wrote: On 10/19/2012 06:43 PM, Mark Lawrence wrote: Good morning/afternoon/evening all, Is there any possibility that we could find a way to prevent the double spaced rubbish that comes from G$ infiltrating this ng/ml? For example, does Python have

Re: How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Jennie
On 10/20/2012 10:24 AM, Peter Otten wrote: So if you want to customise dir(Foo) you have to modify the metaclass: class Foo: ... class __metaclass__(type): ... def __dir__(self): return [python] ... dir(Foo) ['python'] Hi Peter, thanks for your answer, but it does not

SQLObject 1.3.2 and 1.2.4

2012-10-20 Thread Oleg Broytman
Hello! I'm pleased to announce versions 1.3 2 and 1.2.4, minor bugfix releases of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to

Re: How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Peter Otten
Jennie wrote: On 10/20/2012 10:24 AM, Peter Otten wrote: So if you want to customise dir(Foo) you have to modify the metaclass: class Foo: ... class __metaclass__(type): ... def __dir__(self): return [python] ... dir(Foo) ['python'] Hi Peter, thanks for your

Re: use of exec()

2012-10-20 Thread lars van gemerden
On Saturday, October 20, 2012 4:00:55 AM UTC+2, Chris Angelico wrote: On Sat, Oct 20, 2012 at 10:43 AM, lars van gemerden l...@rational-it.com wrote: Do you have any ideas about to what extend the lambda version of the code (custom code is only the 'body' of the lambda function) has the

Re: How to see the __name__ attribute of a class by using dir()

2012-10-20 Thread Jennie
On 10/20/2012 11:43 AM, Peter Otten wrote: In Python 3 the way to specify the metaclass has changed: class FooType(type): ... def __dir__(self): return [python] ... class Foo(metaclass=FooType): ... pass ... dir(Foo) ['python'] Thanks! :) -- Jennie --

Re: Python on Windows

2012-10-20 Thread Gisle Vanem
Tim Golden m...@timgolden.me.uk wrote: In general, you'll want to be using a mechanism such as pip: http://pypi.python.org/pypi/pip which will look things up on PyPI so you can just do pip install newmodule. And if you have a pip.bat from some Perl installation sitting before python's

Tips on Caring Adapter (Charger) Laptop

2012-10-20 Thread teamnine
Charger or laptop adapter is often damaged when the use and improper storage. In fact, the adapter works for supplying power to the laptop, and if the conditions are not good can cause damage to your laptop. Use the correct adapter will help reduce the risk of damage to your laptop and keep money

Re: A desperate lunge for on-topic-ness

2012-10-20 Thread Grant Edwards
On 2012-10-20, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Strangely, we've gone from 80-character fixed width displays to who-knows-what (if I drop my font size I can probably get nearly 200 characters across in full-screen mode)... But at the same time we've gone from

Re: Preventing crap email from google?

2012-10-20 Thread Grant Edwards
On 2012-10-20, Michael Torrie torr...@gmail.com wrote: On 10/19/2012 06:43 PM, Mark Lawrence wrote: Good morning/afternoon/evening all, Is there any possibility that we could find a way to prevent the double spaced rubbish that comes from G$ infiltrating this ng/ml? For example, does

Re: A desperate lunge for on-topic-ness

2012-10-20 Thread Joshua Landau
On 20 October 2012 15:18, Grant Edwards invalid@invalid.invalid wrote: On 2012-10-20, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: Strangely, we've gone from 80-character fixed width displays to who-knows-what (if I drop my font size I can probably get nearly 200 characters across

Interest in seeing sh.py in the stdlib

2012-10-20 Thread Andrew Moffat
Hi, I'm the author of sh.py, a subprocess module rewrite for Linux and OSX. It serves as a powerful and intuitive interface to launching subprocesses http://amoffat.github.com/sh/. It has been maintained on github https://github.com/amoffat/sh for about 10 months and currently has about 25k

Re: A desperate lunge for on-topic-ness

2012-10-20 Thread David Robinow
On Sat, Oct 20, 2012 at 3:10 PM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sat, 20 Oct 2012 14:18:47 + (UTC), Grant Edwards invalid@invalid.invalid declaimed the following in gmane.comp.python.general: True, but nobody prints source code out on paper do they? Seriously -- I

Re: A desperate lunge for on-topic-ness

2012-10-20 Thread Walter Hurry
On Sat, 20 Oct 2012 14:18:47 +, Grant Edwards wrote: True, but nobody prints source code out on paper do they? Seriously -- I can't remember the last time I printed souce code... I remember my first IT job - COBOL programming in the early 80's. The rule was that every time we delivered

Re: Preventing crap email from google?

2012-10-20 Thread Walter Hurry
On Sat, 20 Oct 2012 01:43:03 +0100, Mark Lawrence wrote: Good morning/afternoon/evening all, Is there any possibility that we could find a way to prevent the double spaced rubbish that comes from G$ infiltrating this ng/ml? For example, does Python have anybody who works for G$ who could

Re: A desperate lunge for on-topic-ness

2012-10-20 Thread Roy Smith
In article 5081d0c3$0$30003$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Some code might be more conveniently written as a single long line. But I would argue that nearly never is code more easily *read* as a single long line, and since

Preserving unicode filename encoding

2012-10-20 Thread Julien Phalip
Hi, I've noticed that the encoding of non-ascii filenames can be inconsistent between platforms when using the built-in open() function to create files. For example, on a Ubuntu 10.04.4 LTS box, the character u'ş' (u'\u015f') gets encoded as u'ş' (u's\u0327'). Note how the two characters look

'generator ignored GeneratorExit''

2012-10-20 Thread Charles Hixson
If I run the following code in the same module, it works correctly, but if I import it I get the message: Exception RuntimeError: 'generator ignored GeneratorExit' in generator object getNxtFile at 0x7f932f884f50 ignored def getNxtFile (startDir, exts = [txt, utf8]): try: for

Re: 'generator ignored GeneratorExit''

2012-10-20 Thread MRAB
On 2012-10-20 21:03, Charles Hixson wrote: If I run the following code in the same module, it works correctly, but if I import it I get the message: Exception RuntimeError: 'generator ignored GeneratorExit' in generator object getNxtFile at 0x7f932f884f50 ignored def getNxtFile (startDir, exts

Re: change the first letter into uppercase (ask)

2012-10-20 Thread contro opinion
the pattern `re.compile(.(?#nyh2p){0,1})` , make me confused, can you explain how it can match the first letter of every word? 2012/10/20 Dennis Lee Bieber wlfr...@ix.netcom.com On Sat, 20 Oct 2012 01:03:46 -0400, Zero Piraeus sche...@gmail.com declaimed the following in

SQLAlchemy: How to do Table Reflection and MySQL?

2012-10-20 Thread Nick Sabalausky
Hi, I'm fairly new to Python, and I'm trying to figure out how to use SQLAlchemy to connect to a MySQL DB and use table reflection to set up SQLAlchemy's tables. But the SQLAlchemy documentation is gigantic and frankly kinda making my head spin, so I'm having trouble even finding any information

Re: 'generator ignored GeneratorExit''

2012-10-20 Thread Ian Kelly
On Sat, Oct 20, 2012 at 2:03 PM, Charles Hixson charleshi...@earthlink.net wrote: If I run the following code in the same module, it works correctly, but if I import it I get the message: Exception RuntimeError: 'generator ignored GeneratorExit' in generator object getNxtFile at 0x7f932f884f50

Re: Preserving unicode filename encoding

2012-10-20 Thread Nobody
On Sat, 20 Oct 2012 13:43:16 -0700, Julien Phalip wrote: I've noticed that the encoding of non-ascii filenames can be inconsistent between platforms when using the built-in open() function to create files. For example, on a Ubuntu 10.04.4 LTS box, the character u'ş' (u'\u015f') gets encoded

Re: change the first letter into uppercase (ask)

2012-10-20 Thread Ian Kelly
On Sat, Oct 20, 2012 at 5:14 PM, contro opinion contropin...@gmail.com wrote: the pattern `re.compile(.(?#nyh2p){0,1})` , make me confused, can you explain how it can match the first letter of every word? It doesn't. pattern = re.compile(.(?#nyh2p){0,1}) pattern.findall(a test of

Re: change the first letter into uppercase (ask)

2012-10-20 Thread MRAB
On 2012-10-21 00:14, contro opinion wrote: the pattern `re.compile(.(?#nyh2p){0,1})` , make me confused, can you explain how it can match the first letter of every word? It matches all of the characters, plus an empty string at the end. It's equivalent to: result = for c in a test

Re: change the first letter into uppercase (ask)

2012-10-20 Thread Ian Kelly
On Sat, Oct 20, 2012 at 1:30 PM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: for match in re.findall(pattern, a test of capitalizing): ... result = f(result + match) result = result + f(match) Or closer... Don't both with f and str.capitalize result = result +

Re: 'generator ignored GeneratorExit''

2012-10-20 Thread Charles Hixson
On 10/20/2012 04:28 PM, Ian Kelly wrote: On Sat, Oct 20, 2012 at 2:03 PM, Charles Hixson charleshi...@earthlink.net wrote: If I run the following code in the same module, it works correctly, but if I import it I get the message: Exception RuntimeError: 'generator ignored GeneratorExit'

Re: 'generator ignored GeneratorExit''

2012-10-20 Thread Cameron Simpson
On 20Oct2012 16:41, Charles Hixson charleshi...@earthlink.net wrote: | On 10/20/2012 04:28 PM, Ian Kelly wrote: | On Sat, Oct 20, 2012 at 2:03 PM, Charles Hixson | try: | fil=open (path, encoding = utf-8-sig) | yieldfil |

Re: 'generator ignored GeneratorExit''

2012-10-20 Thread Hans Mulder
On 21/10/12 01:41:37, Charles Hixson wrote: On 10/20/2012 04:28 PM, Ian Kelly wrote: On Sat, Oct 20, 2012 at 2:03 PM, Charles Hixson charleshi...@earthlink.net wrote: If I run the following code in the same module, it works correctly, but if I import it I get the message: Exception

Re: pls help me with this prog

2012-10-20 Thread Tim Roberts
inshu chauhan insidesh...@gmail.com wrote: but i want to calculate it for every 3 points not the whole data, but instead of giving me centre for every 3 data the prog is printing the centre 3 times... def main (data): j = 0 for i in data[:3]: while j != 3: centre =

Re: overriding equals operation

2012-10-20 Thread Joshua Landau
On 17 October 2012 09:14, Mark Lawrence breamore...@yahoo.co.uk wrote: On 17/10/2012 05:16, 8 Dihedral wrote: What you really want is b=a.copy() not b=a to disentangle two objects. __eq__ is used in the comparison operation. The winner Smartest Answer by a Bot Award 2012 :)

[issue16286] Optimize a==b and a!=b for bytes and str

2012-10-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: something to include in your statistics is the lengths of the already hashed data being compared. i expect there to be a minimum length before this optimization is useful. -- nosy: +gregory.p.smith ___ Python

[issue16278] os.rename documentation slightly inaccurate

2012-10-20 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: -- nosy: +Todd.Rovito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16278 ___ ___ Python-bugs-list

[issue16289] Update devguide for 3.4

2012-10-20 Thread Ned Deily
New submission from Ned Deily: The Developer's Guide needs to be updated to reflect the release of 3.3. Primarily, this involves adding the 3.3 branch and updating the sequence of branch names and other release number references. The attached patch does so. It's pretty much a

[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can reproduce this on Linux (3.3+ only): $ name=$(printf \xff) $ echo print('Hello, world') $name $ ./python $name python: failed to set __main__.__loader__ The issue is in PyRun_SimpleFileExFlags() function, which gets raw char * as the file name (the

[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which fixes filename decoding error in PyRun_SimpleFileExFlags(). -- keywords: +patch Added file: http://bugs.python.org/file27630/pythonrun_filename_decoding.patch ___ Python tracker

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Library (Lib) nosy: +larry, serhiy.storchaka versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872 ___

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +3.3regression ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872 ___ ___

[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In a normal loop we copy into the output buffer for each iteration the element and the separator. As you know, the processor can copy large amounts of data several times more efficiently than byte-for-byte. Therefore, filling the buffer by memset more

[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread STINNER Victor
STINNER Victor added the comment: The patch looks correct, but a test is missing. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218 ___

[issue16236] Doc/Makefile should have $PYTHON=python2

2012-10-20 Thread Michele Orrù
Michele Orrù added the comment: The patch should not unconditionally use `python2` since many distributions do not yet install a `python2` link to the interpreter nor is there one when running python2.7 from a build directory. The Makefile could conditionally try `python2` and then

[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, but does it really make a difference and in which cases? In other words, do you have benchmark numbers? :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12805

[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson
New submission from Mark Dickinson: See thread starting at http://mail.python.org/pipermail/python-dev/2012-October/122241.html The cmath module functions don't accept custom types that define __complex__, but whose __complex__ method returns a float rather than a complex number: Python

[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch -- keywords: +patch Added file: http://bugs.python.org/file27631/issue16290.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16290 ___

[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - test needed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218 ___

[issue16289] Update devguide for 3.4

2012-10-20 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16289 ___ ___ Python-bugs-list mailing

[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Where we have tests for Python launch? I can't find. runpy is not affected. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218 ___

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a tests for most of fixed overflows. Some errors are difficult or impossible to reproduce. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989

[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27632/long_aslong_overflow_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15989 ___

[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch LGTM. Is there a new feature, not a bugfix? If yes, then I expect some documentation changes. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16290

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: +self.assertEqual(shutil.rmtree(os.path.join(tmpdir, tstfile), + ignore_errors=True), None) I wouldn't use assertEqual as the return value is not meaningful. -- nosy: +giampaolo.rodola

[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson
Mark Dickinson added the comment: Is there a new feature, not a bugfix? There's an ongoing argument about that on the python-dev thread. :-) But yes, I think this needs a doc update---even if it's considered a bugfix, the current docs could be clarified.

[issue5128] compileall: consider ctime

2012-10-20 Thread Djoume Salvetti
Djoume Salvetti added the comment: This patch introduces a slight change in behaviour. Now compilation will only happen if there is a difference in the number of seconds in the timestamp of files, before this patch any difference in mtime will trigger a rebuild. This is because the timestamp

[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-20 Thread Mark Dickinson
Mark Dickinson added the comment: A new patch (with tests), and a fuller explanation: At work, we've got Python talking to a customer's existing COM library; we're using Thomas Heller's 'comtypes' library to do that. Unfortunately, comtypes depends quite a lot on __del__-time cleanup, so

[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-20 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +jnoller, sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16284 ___ ___ Python-bugs-list

[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My interpretation of that is that __int__ should return an int, __float__ a float, __complex__ a complex number; It's a reasonable interpretation. Changing it can be confusing. On the other hand, int and float look like specialized subclasses of complex

[issue2350] 'exceptions' import fixer

2012-10-20 Thread Chris Mayo
Changes by Chris Mayo aklh...@gmail.com: -- nosy: +cjmayo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2350 ___ ___ Python-bugs-list mailing list

[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson
Mark Dickinson added the comment: This means that you should add a branch for integers too. I'd rather not go that far, at least in this issue: we'd also end up changing __float__ to allow it to return an int, in that case. If we're considering that, the discussion should go back to

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread Mike Hoy
Changes by Mike Hoy mho...@gmail.com: -- nosy: +mikehoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16288 ___ ___ Python-bugs-list mailing list

[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds fine to me. You might want to make the test CPython-specific. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16284 ___

[issue16289] Update devguide for 3.4

2012-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: It doesn't sound very useful to mention both 3.2 and 3.3, since 3.2 maintenance will soon stop. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16289

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread R. David Murray
R. David Murray added the comment: The special handling of special methods is baked into the attribute lookup machinery. The discussion of this is in the language reference somewhere, as is the explanation of what descriptors are and how they work. -- type: - enhancement

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread Chris Jerdonek
Chris Jerdonek added the comment: So the relevant code is this: def getDescription(self, test): ... 43 return str(test) ... What I'd like is to have this be something like: 44 return test.id() Or anther way this could be done would be to make TestCase.__str__ call self.id() Note

[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread Éric Araujo
Éric Araujo added the comment: http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-classes -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16288

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Éric Araujo
Éric Araujo added the comment: NotADirectoryError not being caught makes sense to me: not passing a directory as argument to rmtree is a programmer error, not something coming from the OS or filesystem. -- nosy: +eric.araujo, pitrou ___ Python

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: To be honest I don't really understand the point of the ignore_errors flag on rmtree. If rmtree fails to delete the directory tree (which will happen if one of the files can't be deleted), why would you want it to return succesfully? -- nosy: +hynek

[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ok, but does it really make a difference and in which cases? Up to 40% on Athlon and up to 70% on Atom. In other words, do you have benchmark numbers? :) Attached results for AMD Athlon 64 X2 4600+ and Intel Atom N570 @ 1.66GHz under 32-bit Linux. You

[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10888 ___ ___

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now shutil.rmtree has different behavior when called for non-directory on systems with and without at-functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15872

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If rmtree fails to delete the directory tree (which will happen if one of the files can't be deleted), why would you want it to return succesfully? At least it free some disk space. ;-) -- ___ Python tracker

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Hynek Schlawack
Hynek Schlawack added the comment: To be honest I don't really understand the point of the ignore_errors flag on rmtree. If rmtree fails to delete the directory tree (which will happen if one of the files can't be deleted), why would you want it to return succesfully? I presume it’s

[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, here are the benchmark results here with a 1-byte separator: 10 x 10 0.244 usec 0.202 usec +21% 100 x 10 0.325 usec 0.326 usec-0% 1000 x 10 0.691 usec 0.689 usec+0% 10 x 1000 18.2 usec14.2 usec +28% 100 x

[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, 1-char separator is more common for strings, but I found several b'\n'.join or b','.join even in stdlib. 3 lines of difference are only 2.3% of Objects/stringlib/join.h. Here is a patch with dropped the 1-byte separator case. --

[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27636/bytes_join_optimization_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12805 ___

[issue15027] Faster UTF-32 encoding

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25857/encode-utf32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15027 ___

[issue15027] Faster UTF-32 encoding

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated to 3.4. Is anyone interested in 7x speedup of UTF-32 encoder? -- keywords: +needs review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27637/encode_utf32_2.patch ___ Python

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25278/decode_utf32_a.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625 ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25279/decode_utf32_b.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625 ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25537/decode_utf32_a_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625 ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25538/decode_utf32_b_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625 ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patches updated to 3.4. -- keywords: +needs review versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file27638/decode_utf32_a_3.patch ___ Python tracker rep...@bugs.python.org

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +3.3regression Added file: http://bugs.python.org/file27639/decode_utf32_b_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest apply patch A to 3.3 as it fixes performance regression (2x) and is very simple. -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625 ___ ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Georg Brandl
Georg Brandl added the comment: Very simple? You're changing most of the code there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14625 ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was too complicated code. Actually patched code is smaller. 1 file changed, 71 insertions(+), 80 deletions(-) UTF-16 codec was modified in some way. -- ___ Python tracker rep...@bugs.python.org

[issue15186] Support os.walk(dir_fd=)

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15186 ___ ___

[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review stage: test needed - versions: +Python 3.4 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1470548 ___

[issue1598083] Top-level exception handler writes to stdout unsafely

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- Removed message: http://bugs.python.org/msg162876 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1598083 ___

[issue1598083] Top-level exception handler writes to stdout unsafely

2012-10-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1598083 ___ ___

[issue14625] Faster utf-32 decoder

2012-10-20 Thread Georg Brandl
Georg Brandl added the comment: That the new code is smaller is no guarantee that it's as correct :) That is exactly the reason we don't put optimizations in bugfix releases. -- ___ Python tracker rep...@bugs.python.org

[issue16278] os.rename documentation slightly inaccurate

2012-10-20 Thread Todd Rovito
Todd Rovito added the comment: David, Thanks for your bug report. Indeed os.rename does not exhibit the same behavior as the documentation describes. For Python 3.4 here is the fix I came up with: Rename the file or directory src to dst. If dst is a directory that is not empty, OSError

[issue10405] IDLE breakpoint facility undocumented

2012-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0a423ce4b96 by Ned Deily in branch '2.7': Issue #10405: Document IDLE context menus in Standard Library document http://hg.python.org/cpython/rev/c0a423ce4b96 New changeset 566b7574becb by Ned Deily in branch '3.2': Issue #10405: Document IDLE

[issue10405] IDLE breakpoint facility undocumented

2012-10-20 Thread Ned Deily
Ned Deily added the comment: Thanks for your suggestions, Nick and Todd. While reviewing them, I realized that there is also a small context (right-click) menu for the IDLE shell window as well. I expanded the doc changes to include it and included several other minor doc updates. I also

[issue16042] smtplib: unlimited readline() from connection

2012-10-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I understand you, it's a patch against 2.7. +def readline(self, size=-1): In io.IOBase.readline() and in io.TextIOBase.readline() this parameter named limit. +if size is not None and len(str) == size: +break It

  1   2   >