[issue8202] sys.argv[0] and python -m package

2010-06-13 Thread Nick Coghlan
Nick Coghlan added the comment: Reverted in r81964, marking as 3.2 only. For 3.2, I'll get rid of the hack by having SetArgV treat both "-c" and "-m" as special values for sys.argv[0], and by adding some unit tests that make sure the presence of files with those names has no effect on the val

[issue7936] sys.argv contains only scriptname

2010-06-13 Thread Sworddragon
Sworddragon added the comment: This registry key contains "E:\Python31\python.exe" "%1" %*. I have too 2 python versions installed and manually associated the .py files to Python 3. -- ___ Python tracker _

[issue8986] math.erfc OverflowError

2010-06-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +mark.dickinson stage: -> unit test needed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8887] “pydoc str” works but not “ pydoc str.translate”

2010-06-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8957] strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale

2010-06-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8940] *HTTPServer need a summary page with API inheritance table

2010-06-13 Thread Ezio Melotti
Ezio Melotti added the comment: Can you provide a patch? -- nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Pyth

[issue8911] regrtest.main should have a test skipping argument

2010-06-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, flox stage: -> needs patch type: -> behavior ___ Python tracker ___ ___ Python-bugs

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the report. What platform are you on? I'm not seeing this behaviour on OS X: Python 3.2a0 (py3k:81935M, Jun 12 2010, 10:01:38) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Changes by Mark Dickinson : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Looking at the source, I think I know where this is coming from: one of the terms in the expression for erfc(x) is exp(-x*x). For abs(x) >= 27.284 or so, this underflows to zero. So the likely cause is that whatever platform you're on is setting errno to E

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Geremy, can you verify that the attached patch fixes the problem? If so, I'll add tests and commit. -- keywords: +patch Added file: http://bugs.python.org/file17654/issue8986.patch ___ Python tracker

[issue8986] math.erfc OverflowError

2010-06-13 Thread geremy condra
geremy condra added the comment: On Sun, Jun 13, 2010 at 5:14 AM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Thanks for the report.  What platform are you on?  I'm not seeing this > behaviour on OS X: I'm on Ubuntu 10.04 64-bit. Geremy Condra > Python 3.2a0 (py3k:81935

[issue8986] math.erfc OverflowError

2010-06-13 Thread geremy condra
geremy condra added the comment: On Sun, Jun 13, 2010 at 5:47 AM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Geremy, can you verify that the attached patch fixes the problem?  If so, > I'll add tests and commit. I've only tested it from 2**16 + 1 to -2**16 at unit and ha

[issue8988] import + coding = failure (3.1.2/win32)

2010-06-13 Thread gonegown
New submission from gonegown : I have python 3.1.2 fetched from the main site. imagine two source files: a.py: --- # coding: cp1251 import b; print('A'); --- b.py: --- print('B'); --- Both reside in the same directory containing at least one non-ascii character (try 0xdb) in

[issue8986] math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in r81967 (trunk) and r81968 (py3k). I had to weaken the tests for erfc: its accuracy for largish arguments (25.0 or so) is not ideal---I was seeing errors of 100 ulps and more. However, I think this level of error is acceptable in practice, since for

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Mark Dickinson
Mark Dickinson added the comment: The latest patch looks good to me. I only have minor comments, in random order: - Should the PyDateTime_TimeZone struct definition go into datetime.h, so that it's avaiable if you want to export any C-API functions later on? - If you're not allowing subclass

[issue8989] email.utils.make_msgid: specify domain

2010-06-13 Thread Adrian von Bidder
New submission from Adrian von Bidder : Using the hostname for the domain part of a Message-Id is probably the right thing usually but users may want to override this. Please consider this rather trivial patch: = --- utils.py.orig 2010-06-13 16:59:30.533861099 +0200 +++ utils.py2

[issue8989] email.utils.make_msgid: specify domain

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Seems straightforward. Any reason not to allow it David? Adrian, I edited the versions: new features go into 3.2 only. Please make sure your patch applies to this version (branch named py3k). Can you also write unit tests for this new parameter? -- keyw

[issue8989] email.utils.make_msgid: specify domain

2010-06-13 Thread Shashwat Anand
Shashwat Anand added the comment: Adrian, Could you generate the diffs from the top level of the checkout and attach it here? -- nosy: +l0nwlf ___ Python tracker ___

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Jun 13, 2010 at 10:09 AM, Mark Dickinson wrote: .. > - Should the PyDateTime_TimeZone struct definition go into > datetime.h, so that it's avaiable if you want to export any C-API > functions later on? > The original patch had this in the header f

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Just to add a little bit of historical perspective, this proposal is really more than seven years old: """ s.keim (Dec 20, 2002 3:33 am; Comment #13) .. do we really need methods like utcnow. I believe the following could be a little more easy to learn

[issue8985] String format() has problems parsing numeric indexes

2010-06-13 Thread Germán L . Osella Massa
Germán L. Osella Massa added the comment: I now see the rationale behind not accepting ' 10 ' == 10. But what about not accepting '-1' == -1? I think is odd that negative numbers are not accepted as valid indexes. I'd expect that something like "First element is {0[0]} and last element is {

[issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting

2010-06-13 Thread Shashwat Anand
Shashwat Anand added the comment: Agreed. Attaching the unit test. -- Added file: http://bugs.python.org/file17656/test_httpserver.patch ___ Python tracker ___ __

[issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: The skeleton is good but you have to change one thing. Your test should exercise a function or method of BaseHTTPServer, not the underlying implementation detail. I failed to explain that earlier: 1a) Write a test that checks that the current code produces right v

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: issue5094g.diff addresses all Mark's suggestions except making struct definition public. I also made a few other changes: 1. Constructor now raises TypeError when offset is not a timedelta instead of ValueError in previous version. 2. NEWS entry no lo

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2010-06-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Also I changed Py_DECREFs in destructor to Py_CLEAR. I understand that while not strictly required in this case, it is a good practice. -- ___ Python tracker __

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

2010-06-13 Thread Thomas Jollans
New submission from Thomas Jollans : Currently, the array constructor, if given a bytearray, detects this with PyByteArray_Check, and hands it on to array_fromstring, which does not support bytearray (by using "s#" with PyArg_ParseTuple) and raises TypeError. >>> array('h', bytearray(b'xyxyxyx

[issue6560] socket sendmsg(), recvmsg() methods

2010-06-13 Thread David Watson
David Watson added the comment: New version with minor changes. Will also upload at http://codereview.appspot.com/1487041/show -- Added file: http://bugs.python.org/file17659/baikie-hwundram-v4.diff ___ Python tracker

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

2010-06-13 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6560] socket sendmsg(), recvmsg() methods

2010-06-13 Thread David Watson
David Watson added the comment: Optional patch to replace SocketTCPTest, etc. with the classes from the sendmsg patch. -- Added file: http://bugs.python.org/file17660/v4-replace-existing-classes.diff ___ Python tracker

[issue8592] 'y' does not check for embedded NUL bytes

2010-06-13 Thread STINNER Victor
STINNER Victor added the comment: I commited a bigger patch: r81973 not only fixes "y" format, but also "u" and "Z". It does also add a lot of tests in test_getargs2.py for many string formats (not all, eg. "es" is not tested). Even if I consider this as a bugfix, I don't want to backport to

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

2010-06-13 Thread STINNER Victor
STINNER Victor added the comment: Update the patch to update also the new tests that I added in r81973 (to fix #8592). -- Added file: http://bugs.python.org/file17661/pyarg_z_no_bytes-2.patch ___ Python tracker __

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

2010-06-13 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file17591/pyarg_z_no_bytes.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue8991] PyArg_Parse*() functions: reject discontinious buffers

2010-06-13 Thread STINNER Victor
New submission from STINNER Victor : getbuffer() checks that the buffer is contiguous. "s#", "y", "z" formats use convertbuffer() which doesn't check that the buffer is contigious, as "w" and "w#" formats which call directly PyObject_GetBuffer() which extra check. I don't think that the functi

[issue8215] getargs.c in Python3 contains some TODO and the documentation is outdated

2010-06-13 Thread STINNER Victor
STINNER Victor added the comment: r81811 and r81923 improve Doc/c-api/arg.rst. I opened more specific issues to improve getargs code and documentation: - #8991: PyArg_Parse*() functions: reject discontinious buffers - #8926: getargs.c: release the buffer on error - #8952: Doc/c-api/arg.rst:

[issue8987] Distutils doesn't quote Windows command lines properly

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Distutils is frozen, because even fixing blatant bugs breaks third-party code that relies on internals. Can you check your bug with a Distutils2 checkout from hg.python.org/distutils2? -- nosy: +merwok ___ Python trac

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

2010-06-13 Thread shypike
shypike added the comment: The discussion is going the wrong way. Let me state what is the actual problem. When the Popen() function is called with "shell=True", you cannot pass command line elements in which the characters '&' and '|' are embedded (example r'Q&A'). list2cmdline should embed s

[issue8992] convertsimple() doesn't need to call converterr() if an exception was already raised

2010-06-13 Thread STINNER Victor
New submission from STINNER Victor : If convertitem() result is not NULL, an error occured and seterror() is called (by the function calling convertitem()). seterror() does nothing if an exception was raised (if PyErr_Occurred() is non zero). convertitem() doesn't need to call converterr() if

[issue8969] Windows: use (mbcs in) strict mode to encode/decode filenames, and enable os.fsencode()

2010-06-13 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Here’s a quick crack at it. Conservative approach: Don’t reindent, just complain. -- keywords: +patch nosy: +merwok stage: -> patch review versions: +Python 2.7, Python 3.2 Added file: http://bugs.python.org/file17663/check-tabs.diff ___

[issue8850] Remove "w" format of PyParse_ParseTuple()

2010-06-13 Thread STINNER Victor
STINNER Victor added the comment: "w#" is not only useless but also not used in py3k source code. "w" is also not used. Only "w*" is used by fnctl and socket modules. The problem with w# is that the caller cannot "release" the buffer and so we cannot lock the buffer. I don't know exactly what

[issue8350] os.mkdir doc comment is incorrect

2010-06-13 Thread Éric Araujo
Changes by Éric Araujo : -- assignee: georg.brandl -> d...@python nosy: +d...@python ___ Python tracker ___ ___ Python-bugs-list mailin

[issue8602] documentation of bz2 module mildly erroneous

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: I’d remove the lines “Specifically it does not define the :meth:`__enter__` and :meth:`__exit__` methods required by the :keyword:`with` statement”, since they add unnecessary length to a simple note. Please provide one patch per branch, and diff from the top le

[issue8602] documentation of bz2 module mildly erroneous

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Also, don’t bother with 3.0: It is not supported by python-dev anymore. Make documentation patches for py3k and trunk, and they’ll be backported to the stable branches 3.1 and 2.6. -- ___ Python tracker

[issue8538] Add ConfigureAction to argparse

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: I think you can go ahead and produce a patch. Don’t start splitting argparse into a package now though, this is a sensible decision IMO but has to be agreed by the maintainer; just add FlagAction and ConfigureAction to argparse for now. -- stage: -> nee

[issue8814] functools.WRAPPER_ASSIGNMENTS should include __annotations__

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Patch looks good to me. Could you add some tests to Lib/test/test_functools.py to check that annotations are really copied? (3.2 is not frozen, adjusting versions) -- stage: -> unit test needed versions: -Python 3.3 ___

[issue8653] urlparse.urlparse/urlsplit doc missing

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Dave, can you explain your problem with a quote or a file name and line number, or directly propose a doc patch? -- ___ Python tracker ___ ___

[issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string"

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: haypo, I was not speaking about documenting the buffer protocol in general, but reacting to this specific change in your patch/commit: - buffer protocol (such as :class:`bytes` or :class:`bytearray` objects). + buffer protocol. Before the commit, the term “b

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-13 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-06-13 Thread Éric Araujo
Éric Araujo added the comment: Updating patch to check header files too. Untested. -- Added file: http://bugs.python.org/file17664/check-tabs.diff ___ Python tracker ___

[issue8930] messed up formatting after reindenting

2010-06-13 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The following command (in bash shell) shows more files: find -name '*.[ch]' -exec grep -El $'^\t' {} \; I think that internal copies of libffi should be ignored. -- nosy: +Arfrever ___ Python tr

[issue5220] os.makedirs' mode argument has bad default value

2010-06-13 Thread Sindre Myren
Sindre Myren added the comment: I have to agree with jab. While the way relative paths works are more or less common knowledge, the way umask does and does not work in relation to python isn't. It is however given a short description at http://docs.python.org/library/os.html#os.makedirs: ...

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

2010-06-13 Thread Eric Smith
Changes by Eric Smith : -- versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue8985] String format() has problems parsing numeric indexes

2010-06-13 Thread Eric Smith
Eric Smith added the comment: I'll consider this a duplicate. Issue 7951 is the existing feature request for this issue. I'll merge the nosy lists. -- resolution: rejected -> duplicate superseder: -> Should str.format allow negative indexes when used for __getitem__ access?

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

2010-06-13 Thread Eric Smith
Eric Smith added the comment: Closed issue 8985 as a duplicate of this; merging nosy lists. -- nosy: +gosella, mark.dickinson, merwok ___ Python tracker ___ _

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

2010-06-13 Thread Eric Smith
Changes by Eric Smith : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue8989] email.utils.make_msgid: specify domain

2010-06-13 Thread R. David Murray
R. David Murray added the comment: This does seem like a reasonable (and backward compatible) addition to the API. I'm only +0 on adding it, though, without at least one specific use case. I'd want to mention that use case in the docs as an example, and stress that using the default is reco

[issue8989] email.utils.make_msgid: specify domain

2010-06-13 Thread R. David Murray
Changes by R. David Murray : -- assignee: -> r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

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

2010-06-13 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > That remark is not relevant, because the actual problem is different. Maybe you can expand the test case to demonstrate the actual problem? The tests in the latest patch are for list2cmdline directly. But you can't observe the problem a bug in list2c

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

2010-06-13 Thread R. David Murray
R. David Murray added the comment: The actual bug here is that list2cmdline is called when shell=True and a list is passed. This should not be done. Instead, Popen should raise an TypeError (see issue 7839). When calling Popen with shell=True, you should be passing in a string that is alre

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2010-06-13 Thread R. David Murray
R. David Murray added the comment: See issue 8972 for motivation for accepting this proposal. Maybe I should start working on the patch :) -- ___ Python tracker ___ ___

[issue8993] Small typo in docs for PySys_SetArgv

2010-06-13 Thread flashk
New submission from flashk : The docs for PySys_SetArgv say: "This function works like PySys_SetArgv() with updatepath set to 1." I believe it should be "PySys_SetArgvEx". I've attached a patch. -- assignee: d...@python components: Documentation files: init.rst.patch keywords: patch m

[issue8987] Distutils doesn't quote Windows command lines properly

2010-06-13 Thread R. David Murray
R. David Murray added the comment: Note that list2cmdline does correct quoting (which includes the "s) if you are passing the string directly to a program. In that case cmd.exe's metacharacters aren't special. (As I noted in issue 8972, I believe that list2cmdline's current quoting of '|' c

[issue8988] import + coding = failure (3.1.2/win32)

2010-06-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue8988] import + coding = failure (3.1.2/win32)

2010-06-13 Thread R. David Murray
Changes by R. David Murray : -- components: +Interpreter Core -None stage: -> unit test needed type: crash -> behavior ___ Python tracker ___

[issue5220] os.makedirs' mode argument has bad default value

2010-06-13 Thread R. David Murray
R. David Murray added the comment: I don't understand what you mean when you say "how umask works in relation to Python". How it works in relation to Python isn't different from how it works for any other Unix program. Consider, for example, the unix man page for 'open'. I don't think a do