Re: [Python-ideas] string.format() default variable assignment

2013-03-03 Thread Steven D'Aprano
On Sun, 03 Mar 2013 03:21:37 +, Steven D'Aprano wrote: On Sat, 02 Mar 2013 21:11:04 -0500, David Robinow wrote: Do you consider it rude that you choose to use a newsreader, thus inconveniencing those of us who use the mailing list, as God intended. How the flying fuck does my choice

Re: [Python-ideas] string.format() default variable assignment

2013-03-03 Thread Steven D'Aprano
On Sat, 02 Mar 2013 23:00:13 -0500, Devin Jeanpierre wrote: On Sat, Mar 2, 2013 at 10:21 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: How the flying fuck does my choice of where and how *I* read this forum inconvenience YOU? Talk about an overactive sense of entitlement.

Python in web development

2013-03-03 Thread Sarbjit singh
Hello All, I have been using Python as a scripting language for my office tasks. Now I have been thinking of using (and learning as well) for web development. For my tasks, I need to perform some tasks and report on the web. Now I have no experience of web development with Python. So, I want

Re: Is it correct this way to inherit from a list?

2013-03-03 Thread Colin J. Williams
On 02/03/2013 9:30 PM, gialloporpora wrote: Risposta al messaggio di Rick Johnson : What are you trying to achieve exactly? I would like to implement a class (vector) to works with vectors, for example using scalar multiplication: a*v = [a*v1, a*vn] and a dual class for dual vector (the

Re: Python in web development

2013-03-03 Thread becky_lewis
1) Python is absolutely fine for web development. It's just as good, if not better than PHP or Perl for this sort of work (that's my opinion anyway). 2) I've used Django quite extensively and it can certainly handle your requirements. You might want to have a look at Flask

Re: Python in web development

2013-03-03 Thread Michael Torrie
On 03/03/2013 07:18 AM, Sarbjit singh wrote: 1. Can I use Python (I want to use personally :)) over PHP/Perl? Yes of course. 2. If Yes, I want to know the modules that I should learn for achieving my requirement. I searched internet and found Python provides CGI, Django etc. I don't much

Re: How to install development package on linux?

2013-03-03 Thread Michael Torrie
On 03/02/2013 11:39 PM, Sarbjit singh wrote: Yes, I configured the makefile for mod_wsgi as without any error : ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs --with-python=/opt/lampp/python/bin/python2.7 --with-mutex-dir=/opt/lampp/var/run/wsgi This is not quite right.

IV ECCOMAS Thematic Conference VipIMAGE 2013: CALL FOR CONTRIBUTIONS

2013-03-03 Thread tava...@fe.up.pt
Dear Colleague, We are pleased to invite you to the International Conference VipIMAGE 2013 - IV ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/~vipimage) to be held October 14-16, 2013, in Melia Madeira Mare Hotel, Madeira Island, Funchal,

Re: Python in web development

2013-03-03 Thread Michael Herman
If Python is your personal choice, then it's the *best* for you. If you are literally just going to be processing an HTML form, then CGI is your best bet. However, if you think this functionally will grow, then it's worth learning a web framework. I would go with a micro framework. bottle.py is a

استفتاء هل ستشارك فى الانتخابات البرلمانيه القادمه مجلس النواب

2013-03-03 Thread 23alagmy
استفتاء هل ستشارك فى الانتخابات البرلمانيه القادمه مجلس النواب https://www.facebook.com/permalink.php?story_fbid=542812542426361id=299719160065550 facebook

Re: i need help

2013-03-03 Thread Kwpolska
On Sun, Mar 3, 2013 at 7:46 AM, Michael Torrie torr...@gmail.com wrote: On 02/21/2013 03:18 AM, leonardo wrote: thanks, problem solved Apparently not. The shift key on your keyboard still seems to be non-functional. ;) -- http://mail.python.org/mailman/listinfo/python-list It is! How

Re: Question about Tashaphyne package in python

2013-03-03 Thread MRAB
On 2013-03-03 03:06, yomnasala...@gmail.com wrote: I have a Python code that take an Arabic word and get the root and also remove diacritics, but i I have a problem with the output. For example : when the input is العربيه the output is:عرب which is right answer but when the input is كاتب the

Re: Python in web development

2013-03-03 Thread Roy Smith
In article f1b02b78-62d6-4aa0-a532-eff8921cf...@googlegroups.com, Sarbjit singh sarbjit1...@gmail.com wrote: Hello All, I have been using Python as a scripting language for my office tasks. Now I have been thinking of using (and learning as well) for web development. For my tasks, I need

Re: Is it correct this way to inherit from a list?

2013-03-03 Thread Jason Swails
On Sun, Mar 3, 2013 at 9:21 AM, Colin J. Williams c...@ncf.ca wrote: On 02/03/2013 9:30 PM, gialloporpora wrote: Risposta al messaggio di Rick Johnson : What are you trying to achieve exactly? I would like to implement a class (vector) to works with vectors, for example using scalar

How to prevent tests from running against production?

2013-03-03 Thread Roy Smith
Our deploy/configuration system includes credentials for connecting to a database. We have one production database, and a variety of clones of that in our test and development environments. We've got a large body of tests, written with a combination of unittest and nose. Many of our tests do

Re: Pygame mouse cursor load/unload

2013-03-03 Thread Alex Gardner
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote: I am in the process of making a pong game in python using the pygame library. My current problem is that when I move the mouse, it turns off as soon as the mouse stops moving. The way I am doing this is by making the default

Re: Pygame mouse cursor load/unload

2013-03-03 Thread Alex Gardner
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote: I am in the process of making a pong game in python using the pygame library. My current problem is that when I move the mouse, it turns off as soon as the mouse stops moving. The way I am doing this is by making the default

Re: Dealing with exceptions

2013-03-03 Thread Nobody
On Sat, 02 Mar 2013 18:52:19 +0100, Kwpolska wrote: Also, you can do `except:` for a catch-all, but it is discouraged unless you have REALLY good reasons to do this. And, most of the time, you don’t. Most of the time you probably want to catch either Exception (which excludes GeneratorExit,

Re: Speeding up Python's exit

2013-03-03 Thread Ross Ridge
Antoine Pitrou solip...@pitrou.net wrote: Now please read my message again. The OS buffers are *not* flushed according to POSIX. POSIX says open *streams* might not be flushed. POSIX streams are C FILE * streams and generally aren't regarded as being part of the OS. When you call os._exit() in

Re: Twisted or Tornado?

2013-03-03 Thread Jake Angulo
All, Thanks for your reply - I thought I would share the outcome of my choice: I have chosen to use twisted. The API is very decent to learn, though the clincher is theres huge community / docs, and many projects used on production. I was able to make a working project prototype in hours!

Re: Pygame mouse cursor load/unload

2013-03-03 Thread Ian Kelly
On Sun, Mar 3, 2013 at 3:09 PM, Alex Gardner agardner...@gmail.com wrote: if (0,0) = paddle_pos = (300,300): This doesn't do what you think it does. Tuples are compared lexicographically, not element-wise. So (250, 350) (300, 300), but (350, 250) (300, 300). paddle_pos =

Re: Do you feel bad because of the Python docs?

2013-03-03 Thread Jake Angulo
The OP speaks for himself alone. Python - for such a very young language, and with the documentation and community blogs available at this point - I cannot ask for more. And who needs docs when the python syntax is as good as writing plain english sentence? On Fri, Mar 1, 2013 at 9:06 PM,

Re: Twisted or Tornado?

2013-03-03 Thread Michael Torrie
On 03/03/2013 04:35 PM, Jake Angulo wrote: All, Thanks for your reply - I thought I would share the outcome of my choice: I have chosen to use twisted. The API is very decent to learn, though the clincher is theres huge community / docs, and many projects used on production. I was

Re: How to prevent tests from running against production?

2013-03-03 Thread Ross Ridge
Roy Smith r...@panix.com wrote: Our deploy/configuration system includes credentials for connecting to a database. We have one production database, and a variety of clones of that in our test and development environments. Having your tests use credentials that don't work in the production

Re: How to prevent tests from running against production?

2013-03-03 Thread Steven D'Aprano
On Sun, 03 Mar 2013 16:56:16 -0500, Roy Smith wrote: Our deploy/configuration system includes credentials for connecting to a database. We have one production database, and a variety of clones of that in our test and development environments. We've got a large body of tests, written with a

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's an obvious need for this, CPython uses optimizations like this internally, as does PyPy. I don't know if it's a need or if it's just nice to have. By the way, in the list case it also makes C code simpler, since once the list is preallocated you just

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-03 Thread Alex Gaynor
Alex Gaynor added the comment: That strategy only works if you know the exact count, it fails if you only have an estimate (as __length_hint__ gives you). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17338

[issue17340] Handle malformed cookie

2013-03-03 Thread keakon
New submission from keakon: One of my user told me that she couldn't login to my website yesterday. I logged her cookie, and found it began with ',BRIDGE_R=;' which was a malformed cookie. Tornado uses Cookie.SimpleCookie.load() to parse her cookie, and returns an empty dict when catching an

[issue16445] SEGFAULT when deleting Exception.message

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e41c4466d58 by Mark Dickinson in branch '2.7': Issue #16445: Fix potential segmentation fault when deleting an exception message. http://hg.python.org/cpython/rev/0e41c4466d58 -- nosy: +python-dev ___

[issue17032] Misleading error message: global name 'X' is not defined

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset f1d3fbcd837d by Ezio Melotti in branch 'default': #17032: The global in the NameError: global name 'x' is not defined error message has been removed. Patch by Ram Rachum. http://hg.python.org/cpython/rev/f1d3fbcd837d -- nosy: +python-dev

[issue17032] Misleading error message: global name 'X' is not defined

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: - ezio.melotti resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17032

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: I see these failures too on Ubuntu, both in verbose and non-verbose mode: $ ./python -m test -v test_ssl == CPython 3.4.0a0 (default:1c71882938eb+, Mar 3 2013, 14:21:46) [GCC 4.6.3] == Linux-3.2.0-38-generic-i686-with-debian-wheezy-sid little-endian ==

[issue17032] Misleading error message: global name 'X' is not defined

2013-03-03 Thread Ram Rachum
Ram Rachum added the comment: Awesome, thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17032 ___ ___ Python-bugs-list mailing list

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I guess we could handle the ConnectionResetError as a SSLError for the purpose of those tests. What probably happens is that OpenSSL versions, instead of answering sorry, I can't talk to you, brutally reset the connections. --

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ezio, Nadeem, do you want to provide a patch? -- priority: normal - low versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13898

[issue17341] Poor error message when compiling invalid regex

2013-03-03 Thread Roy Smith
New submission from Roy Smith: re.compile('(?P=foo)') Traceback (most recent call last): File stdin, line 1, in module File /home/roy/env/python/lib/python2.7/re.py, line 190, in compile return _compile(pattern, flags) File /home/roy/env/python/lib/python2.7/re.py, line 242, in

[issue16763] test_ssl with connect_ex don't handle unreachable server correctly

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: Is this still an issue? -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16763 ___ ___

[issue17094] sys._current_frames() reports too many/wrong stack frames

2013-03-03 Thread Charles-François Natali
Charles-François Natali added the comment: Did you forget to attach the patch? Oops... -- Added file: http://bugs.python.org/file29295/tstate_after_fork.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17094

[issue6419] Broken test_kqueue.py on OpenBSD

2013-03-03 Thread Charles-François Natali
Charles-François Natali added the comment: The test assumes that the input flags (EV_ADD, EV_ENABLE...) will be returned in the output events. It's apparently not the case on OpenBSD and NetBSD (and probably on OS-X neither, because this check is disabled on this platform), and I can't see

[issue17342] datetime.strptime does not implement %z

2013-03-03 Thread Zbyněk Winkler
New submission from Zbyněk Winkler: According to http://docs.python.org/2/library/datetime.html#strftime-strptime-behavior the %z directive is used to specify the timezone offset of the form +HHMM or -HHMM. However it is not implemented in datetime.strptime. I'd prefer to have %z available

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: The first traceback comes from try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False, client_options=ssl.OP_NO_SSLv3) in test_protocol_sslv3. The test is marked with the @skip_if_broken_ubuntu_ssl decorator, but this

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- priority: normal - low versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13898 ___

[issue17341] Poor error message when compiling invalid regex

2013-03-03 Thread R. David Murray
R. David Murray added the comment: The error is that '' is not legal in a group name, and the parser is parsing the P= form. The error message could be improved by including the bad character in the message. -- keywords: +easy nosy: +r.david.murray

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread R. David Murray
R. David Murray added the comment: Given that this is an RFC violation it looks appropriate as a bug fix for all active versions to me. The patch looks good, though I might decide to break up the test. -- nosy: +r.david.murray stage: - commit review type: - behavior versions:

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread R. David Murray
R. David Murray added the comment: Ah, but that's a draft and not approved. Hmm. There is a possibility this change would break code, if the code tries to look up a header by the same key it used to set it. On the other hand, the key use for the set is already modified by the existing

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread R. David Murray
R. David Murray added the comment: Here is a modified patch with the tests moved to test_urllib2. I'll give people some time to comment on whether this should be applied at all, and if so if it should be backported. I'm leaning toward doing both, at the moment. Karl, thanks for the report

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: David Karl - I had been thinking on this. My understanding of the RFC implies that server should reject when the headers contain the whitespace and I had a little concern if the client library should feel free to cleanup a wrongly set headers? Would it be

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: Patch for the immediate issue, for Python 2.7. The Py_DECREF is delayed until after setting *both* ht_name and tp_name. -- Added file: http://bugs.python.org/file29298/issue16447_27.patch ___ Python tracker

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: And the corresponding patch against 3.2 (applies cleanly to 3.3 and default, modulo Misc/NEWS fixes). -- Added file: http://bugs.python.org/file29299/issue16447_32.patch ___ Python tracker rep...@bugs.python.org

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: This change fixes the problem (and doesn't break anything else that I can see): --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -979,7 +979,7 @@ self.sslconn = self.server.context.wrap_socket( self.sock,

[issue14123] Indicate that there are no current plans to deprecate printf-style formatting

2013-03-03 Thread Mark Lawrence
Mark Lawrence added the comment: I can't see too much sense in leaving this open, what are your opinions? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14123 ___

[issue16860] Use O_CLOEXEC in the tempfile module

2013-03-03 Thread Charles-François Natali
Charles-François Natali added the comment: Closing. Let's keep O_NOFOLLOW: it doesn't buy much, and might be useful for some arcane reason on some weird platform... -- resolution: - fixed stage: - committed/rejected status: open - closed ___

[issue15448] utimes() functions fail with ENOSYS even when detected by configure

2013-03-03 Thread Charles-François Natali
Charles-François Natali added the comment: Alright, closing. -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15448

[issue16962] _posixsubprocess module uses outdated getdents system call

2013-03-03 Thread Charles-François Natali
Charles-François Natali added the comment: Gregory, do you have time to take care of this? -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16962 ___

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread R. David Murray
R. David Murray added the comment: Good point. Seeing what curl does sounds like a good idea. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17322 ___

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, it's certainly reasonable. You could add a comment explaining the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13898 ___

[issue16962] _posixsubprocess module uses outdated getdents system call

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30e643e36bae by Gregory P. Smith in branch '3.3': Issue #16962: Use getdents64 instead of the obsolete getdents syscall in http://hg.python.org/cpython/rev/30e643e36bae New changeset 7ab1c55fcf82 by Gregory P. Smith in branch 'default': Fixes Issue

[issue16962] _posixsubprocess module uses outdated getdents system call

2013-03-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: looks sane and cleaner than the silly x32 hack in there, i'll take care of it. FYI - your patch forgot to add the unsigned char d_type; struct member before name. fixed and applied. When i wrote that code I was probably assuming that sticking with the

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: needs patch - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___

[issue16447] SEGFAULT when setting type.__name__

2013-03-03 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16447 ___ ___

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Looks like curl is sending the headers without removing spaces. Check Raw here link here. (The link would probably be online a week) http://requestb.in/1kfodmj1?inspect $ curl --header X-MyHeader: 123 http://requestb.in/1kfodmj1 ok $ curl --header

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread karl
karl added the comment: Hello, So I tested a bit. The production rules defined by the specification are clear. Spaces before and after are forbidden. header-field = field-name : OWS field-value BWS field-name = token field-value= *( field-content / obs-fold )

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Oh wow. Thank you very much Karl for the care. I am having the same inclination are you too, but determining a definite answer is really helpful before going ahead into making the change. -- ___ Python tracker

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: The curl example also suggest to think about pragamatic de-facto stuff. Will removing the spaces cause any breakage? I can say for sure. But if someone can think of it, it would be good for at least us know. -- ___

[issue17278] SIGSEGV in _heapqmodule.c

2013-03-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine, thanks for the patch. This looks like a reasonable solution that is fast and prevents segfaults. The error message should say more than just that the size changed. it should also note that the heap may no longer be in the heap condition since it

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa24c1382bd3 by Nadeem Vawda in branch '3.2': Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu. http://hg.python.org/cpython/rev/fa24c1382bd3 -- nosy: +python-dev ___ Python

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 77cbb3ba5d40 by Nadeem Vawda in branch '3.3': Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu. http://hg.python.org/cpython/rev/77cbb3ba5d40 -- ___ Python tracker

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69f737f410f0 by Nadeem Vawda in branch 'default': Issue #13898: test_ssl no longer prints a spurious stack trace on Ubuntu. http://hg.python.org/cpython/rev/69f737f410f0 -- ___ Python tracker

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Nadeem Vawda
Nadeem Vawda added the comment: You could add a comment explaining the issue. Done. This doesn't seem to affect 2.7. Marking as fixed in 3.2/3.3/3.4. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed versions: -Python 2.7

[issue13898] Ignored exception in test_ssl

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the fix -- that solved the problem here too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13898 ___

[issue12768] docstrings for the threading module

2013-03-03 Thread Eli Bendersky
Eli Bendersky added the comment: moijes, did you address the review comments? Does your patch apply to 3.2? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12768 ___

[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2013-03-03 Thread Eli Bendersky
Eli Bendersky added the comment: I'm not very knowledgeable in other XML modules, but I hate to see this patch linger. Also it's a pre-requisite for #16986, it seems. Serhiy, since the patch is large could you give a short summary of the things it fixes? Note that the best approach IMHO is to

[issue10590] Parameter type error for xml.sax.parseString(string, ...)

2013-03-03 Thread Christian Heimes
Christian Heimes added the comment: Please hold of any modifications of XML code until we have decided how we are going to fix the XML exploits. Also I think this is a new feature and not a fix. parseString() is documented as 'parses from a buffer string'. It doesn't say that it can parse

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread karl
karl added the comment: OK. I'm inclined to think that we should both remove trailing and leading spaces/tabs should be removed. Reasons: 1. Production rules forbid them. 2. Trailing spaces 2.a Conformant servers will ignore with a 400 bad request (opportunity for another bugs?) 2.b

[issue17343] Add a version of str.split which returns an iterator

2013-03-03 Thread Alex Gaynor
New submission from Alex Gaynor: str.split returns a list, which is inefficient when you just want to process items one be one. You could emulate this with str.find and tracking indexes manually, but this should really be a builtin behavior. -- messages: 183411 nosy: alex priority:

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread R. David Murray
R. David Murray added the comment: It is a bug in the program, though, and not particularly in the client library. As mentioned, it can even be useful for testing servers. In the email package we faithfully reproduce such headers if they are passed in. The only one we disallow is something

[issue14645] Generator does not translate linesep characters in certain circumstances

2013-03-03 Thread R. David Murray
R. David Murray added the comment: Here's a patch, against 3.2. It definitely does affect smtplib.send_message. -- keywords: +patch priority: normal - high stage: needs patch - patch review Added file: http://bugs.python.org/file29300/generator_lineneds.patch

[issue17343] Add a version of str.split which returns an iterator

2013-03-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: The bytes (and bytearray?) version of this should generate memoryview's instead of new bytes objects to avoid a copy. While not required, It'd be useful if the implementation of this pre-scanned the data internally so that the length of the generated

[issue16278] os.rename documentation slightly inaccurate

2013-03-03 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: Removed file: http://bugs.python.org/file27890/OSRename_test_os_3point4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16278 ___

[issue16278] os.rename documentation slightly inaccurate

2013-03-03 Thread Todd Rovito
Changes by Todd Rovito rovit...@gmail.com: Removed file: http://bugs.python.org/file28071/OSRenameDocs3point4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16278 ___

[issue17322] urllib.request add_header() currently allows trailing spaces (and other weird stuff)

2013-03-03 Thread karl
karl added the comment: R. David Murray, You are right it is not specific to the client library. HTTP headers are part of the message (Request/Response) with both the same constraints. Constraints are put on receivers (receiving a message) and senders (sending a message) of the message

[issue16278] os.rename documentation slightly inaccurate

2013-03-03 Thread Todd Rovito
Todd Rovito added the comment: Combined the test cases and document changes into a single patch. As suggested by Mr. Terry Reedy I used a table and removed the text. The table still needs some work but it is a good start. As suggested by Mr. Jerdonek I tried to make the test cases WETter

[issue17344] checking size of size_t... configure: error:

2013-03-03 Thread shilpi
New submission from shilpi: Hi we are facing checking size of size_t error in building python2.6 checking size of size_t... configure: error: in `/var/tmp/python_build/Python-2.6.8': configure: error: cannot compute sizeof (size_t). Is there any fix for this issue or anysolution --

[issue17344] checking size of size_t... configure: error:

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: Have you tried with Python 2.7? -- nosy: +ezio.melotti type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17344 ___

[issue17344] checking size of size_t... configure: error:

2013-03-03 Thread shilpi
shilpi added the comment: I have not tried with Python2.7. Our requirement that we need python2.6. If you have any idea or clue for this issue Regards Shilpi -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17344

[issue17344] checking size of size_t... configure: error:

2013-03-03 Thread Ezio Melotti
Ezio Melotti added the comment: Can you provide more information about your operating system/platform? Python 2.6 only receives security fixes, so even if it's a bug it can't be fixed there (it could be fixed on 2.7 though). -- ___ Python tracker

[issue16997] subtests

2013-03-03 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/issue16997 ___ ___ Python-bugs-list

[issue7897] Support parametrized tests in unittest

2013-03-03 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/issue7897 ___ ___ Python-bugs-list

[issue16098] Bisect optimization in heapq.nsmallest is never used

2013-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 362826298fdb by Raymond Hettinger in branch 'default': Issue #16098: Update heapq.nsmallest to use the same algorithm as nlargest. http://hg.python.org/cpython/rev/362826298fdb -- nosy: +python-dev ___

[issue16098] Bisect optimization in heapq.nsmallest is never used

2013-03-03 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16098 ___

[issue17344] checking size of size_t... configure: error:

2013-03-03 Thread shilpi
shilpi added the comment: Hi , Currently we are using thi version cat /etc/release Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. Assembled 23 August 2011 Regards Shilpi

[issue17343] Add a version of str.split which returns an iterator

2013-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: While not required, It'd be useful if the implementation of this pre-scanned the data internally so that the length of the generated sequence was known up front. This could imply an internal bitset of vector of split indices is kept for the life of the