[issue8998] add crypto routines to stdlib

2010-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le vendredi 18 juin 2010 à 06:46 +, geremy condra a écrit : > geremy condra added the comment: > > On Fri, Jun 18, 2010 at 2:39 AM, Daniel Urban wrote: > > > > Daniel Urban added the comment: > > > >> * When I have thought about Python crypto in the std

[issue8998] add crypto routines to stdlib

2010-06-18 Thread geremy condra
geremy condra added the comment: On Fri, Jun 18, 2010 at 3:09 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Le vendredi 18 juin 2010 à 06:46 +, geremy condra a écrit : >> geremy condra added the comment: >> >> On Fri, Jun 18, 2010 at 2:39 AM, Daniel Urban wrote: >>

[issue8998] add crypto routines to stdlib

2010-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > I'd point out that the "ssl" module itself seems to have evolved from a > > trivial wrapper API (in the 2.5 docs I can only find a single > > 3-parameter function, socket.ssl()) to a more comprehensive API in 3.2, > > because people ultimately need the funct

[issue9023] distutils relative path errors

2010-06-18 Thread Greg Hazel
New submission from Greg Hazel : Probably applies to more versions, but I only tested on 2.5.2 and 2.6.5. Distutils incorrectly constructs paths for the build/temp directory when relative paths are used in the "sources" list. This can result in failing to make the build/temp directory at all,

[issue9024] PyDateTime_IMPORT macro incorrectly marked up

2010-06-18 Thread Tim Golden
New submission from Tim Golden : The reference to PyDateTime_IMPORT in the C API datetime docs is marked up as cfunction, giving it a pair of brackets which render it invalid. There is also no indication of where in the code it should be invoked. Patch attached. -- files: pydatetime_i

[issue8998] add crypto routines to stdlib

2010-06-18 Thread geremy condra
geremy condra added the comment: On Fri, Jun 18, 2010 at 3:28 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> > I'd point out that the "ssl" module itself seems to have evolved from a >> > trivial wrapper API (in the 2.5 docs I can only find a single >> > 3-parameter funct

[issue8998] add crypto routines to stdlib

2010-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Well, like I say, I'm willing to contribute what time and ability > allow. Are you thinking of adding a comprehensive wrapper to the ssl > module? Hmm, no, I was just providing an existing datapoint to help us deciding on a crypto API. AFAICT this issue hasn

[issue9024] PyDateTime_IMPORT macro incorrectly marked up

2010-06-18 Thread Tim Golden
Changes by Tim Golden : -- assignee: -> d...@python components: +Documentation nosy: +d...@python stage: -> patch review versions: +Python 3.2 ___ Python tracker ___ ___

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: >> One, we should not blindly pull in the PyPy code >> without some core PyPy developer being in on this You can count me among the PyPy developers. > I concur. Much of PyPy code is written for a restricted subset of > Python instead of clean, idiomatic

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: If both implementations can exist in the same interpreter, how will they cooperate? For example, Time instances created with datetime.py won't pass PyTime_Check(). -- ___ Python tracker

[issue8998] add crypto routines to stdlib

2010-06-18 Thread geremy condra
geremy condra added the comment: On Fri, Jun 18, 2010 at 4:53 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Well, like I say, I'm willing to contribute what time and ability >> allow. Are you thinking of adding a comprehensive wrapper to the ssl >> module? > > Hmm, no, I

[issue8998] add crypto routines to stdlib

2010-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I would suggest that we focus on defining and building a > lower-level interface along the lines of the PEP noted earlier, > integrating that with evpy, and getting it in shape to go into the > stdlib. That sounds reasonable to me. (although I would be also c

[issue8998] add crypto routines to stdlib

2010-06-18 Thread geremy condra
geremy condra added the comment: On Fri, Jun 18, 2010 at 5:37 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> I would suggest that we focus on defining and building a >> lower-level interface along the lines of the PEP noted earlier, >> integrating that with evpy, and gett

[issue8998] add crypto routines to stdlib

2010-06-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Great, I'm thinking more-or-less the API proposed in PEP 272- the > exception I'm thinking of is that 'strings' should be substituted for > 'bytes'- for AES and DES. It gets trickier when talking about public > key crypto, though. Perhaps something along the l

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Mark Dickinson
New submission from Mark Dickinson : Not a serious bug, but worth noting: The result of randrange(n) is not even close to uniform for large n. Witness the obvious skew in the following (this takes a minute or two to run, so you might want to reduce the range argument): Python 3.2a0 (py3k:819

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Javier
New submission from Javier : What steps will reproduce the problem? 1. Run 'python subcommands.py -h' (attached file) 2. Check the ordering of the subcommands in the output: subcommands: {a,c,b,e,d} a a subcommand help b b subcommand help c c subcomma

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Mark Dickinson
Mark Dickinson added the comment: Note: the number 6755399441055744 is special: it's 0.75 * 2**53, and was deliberately chosen so that the non-uniformity is easily exhibited by looking at residues modulo 3. For other numbers of this size, the non-uniformity is just as bad, but demonstrating

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Javier
Javier added the comment: It contains a patch that worked for me to preserve the ordering used in the code. To make that possible it uses action._choices_actions (a list) instead of action.choices (a dictionary). -- keywords: +patch Added file: http://bugs.python.org/file17705/ordere

[issue6884] Impossible to include file in sdist that starts with 'build' on Win32

2010-06-18 Thread Chris Withers
Chris Withers added the comment: I guess not... Maybe try catching Tarek on irc or drop him a mail? -- ___ Python tracker ___ ___ Pyth

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Steven Bethard
Changes by Steven Bethard : -- assignee: -> bethard nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue9027] add test_support.run_unittest command line options and arguments

2010-06-18 Thread anatoly techtonik
New submission from anatoly techtonik : Need --help, --list options and TestSute.testcase args for test_support.run_unittest User story: I am covering CGIHTTPServer with tests according to http://www.rfc-editor.org/rfc/rfc3875.txt speccy and want to run a single test in a cycle. I am running

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Mark Dickinson
Mark Dickinson added the comment: Here's an example patch that removes any bias from randrange(n) (except for bias resulting from the imperfectness of the core MT generator). I added a small private method to Modules/_randommodule.c to aid the computation. This only fixes one instance of int

[issue9027] add test_support.run_unittest command line options and arguments

2010-06-18 Thread anatoly techtonik
anatoly techtonik added the comment: 3. The final goal is to be able to run single test as: > python test_httpservers.py BaseHTTPServer::handler -- ___ Python tracker ___ __

[issue9027] add test_support.run_unittest command line options and arguments

2010-06-18 Thread anatoly techtonik
anatoly techtonik added the comment: The example in first post should read: > python test_httpservers.py --list *auth* CGIHTTPServerTestCase::authorization (several distractions a minute can drive anyone mad) -- ___ Python tracker

[issue9028] test_support.run_unittest cmdline options and arguments

2010-06-18 Thread anatoly techtonik
New submission from anatoly techtonik : Need --help, --list options and TestSute::testcase args for test_support.run_unittest User story: I am covering CGIHTTPServer with tests according to http://www.rfc-editor.org/rfc/rfc3875.txt speccy and want to run a single test in a cycle. I am runnin

[issue9028] test_support.run_unittest cmdline options and arguments

2010-06-18 Thread anatoly techtonik
anatoly techtonik added the comment: Damn. I still failed to forge last use case. In should of course read: > python test_httpservers.py CGIHTTPServer::url_collapse_path_split CGIHTTPServer::url_collapse_path_split ... ok Wave develops bad habits. -- _

[issue9027] add test_support.run_unittest command line options and arguments

2010-06-18 Thread anatoly techtonik
anatoly techtonik added the comment: Too many errors in description. Please close this ticket with #9028 as a superceder. -- ___ Python tracker ___ _

[issue9028] test_support.run_unittest cmdline options and arguments

2010-06-18 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: These sound more like features for the unittest runner (one of which is implemented already). Also, please don't propagate "::" as a namespace separator in Python. That's what "." is for. -- nosy: +exarkun _

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Mark Dickinson
Mark Dickinson added the comment: The nonuniformity of randrange has a knock-on effect in other random module functions. For example, take a sample of 100 elements from range(6004799503160661), and take the smallest element from that sample. Then the exact distribution of that smallest elem

[issue9028] test_support.run_unittest cmdline options and arguments

2010-06-18 Thread R. David Murray
R. David Murray added the comment: Yes, running individual tests has already been implemented as part of unittest (where it belongs): ./python -m unittest test.test_httpservers.BaseHTTPServerTestCase.test_handler . -- Ran 1 te

[issue9027] add test_support.run_unittest command line options and arguments

2010-06-18 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> committed/rejected superseder: -> test_support.run_unittest cmdline options and arguments ___ Python tracker

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread R. David Murray
R. David Murray added the comment: It would be simpler to use an OrderedDict. -- nosy: +r.david.murray ___ Python tracker ___ ___ Pyth

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a more careful Python-only patch that fixes the bias in randrange and randint (but not in shuffle, choice or sample). It should work well both for Mersenne Twister and for subclasses of Random that use a poorer PRNG with badly-behaved low-order bits.

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread Javier
Javier added the comment: While the ordered dict is a nice option, the one-line patch that is attached to the report works in python < 2.7 without adding any external dependency. In my opininion, that's interesting for those using argparse with earlier versions of python. -- ___

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-18 Thread R. David Murray
R. David Murray added the comment: Sorry, "simpler" was the wrong choice of word :) Anyway, it's up to Steven. -- ___ Python tracker ___

[issue1368368] prompt_user_passwd() in FancyURLopener masks 401 Unauthorized error page

2010-06-18 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed in r82068 and r82069. As mentioned in msg107883, this functionality is should not be relied upon. It is present for legacy apps. I have added a NEWS note mentioning that there is a change in behavior (if legacy apps owners can catch it) -- res

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Reopening because the patch introduced a regression with respect to datetime subclasses: >>> class DT(datetime): pass ... >>> DT.strptime('', '') datetime.datetime(1900, 1, 1, 0, 0) a DT instance expected. Need tests covering subclasses. --

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching issue6641b.diff that fixes subclassing issue. Added tests for datetime subclass only to keep the patch focused. Adding tests for datetime and time subclasses will be natural in issue 1100942. -- Added file: http://bugs.python.org/file

[issue9028] test_support.run_unittest cmdline options and arguments

2010-06-18 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Replacing issue6641b.diff after fixing some spelling errors. Thanks, Ezio. -- Added file: http://bugs.python.org/file17709/issue6641b.diff ___ Python tracker ___

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17708/issue6641b.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17710/issue6641b.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17709/issue6641b.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Will take a look at this in the next few days. Am tempted to just either provide a recipe or provide a new method. That way sequences generated by earlier python's are still reproducible. -- ___ Python tracker <

[issue9020] 2.7: eval hangs on AIX because sizeof(char) == 32

2010-06-18 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Ok, I now have a fix for this issue. The reason for sizeof(c) being 4 bytes is because it is defined as `register int` ... and yet `Py_CHARMASK` fails to type-cast `c` to a `char` type, which is exactly what the attached patch does. -- keywords: +

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would prefer to see correct algorithm in stdlib and a recipe for how to reproduce old sequences for the users who care. -- ___ Python tracker _

[issue9020] 2.7: eval hangs on AIX because sizeof(char) == 32

2010-06-18 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: David, to answer your question "How does it behave with the head of the current 2.6 maintenance branch, by the way?", since this bug appears to be in Include/pyctype.h, which file was available only in 2.7+ and 3.x, I don't believe it will reproduce in 2.

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- title: 2.7: eval hangs on AIX because sizeof(char) == 32 -> 2.7: eval hangs on AIX ___ Python tracker ___ _

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis stage: -> patch review type: resource usage -> crash versions: +Python 2.6 ___ Python tracker ___ ___

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've been thinking about this feature request and am starting to question whether it is necessary. Usually we need a pure python version when 1) the python module is developed first, with the subsequent C code needing to match, or 2) we expect a porting i

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, we spent ten years maintaining the ability to reproduce sequences. It has become an implicit promise. I'll take a look at the patch in the next few days. -- ___ Python tracker

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Let me just add a story to show how an alternate python implementation may be useful for users. As I was porting datetime.py to 3.x, I saw many failures from pickle tests. It was not easy to figure out what was going on because C pickle code was calli

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Eric Smith
Eric Smith added the comment: I suppose that's correct, although I have no way to test it. I haven't spent a lot of time looking at the code in tokenizer.c, but if there's a problem with sign-extending signed chars, it wouldn't surprise me if it shows up in more than one place. Does anyone k

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread R. David Murray
R. David Murray added the comment: My understanding is that the desire to have pure python versions of standard library modules is to decouple the standard library from dependency on CPython as far as practical. Perhaps all existing Python implementations have dealt with datetime somehow, bu

[issue6641] datetime.strptime doesn't support %z format ?

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r82073. -- stage: unit test needed -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Eric Smith
Eric Smith added the comment: It would also be good to get a test case for this. I realize it's difficult, but that's the sort of change that might get undone some day by someone going through and "optimizing" the code. -- ___ Python tracker

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > My understanding is that the desire to have pure > python versions of standard library modules is > to decouple the standard library from dependency > on CPython as far as practical. That is a bit of a broad brush. I do not know of an approved project

[issue9029] errors='replace' works in IDLE, fails at Windows command line.

2010-06-18 Thread John Van Praag
New submission from John Van Praag : Platforms: Windows Vista Ultimate 64 bit Python v3.1.2 Goal is to read a tab-separated CSV file. Some records have garbage characters in them. The following code fragment works when the program is run in IDLE, but fails when run from the Windows command li

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-18 Thread shypike
shypike added the comment: I see your point about passing a command line as a single string instead of a list. Too bad that Popen doesn't just do the obvious thing (assemble the list into a string in a shell/cmd.exe compatible way). Issue 1300 should indeed be reversed. Raising ValueError wi

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-18 Thread Germán L . Osella Massa
Germán L. Osella Massa added the comment: I finally managed to get the time to finish the patch that allows negative indexes inside square brackets so now they work with the same semantics as in a python expression: >>> '{0[-1]}'.format(['abc', 'def']) 'def' >>> '{0[-2]}'.format(['abc', 'def'

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-18 Thread Germán L . Osella Massa
Changes by Germán L. Osella Massa : Added file: http://bugs.python.org/file17713/format_negative_indexes-3.2.diff ___ Python tracker ___ ___ Py

[issue6884] Impossible to include file in sdist that starts with 'build' on Win32

2010-06-18 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- components: +Distutils2 versions: -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-18 Thread Germán L . Osella Massa
Germán L. Osella Massa added the comment: I forgot to mention that I also made a patch against py3k (was the same code). -- ___ Python tracker ___ ___

[issue1300] subprocess.list2cmdline doesn't do pipe symbols

2010-06-18 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I reverted r60115 from trunk (2.7) in r82075 and from py3k in r82076. -- nosy: +exarkun resolution: fixed -> invalid ___ Python tracker ___

[issue9030] ctypes variable limits

2010-06-18 Thread Pauli Rikula
Changes by Pauli Rikula : -- assignee: theller components: ctypes nosy: kumma, theller priority: normal severity: normal status: open title: ctypes variable limits ___ Python tracker

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-18 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: I've reverted the issue1300 revision from 2.6, 2.7, 3.1, and 3.2. I hope 7839 is resolved soon. -- ___ Python tracker ___ ___

[issue9031] distutils uses invalid "-Wstrict-prototypes" flag when compiling C++ extension module

2010-06-18 Thread Matteo Vescovi
New submission from Matteo Vescovi : Hi, It seems like distutils passes an invalid "-Wstrict-prototypes" flag when compiling a C++ extension module on Linux (tested on Debian lenny and sid). running build running build_py creating build creating build/lib.linux-i686-2.6 copying presage.py -> b

[issue9030] ctypes variable limits

2010-06-18 Thread Pauli Rikula
New submission from Pauli Rikula : ctypes should have nice interface from which one could get maximum and minimum values etc information about numeric's data types. for integers this is quite trivial, but at least long double is a bit trickier one. -- type: -> feature request ___

[issue9025] Non-uniformity in randrange for large arguments.

2010-06-18 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. I hadn't considered the reproducibility problem. Does the module aim for reproducibility across all platforms *and* all versions of Python? Or just one of those? For small n, I think the patched version of randrange(n) produces the same sequence as be

[issue9031] distutils uses invalid "-Wstrict-prototypes" flag when compiling C++ extension module

2010-06-18 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- priority: normal -> low versions: -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: On 2010-06-18, at 11:47 AM, Eric Smith wrote: > > Eric Smith added the comment: > > I suppose that's correct, although I have no way to test it. I have tested it on Linux 64-bit by running `test.regrtest`. It doesn't seem to break anything. > I haven'

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: On 2010-06-18, at 11:49 AM, Eric Smith wrote: > It would also be good to get a test case for this. I realize it's difficult, > but that's the sort of change that might get undone some day by someone going > through and "optimizing" the code. Running exis

[issue9009] Improve quality of Python/dtoa.c

2010-06-18 Thread Mark Dickinson
Mark Dickinson added the comment: r82079: Apply a version of the parsing patch to pull the parsing code out into a separate function. Alexander, I agree about the names; I'll do a mass renaming later on. I'm trying not to mix the significant algorithm-changing commits with trivial renam

[issue9009] Improve quality of Python/dtoa.c

2010-06-18 Thread Eric Smith
Eric Smith added the comment: It would be easier for me to review if you did it in the other order: fix the variable names first. Although I'm still pretty busy and won't have much time to review, so my needs shouldn't be your first priority. -- _

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps this ought to be discussed on python-ideas or python-dev for a bit. It is not entirely clear that this is a GoodThingToDo(tm) nor is it clear that we want other Python implementations to have to invest the same effort. The spirit of the language f

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-06-18 Thread Eric Smith
Eric Smith added the comment: I agree with Raymond. I'm not convinced it allows you to write any code that you can't currently write, and I'm fairly sure it violates the moratorium. Implementing this would clearly put a burden on other implementations. Marking as "after moratorium".

[issue1744] readline module - set/get quote delimiters

2010-06-18 Thread Cédric Delfosse
Cédric Delfosse added the comment: Here is an updated patch against current trunk. It also contains documentation update and a unit test. -- nosy: +cdelfosse Added file: http://bugs.python.org/file17714/trunk-readline.diff ___ Python tracker

[issue9032] xmlrpc: Transport.request() should also catch socket.error(EPIPE)

2010-06-18 Thread STINNER Victor
New submission from STINNER Victor : Since Python 2.7 / 3.2, httplib supports HTTP(S)/1.1 (keep-alive). This version of HTTP is much faster because the connection is kept between two requests. I'm using it with XML-RPC + SSL (M2Crypto). It works nice. My problem is when the server closes the c

[issue9032] xmlrpc: Transport.request() should also catch socket.error(EPIPE)

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: See also r70643 (from issue #5542): "Remove special logic that closes HTTPConnection socket on EPIPE. If the socket is closed, the client has no chance to read the response from the server. EPIPE means that it isn't possible to write more data from the socket

[issue9020] 2.7: eval hangs on AIX

2010-06-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Does anyone know what other compilers use signed chars? Most of them do, including gcc, on most platforms. unsigned char is really the uncommon case. The patch is incorrect; Py_CHARMASK is correct as it stands. It is *not* the objective of Py_CHARMASK to

[issue850997] mbcs encoding ignores errors

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: Close this issue: nothing special on the buildbots. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: I closed issue #850997, mbcs is now really strict by default: >>> 'h\u00e4kkinen'.encode('mbcs') UnicodeEncodeError: ... >>> 'h\u00e4kkinen'.encode('mbcs', 'replace') "b'hakkinen'" PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefault() and os.fsencode() use

[issue8775] Use locale encoding to decode sys.argv, not the file system encoding

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: Attached patch is a draft adding a new encoding: command line encoding. It is used to encode (subprocess) and decode (python) the command line arguments. It adds sys.getcmdlineencoding(). -- keywords: +patch Added file: http://bugs.python.org/file1771

[issue8949] PyArg_Parse*(): "z" should not accept bytes

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: @lemburg: So what is your opinion on this issue? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created

2010-06-18 Thread STINNER Victor
Changes by STINNER Victor : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.)

2010-06-18 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- title: Use locale encoding to decode sys.argv, not the file system encoding -> Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.) ___ Python tracker

[issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.)

2010-06-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'm still -1, failing to see the problem that is solved. -- ___ Python tracker ___ ___ Python-bugs-

[issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.)

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: > I'm still -1, failing to see the problem that is solved. I know (and I agree), but I don't want to loose the patch :-) -- ___ Python tracker

[issue8939] Use C type names (PyUnicode etc;) in the C API docs

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: r82084 (in 3.2 and r82085 in 3.1) fixes some of the reported issues. -- ___ Python tracker ___ ___ P

[issue8863] Segfault handler: display Python backtrace on segfault

2010-06-18 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - catch also SIGFPE - add segfault.o to Makefile.pre.in - use abort() to quit instead of _exit(1) - call DebugBreak() on Windows before the abort(), as done by Py_FatalError() TODO: Patch configure to only enable segfault handler i

[issue8998] add crypto routines to stdlib

2010-06-18 Thread geremy condra
geremy condra added the comment: On Fri, Jun 18, 2010 at 6:05 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Great, I'm thinking more-or-less the API proposed in PEP 272- the >> exception I'm thinking of is that 'strings' should be substituted for >> 'bytes'- for AES and

[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I was probably misled by Brett's assertion that 'it's not a matter of "if" but "when" datetime will get a pure Python version.' (msg106498) It looks like this is not a universally shared opinion. I am not ready to form a final opinion on datetime.py.

[issue8990] array constructor and array.fromstring should accept bytearray.

2010-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Summary: real bug, needs test, patch provided, looks plausible but I am not qualified to even read-review it, let alone apply and test. (I am removing 3.3 because that is only listed for syntax feature requests that cannot go into 3.2 because of its moratoriu

[issue2475] Popen.poll always returns None

2010-06-18 Thread Mike Lisanke
Mike Lisanke added the comment: Terry, I had long since coded around the problem. At this point, I no longer have the test environment to cause the intermittent conditions of the process hang. I could code something up, but; your question is the first response to this bug report since "reiko "

[issue8990] array constructor and array.fromstring should accept bytearray.

2010-06-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Thomas' patch does more than just allow bytearray. It allows any object that can present itself as a buffer with byte-size items. It is a bit unfortunate that such method will end up being called "fromstring" in 3.x.With string being unicode, this

[issue8972] subprocess.list2cmdline doesn't quote the & character

2010-06-18 Thread R. David Murray
R. David Murray added the comment: The reason that Popen doesn't do "the obvious thing" with a list and shell=True is that it is far from obvious what the correct thing is to do, especially for windows. Thanks for the revert, exarkun. -- ___ Pytho

[issue8990] array constructor and array.fromstring should accept bytearray.

2010-06-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whatever is done, I think a bytearray should be handled the same as bytes. It must be that they give the same result. In basic operations, I believe that bytearrays can *always* substitute for bytes. "Bytes and bytearray objects contain single bytes – the for

  1   2   >