warnings filters for varying message

2013-06-28 Thread John Reid
Looking at the docs for warnings.simplefilter (http://docs.python.org/2/library/warnings.html) I think the following script should only produce one warning at each line as any message is matched by the simple filter import warnings warnings.simplefilter('default') for i in xrange(2):

Re: warnings filters for varying message

2013-06-28 Thread Peter Otten
John Reid wrote: Looking at the docs for warnings.simplefilter (http://docs.python.org/2/library/warnings.html) I think the following script should only produce one warning at each line as any message is matched by the simple filter import warnings warnings.simplefilter('default') for i

Re: Making a pass form cgi = webpy framework

2013-06-28 Thread Robert Kern
On 2013-06-28 04:38, Νίκος wrote: Στις 28/6/2013 2:08 πμ, ο/η Cameron Simpson έγραψε: Pick a simple framework or templating engine and try it. I have no recommendations to make in this area myself. Can you explain to me the difference of the former and latter? A templating engine takes

Re: Making a pass form cgi = webpy framework

2013-06-28 Thread Νίκος
Στις 28/6/2013 12:35 μμ, ο/η Robert Kern έγραψε: On 2013-06-28 04:38, Νίκος wrote: Στις 28/6/2013 2:08 πμ, ο/η Cameron Simpson έγραψε: Pick a simple framework or templating engine and try it. I have no recommendations to make in this area myself. Can you explain to me the difference of the

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread 88888 Dihedral
Jason Friedman於 2013年6月28日星期五UTC+8上午11時52分33秒寫道: I was hoping to have a good laugh. :| Although I wouldn't call it hostile. I think the python community is being educated in how to spam and troll at the same time. It is possible the OP has a mental disease, which is

Re: Making a pass form cgi = webpy framework

2013-06-28 Thread Robert Kern
On 2013-06-28 11:15, Νίκος wrote: Στις 28/6/2013 12:35 μμ, ο/η Robert Kern έγραψε: On 2013-06-28 04:38, Νίκος wrote: Στις 28/6/2013 2:08 πμ, ο/η Cameron Simpson έγραψε: Pick a simple framework or templating engine and try it. I have no recommendations to make in this area myself. Can you

Problems with subclassing enum34

2013-06-28 Thread Thomas Heller
trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. When I do this, I get a metaclass conflict: class MyEnum(ctypes.c_int, enum.Enum): ...FOOBAR = 0 ... Traceback

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Andrew Berg
After getting over the hurdles I initially explained and moving forward, I've found that standard command-line parsing and its conventions are far too ingrained in the design of argparse to make it useful as a general command parser. I think I would end up overriding a substantial amount of the

Re: Problems with subclassing enum34

2013-06-28 Thread Robert Kern
On 2013-06-28 11:48, Thomas Heller wrote: trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. When I do this, I get a metaclass conflict: class MyEnum(ctypes.c_int,

Re: Don't feed the troll...

2013-06-28 Thread Antoon Pardon
Op 26-06-13 23:02, Ian Kelly schreef: On Wed, Jun 26, 2013 at 1:46 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: But you didn't even go to the trouble of trying to find out what those concerns would be and how strong people feel about them. You just took your assumptions about those

Re: Problems with subclassing enum34

2013-06-28 Thread 88888 Dihedral
Thomas Heller於 2013年6月28日星期五UTC+8下午6時48分38秒寫道: trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. When I do this, I get a metaclass conflict:

Re: Making a pass form cgi = webpy framework

2013-06-28 Thread rusi
On Friday, June 28, 2013 3:45:27 PM UTC+5:30, Νίκος wrote: Στις 28/6/2013 12:35 μμ, ο/η Robert Kern έγραψε: I see, your explanation started to make things clearer to me. What is the easiest and simplest web framework you advise me to use? Here's a picture of the web-development scene as I

? get negative from prod(x) when x is positive integers

2013-06-28 Thread Vincent Davis
I have a list of a list of integers. The lists are long so i cant really show an actual example of on of the lists, but I know that they contain only the integers 1,2,3,4. so for example. s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] I am calculating the product, sum, max, min of each list in s2 but

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Peter Otten
Vincent Davis wrote: I have a list of a list of integers. The lists are long so i cant really show an actual example of on of the lists, but I know that they contain only the integers 1,2,3,4. so for example. s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] I am calculating the product, sum, max,

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Joshua Landau
On 28 June 2013 15:38, Vincent Davis vinc...@vincentdavis.net wrote: I have a list of a list of integers. The lists are long so i cant really show an actual example of on of the lists, but I know that they contain only the integers 1,2,3,4. so for example. s2 =

Re: Problems with subclassing enum34

2013-06-28 Thread Ethan Furman
On 06/28/2013 03:48 AM, Thomas Heller wrote: trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. Have you tried using enum.IntEnum? If you were able to pass ints in

Re: Problems with subclassing enum34

2013-06-28 Thread Thomas Heller
Am 28.06.2013 17:16, schrieb Ethan Furman: On 06/28/2013 03:48 AM, Thomas Heller wrote: trying out the enum34 module. What I want to create is a subclass of enum.Enum that is also based on ctypes.c_int so that I can better use enum instances in ctypes api calls. Have you tried using

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Vincent Davis
@Joshua You are using numpy.prod() Wow, since sum([1,2,3,4]) worked I tried prod([1,2,3,4]) and got the right answer so I just used that. Confusing that it would use numpy.prod(), I realize now there is no python prod(). At no point do I import numpy in my code. The seems to be a result of using

Re: Problems with subclassing enum34

2013-06-28 Thread Thomas Heller
Am 28.06.2013 17:25, schrieb Thomas Heller: Robert Kern: enum.EnumMeta uses super() in its __new__() implementation but _ctypes.PyCSimpleType doesn't. Thus, only _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the order of the two might work. Robert found the problem but

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Terry Reedy
On 6/28/2013 10:38 AM, Vincent Davis wrote: I have a list of a list of integers. The lists are long so i cant really show an actual example of on of the lists, but I know that they contain only the integers 1,2,3,4. so for example. s2 = [[1,2,2,3,2,1,4,4],[2,4,3,2,3,1]] I am calculating the

Re: Problems with subclassing enum34

2013-06-28 Thread Robert Kern
On 2013-06-28 16:32, Thomas Heller wrote: Am 28.06.2013 17:25, schrieb Thomas Heller: Robert Kern: enum.EnumMeta uses super() in its __new__() implementation but _ctypes.PyCSimpleType doesn't. Thus, only _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the order of the two

Re: ? get negative from prod(x) when x is positive integers

2013-06-28 Thread Robert Kern
On 2013-06-28 16:26, Vincent Davis wrote: @Joshua You are using numpy.prod() Wow, since sum([1,2,3,4]) worked I tried prod([1,2,3,4]) and got the right answer so I just used that. Confusing that it would use numpy.prod(), I realize now there is no python prod(). At no point do I import numpy in

Re: Problems with subclassing enum34

2013-06-28 Thread Ethan Furman
On 06/28/2013 08:32 AM, Thomas Heller wrote: Am 28.06.2013 17:25, schrieb Thomas Heller: Robert Kern: enum.EnumMeta uses super() in its __new__() implementation but _ctypes.PyCSimpleType doesn't. Thus, only _ctypes.PyCSimpleType.__new__() gets a chance to run. Switching the order of the two

what happened?

2013-06-28 Thread mpowers
-- http://mail.python.org/mailman/listinfo/python-list

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Wayne Werner
On Fri, 28 Jun 2013, 8 Dihedral wrote: KIND OF BORING TO SHOW HOW THE LISP PROGRAMMING WAS ASSIMULATED BY THE PYTHON COMMUNITY. OF COURSE PYTHON IS A GOOD LANGUAGE FOR DEVELOPING ARTIFICIAL INTELEGENT ROBOT PROGRAMS NOT SO BRAIN DAMAGES, OR SO SLAVERY AS C/C++ OR ASEMBLY PARTS. Best.

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Joel Goldstick
On Fri, Jun 28, 2013 at 2:52 PM, Wayne Werner wa...@waynewerner.com wrote: On Fri, 28 Jun 2013, 8 Dihedral wrote: KIND OF BORING TO SHOW HOW THE LISP PROGRAMMING WAS ASSIMULATED BY THE PYTHON COMMUNITY. OF COURSE PYTHON IS A GOOD LANGUAGE FOR DEVELOPING ARTIFICIAL INTELEGENT ROBOT

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Joshua Landau
On 28 June 2013 19:52, Wayne Werner wa...@waynewerner.com wrote: On Fri, 28 Jun 2013, 8 Dihedral wrote: KIND OF BORING TO SHOW HOW THE LISP PROGRAMMING WAS ASSIMULATED BY THE PYTHON COMMUNITY. OF COURSE PYTHON IS A GOOD LANGUAGE FOR DEVELOPING ARTIFICIAL INTELEGENT ROBOT PROGRAMS NOT SO

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Joel Goldstick
On Fri, Jun 28, 2013 at 3:22 PM, Joshua Landau joshua.landau...@gmail.comwrote: On 28 June 2013 19:52, Wayne Werner wa...@waynewerner.com wrote: On Fri, 28 Jun 2013, 8 Dihedral wrote: KIND OF BORING TO SHOW HOW THE LISP PROGRAMMING WAS ASSIMULATED BY THE PYTHON COMMUNITY. OF

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Joshua Landau
On 28 June 2013 20:35, Joel Goldstick joel.goldst...@gmail.com wrote: On Fri, Jun 28, 2013 at 3:22 PM, Joshua Landau joshua.landau...@gmail.com wrote: On 28 June 2013 19:52, Wayne Werner wa...@waynewerner.com wrote: On Fri, 28 Jun 2013, 8 Dihedral wrote: KIND OF BORING TO SHOW HOW

Re: FACTS: WHY THE PYTHON LANGUAGE FAILS.

2013-06-28 Thread Wayne Werner
On Fri, 28 Jun 2013, Joel Goldstick wrote: On Fri, Jun 28, 2013 at 2:52 PM, Wayne Werner wa...@waynewerner.com wrote: On Fri, 28 Jun 2013, 8 Dihedral wrote: KIND OF BORING TO SHOW HOW THE LISP PROGRAMMING WAS ASSIMULATED BY THE PYTHON COMMUNITY.

Re: How to make a web framework

2013-06-28 Thread Giorgos Tzampanakis
On 2013-06-27, gamesbrain...@gmail.com wrote: I've used web frameworks, but I don't know how they work. Is there anywhere that I can learn how this all works from scratch? Yes, read the source code of a mature framework. -- Real (i.e. statistical) tennis and snooker player rankings and

Re: How to make a web framework

2013-06-28 Thread Joel Goldstick
On Fri, Jun 28, 2013 at 5:00 PM, Giorgos Tzampanakis giorgos.tzampana...@gmail.com wrote: On 2013-06-27, gamesbrain...@gmail.com wrote: I've used web frameworks, but I don't know how they work. Is there anywhere that I can learn how this all works from scratch? Although it is dated,

Survey - how much do you rely on Free/Open Source Software?

2013-06-28 Thread Tony
Hi, I'm conducting a survey that aims to measure the importance that Open Source/Free Software has to people and organizations around the world. Answering is very quick (mostly one click per answer) Please answer it by clicking the link below:

indexerror: list index out of range??

2013-06-28 Thread Titiksha Joshi
Hi, I am working on the following code but am getting the error: list index out of range. I surfed through the group but somehow I am not able to fix my error.Please guide.Structure is given below: m is a list of 5 elements. I have to match elements of m from fields in file ALL_BUSES_FINAL.cvs.

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Ethan Furman
On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to catch it elsewhere and call sys.exit. At the very least, that ought to be a config option, and off by default.

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Modulok
Have you looked into docopt? -Modulok- On Fri, Jun 28, 2013 at 7:36 PM, Ethan Furman et...@stoneleaf.us wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to

Re: indexerror: list index out of range??

2013-06-28 Thread Chris Angelico
On Sat, Jun 29, 2013 at 11:20 AM, Titiksha Joshi joshi.titiksh...@gmail.com wrote: Hi, I am working on the following code but am getting the error: list index out of range. I surfed through the group but somehow I am not able to fix my error.Please guide.Structure is given below: m is a

Re: indexerror: list index out of range??

2013-06-28 Thread Dave Angel
On 06/28/2013 09:20 PM, Titiksha Joshi wrote: Hi, I am working on the following code but am getting the error: list index out of range. I surfed through the group but somehow I am not able to fix my error.Please guide.Structure is given below: m is a list of 5 elements. I have to match

python adds an extra half space when reading from a string or list

2013-06-28 Thread charles benoit
number_drawn=() def load(lot_number,number_drawn): first=input(enter first lot: ) last=input(enter last lot: ) for lot_number in range(first,last): line_out=str(lot_number) for count in range(1,5): number_drawn=raw_input(number: )

Re: indexerror: list index out of range??

2013-06-28 Thread Titiksha
On Friday, June 28, 2013 8:20:28 PM UTC-5, Titiksha wrote: Hi, I am working on the following code but am getting the error: list index out of range. I surfed through the group but somehow I am not able to fix my error.Please guide.Structure is given below: m is a list of 5 elements. I

Re: Why is the argparse module so inflexible?

2013-06-28 Thread rusi
On Saturday, June 29, 2013 7:06:37 AM UTC+5:30, Ethan Furman wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to catch it elsewhere and call sys.exit. At the

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Isaac To
On Sat, Jun 29, 2013 at 9:36 AM, Ethan Furman et...@stoneleaf.us wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: Libraries should not call sys.exit, or raise SystemExit. Whether to quit or not is not the library's decision to make, that decision belongs to the application layer. Yes,

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Terry Reedy
On 6/29/2013 12:12 AM, rusi wrote: On Saturday, June 29, 2013 7:06:37 AM UTC+5:30, Ethan Furman wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to catch it

Re: Why is the argparse module so inflexible?

2013-06-28 Thread Steven D'Aprano
On Fri, 28 Jun 2013 18:36:37 -0700, Ethan Furman wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to catch it elsewhere and call sys.exit. At the very least,

[issue18320] idle, pydoc search python on wrong path at make altinstall with different exec- and prefix e.g. $HOME

2013-06-28 Thread cosmicduck
New submission from cosmicduck: Using Solaris 10 x86 Compiling actual 3.3.2 or 2.7.5 looks like work. Installing as non-root with make altinstall prefix='${HOME}/scripts/tools/python/python-3.3.2' exec-prefix='${HOME}/scripts/tools/python/python-3.3.2' installs looks like correctly to the

[issue9938] Documentation for argparse interactive use

2013-06-28 Thread Ethan Furman
Ethan Furman added the comment: It doesn't look like xuanji has signed a CLA. Should we create a new issue, and have someone else create a new patch, and let this issue just be about the docs? -- nosy: +ethan.furman ___ Python tracker

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Eduardo Robles Elvira
New submission from Eduardo Robles Elvira: The patch attached provides implementation for multivolume support for tarfile module. It contains both the changes in the module and a battery of unit tests. It contains support for multivolume for both GNU and PAX formats. The main idea behind this

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would rather ask: why do we eval() MO files? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18317 ___ ___

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: We don't eval() the whole MO file. It's just the pluralization formula, http://www.gnu.org/software/gettext/manual/gettext.html#index-nplurals_0040r_007b_002c-in-a-PO-file-header_007d-1093 The patch uses ast.NodeVisitor to look for dangerous code.

[issue18042] Provide enum.unique class decorator

2013-06-28 Thread Ethan Furman
Ethan Furman added the comment: unique() added to enum.py; tests added; docs updated. If no complaints within a few days I'll push them through. -- keywords: +patch Added file: http://bugs.python.org/file30722/unique.stoneleaf.01.patch ___ Python

[issue18042] Provide enum.unique class decorator

2013-06-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18042 ___ ___ Python-bugs-list

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lars.gustaebel stage: - patch review type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Jakub Wilk
Jakub Wilk added the comment: Making token filtering more thorough may be simpler that going through AST. I think Python should accept all the operators that GNU gettext accepts: http://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-runtime/intl/plural.y?id=v0.18.2.1#n132 --

[issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures)

2013-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18308 ___ ___ Python-bugs-list mailing

[issue16251] pickle special methods are looked up on the instance rather than the type

2013-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: At the very least the pickle docs deserve some mention of the behavior. That way people won't need to spend as much time trying to figure out why things aren't working the way they expect. I think you are overreacting. The rule you are talking about

[issue18322] test_stat nits

2013-06-28 Thread Antoine Pitrou
New submission from Antoine Pitrou: Patch with small fixes and improvements to test_stat. -- assignee: christian.heimes components: Tests files: test_stat.patch keywords: patch messages: 191985 nosy: christian.heimes, pitrou priority: normal severity: normal stage: patch review status:

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +amaury.forgeotdarc, benjamin.peterson stage: - patch review versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18287

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch is not complete: PyType_Ready() returns -1 but no no exception is set. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18287 ___

[issue18224] pyvenv pydoc.py script causing AttributeErrors on Windows

2013-06-28 Thread Vinay Sajip
Vinay Sajip added the comment: On further reflection: the pydoc script adds no value over and above python -m pydoc args, so I think I will remove it. -- assignee: - vinay.sajip versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue14455] plistlib unable to read json and binary plist files

2013-06-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: I intend to commit my latest version of the patch during the europython sprints, with a minor change: don't include dump(s) and load(s), that change (and the other items on open issues in my last post) can be addressed later. --

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread Laurent Gautier
New submission from Laurent Gautier: When creating a `gzip.GzipFile` using the named parameter `fileobj` rather than filename, iterating over it is broken: ``` AttributeError: 'GzipFile' object has no attribute 'extrastart' ``` The short example below is demonstrating the problem: ## ---

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Niklas Koep
Niklas Koep added the comment: Oh, you're right, of course. I completely forgot that any other case which jumps to the error label assumes an appropriate exception has already been set. I attached a new patch which raises a TypeError. Is there a better way to identify the type which is

[issue18287] PyType_Ready() should sanity-check the tp_name field

2013-06-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Since this error can occur only during the development of a C extension, I would not worry too much. The traceback will already indicate the imported module, this is much better than a segfault later in pydoc. --

[issue18042] Provide enum.unique class decorator

2013-06-28 Thread Eli Bendersky
Eli Bendersky added the comment: Sent some review comments. I'll be on a short vacation this weekend, so please wait at least until next week so I can review the changes. Also, Nick should definitely review this too :) -- ___ Python tracker

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18323 ___ ___ Python-bugs-list

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: Eduardo, can you please fill out the contributor form? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___

[issue18309] Make python slightly more relocatable

2013-06-28 Thread Ronald Oussoren
Ronald Oussoren added the comment: Note that the OSX port already does this for framework builds. I don't know why we don't use the same code for shared library builds. Issue #15498 contains a patch that switches this code from a deprecated nextstep-era API to dladdr. Two comments on the

[issue18317] gettext: DoS via crafted Plural-Forms

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: Thanks for the link plural.y! I was looking for a C file, not a YACC file. The AST approach has advantages over tokenizing. The tokenizer returns just symbols but the AST has also context information. It makes it much easier to distinguish between unary -

[issue18322] test_stat nits

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: I wish the loader would ignore all test classes with a leading underscore or would gain another way to mark a test class as abstract. The mixin approach looks ugly and prohibits tab completion in my IDE. -- ___

[issue9938] Documentation for argparse interactive use

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Yes, I think opening a new issue at this point might be a good idea. The reason is that there are a changes either in place or pending in other issues that involve the parse_know_args code, so a new patch is probably required regardless. I wish I had time

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Based on a quick glance at the code, the problem isn't that you are passing fileobj, it is that fileobj has been opened for writing, not reading, and you are attempting to read from it. extrastart (and other attibutes) are only set if mode starts with 'r'.

[issue18321] Multivolume support in tarfile module

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18321 ___ ___

[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread R. David Murray
R. David Murray added the comment: On the other hand, it seems reasonable to be able to read if you've done a seek(0), so a more complicated fix may also be appropriate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18323

[issue14455] plistlib unable to read json and binary plist files

2013-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Let me review your patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14455 ___ ___ Python-bugs-list

[issue18322] test_stat nits

2013-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wish the loader would ignore all test classes with a leading underscore or would gain another way to mark a test class as abstract. The mixin approach looks ugly and prohibits tab completion in my IDE. I don't really understand what makes mixins ugly. I'm

[issue10786] unittest.TextTextRunner does not respect redirected stderr

2013-06-28 Thread Sylvain Corlay
Sylvain Corlay added the comment: Hello, It would be great if this modification was also done for Python 2.7. A reason is that IPython redirects stderr. When running unit tests in the IPython console without specifying the stream argument, the errors are printed in the shell. See

[issue18111] Add a default argument to min max

2013-06-28 Thread R. David Murray
R. David Murray added the comment: Julian, could you please submit a contributor agreement? (http://www.python.org/psf/contrib) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18111 ___

[issue18322] test_stat nits

2013-06-28 Thread Christian Heimes
Christian Heimes added the comment: Ask your Java buddies about mixins. :) Go ahead and submit the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___

[issue17914] add os.cpu_count()

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a0437adafbd by Charles-François Natali in branch 'default': Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() where http://hg.python.org/cpython/rev/6a0437adafbd -- ___ Python

[issue18111] Add a default argument to min max

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34ff27b431d0 by R David Murray in branch 'default': #18111: Add What's New entry for max/min default. http://hg.python.org/cpython/rev/34ff27b431d0 -- ___ Python tracker rep...@bugs.python.org

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Re-close? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___ ___ Python-bugs-list

[issue18280] Documentation is too personalized

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I find some anonymous I references (Guido? 20 years ago?) off-putting when reading the doc as formal reference. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18280

[issue18292] IDLE Improvements: Unit test for AutoExpand.py

2013-06-28 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18292 ___ ___ Python-bugs-list

[issue17914] add os.cpu_count()

2013-06-28 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17914

[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)

2013-06-28 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___ ___

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: The 2.7 doc says 'Roughly equivalent to' rather than 'Equivalent to'. The undecorated Python version of from_iterable actually works as an attribute of the Python version of chain: chain.from_iterable = from_iterable. I would just remove the decorator. The

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2013-06-28 Thread R. David Murray
R. David Murray added the comment: For the record, encode_quopri was fixed in #14360. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4768 ___

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2013-06-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c807bc15fa8 by R David Murray in branch '3.3': #14360: Add news item. http://hg.python.org/cpython/rev/7c807bc15fa8 New changeset 36cc8b0446b3 by R David Murray in branch 'default': Merge #14360: Add news item.

[issue18324] set_payload does not handle binary payloads correctly

2013-06-28 Thread R. David Murray
New submission from R. David Murray: In order to maintain model consistency without exposing the need for 'surrogateescape' to library users, it should be possible to pass binary data to set_payload and have it do the correct conversion to the expected storage format for the model.

[issue18322] test_stat nits

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___ ___

[issue18322] test_stat nits

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___ ___ Python-bugs-list

[issue18305] [patch] Fast sum() for non-numbers

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Performance enhancements do not normally go in bugfix releases. The issue of quadratic performance of sum(sequences, null_seq) is known, which is why the doc says that sum() is for numbers and recommends .join for strings and itertools.chain for other

[issue18305] [patch] Fast sum() for non-numbers

2013-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree with Terry. CPython deliberately disallow use sum() with lists of strings. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18305 ___

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps it should be staticmethod, not classmethod. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18301 ___

[issue17767] Fix test discovery for test_locale.py

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17767 ___ ___

[issue18266] Fix test discovery for test_largefile.py

2013-06-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18266 ___ ___

[issue18322] test_stat nits

2013-06-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: While you are at it, should you just replace test_main with unittest.main? -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18322 ___

[issue18322] test_stat nits

2013-06-28 Thread STINNER Victor
STINNER Victor added the comment: The mixin approach looks ugly and prohibits tab completion in my IDE. It is a common practice in Python, especially in tests. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

[issue18325] test_kqueue fails in OpenBSD

2013-06-28 Thread Federico Schwindt
New submission from Federico Schwindt: test_kqueue fails in OpenBSD/amd64 -current: Traceback (most recent call last): File /usr/obj/pobj/Python-3.3.2/Python-3.3.2/Lib/test/test_kqueue.py, line 79, in test_create_event ev = select.kevent(bignum, 1, 2, 3, sys.maxsize, bignum)

[issue18325] test_kqueue fails in OpenBSD

2013-06-28 Thread Federico Schwindt
Changes by Federico Schwindt federico.schwi...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18325 ___ ___

  1   2   >