[issue11592] Compilation warnings in os module

2011-03-17 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11592] Compilation warnings in os module

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 071fb38c91e6 by Ross Lagerwall in branch 'default':
Issue #11592: Fix compilation warnings in os module.
http://hg.python.org/cpython/rev/071fb38c91e6

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11593] Add encoding parameter to logging.basicConfig

2011-03-17 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11593] Add encoding parameter to logging.basicConfig

2011-03-17 Thread Samuel Michaels

New submission from Samuel Michaels :

Yes, you could just make a custom logging.FileHandler object, but this way is 
much easier for those who are following the basic logging tutorial.

--
components: Library (Lib)
files: __init__.patch
keywords: patch
messages: 131314
nosy: Samuel.Michaels
priority: normal
severity: normal
status: open
title: Add encoding parameter to logging.basicConfig
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file21275/__init__.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11567] http.server error message format

2011-03-17 Thread Ezio Melotti

Ezio Melotti  added the comment:

This is just nitpicking, but serving XHTML as text/html is wrong.  Also  XHTML 
is not necessary here, so I would just use an HTML 4.01 strict doctype (and 
remove the xmlns).

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10050] urllib.request still has old 2.x urllib primitives

2011-03-17 Thread Jeff McNeil

Changes by Jeff McNeil :


--
nosy: +mcjeff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11563] test_urllibnet is triggering a ResourceWarning

2011-03-17 Thread Jeff McNeil

Jeff McNeil  added the comment:

Sounds good. I'll look at doing that, too.

--
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11563] test_urllibnet is triggering a ResourceWarning

2011-03-17 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

On Thu, Mar 17, 2011 at 06:30:51PM +, Jeff McNeil wrote:

> I went down the same path as AbstractHTTPHandler and added a Connection: 
> close header.  

This is fine for the moment, tough I wish that the TODO pending in
urllib.request with HTTP1.1 persistent connection be removed soon and
will require changes it other places too.

> I contemplated changing urlretrieve to use build_opener as urlopen

There is bug opened for this. All that would be required is output
behavior of urlretrieve remain same, the implementation details (using
build_opener or using urlopen itself!) may not be relevant and I
think, it can be implemented using urlopen instead going through the
handlers and OpenerDirector, BTW, urlretrive is a convenience
function of some sort.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

2011-03-17 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10860] Handle empty port after port delimiter in httplib

2011-03-17 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8450] httplib: false BadStatusLine() raised

2011-03-17 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10486] http.server doesn't set all CGI environment variables

2011-03-17 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11581] buildbot error when pushing to 2.5 branch?

2011-03-17 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11581] buildbot error when pushing to 2.5 branch?

2011-03-17 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

issue11442 is a security issue and I pushed to 2.5 for fixing that and
encountered this problem with buildbot. I think, we may/may not fix
this (buildbot issue) depending upon when the 2.5 release may be
planned.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11581] buildbot error when pushing to 2.5 branch?

2011-03-17 Thread Skip Montanaro

Skip Montanaro  added the comment:

Yes, but this is not a security issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Thu, Mar 17, 2011 at 8:03 PM, Antoine Pitrou  wrote:
..
> +1 for not having pragma statements in the stdlib, especially when they 
> target a third-party tool few of us know and use.

"#pragma NO COVER" is recognized by stdlib trace module, so it is not
specific to a third-party tool.  I don't like #pragma myself.  This is
very "unpythonic" choice.  I would be much happier if it was simply '#
NO COVER' or something even less conspicuous.  I do believe, however
that some mechanism should be used to prevent trace from highlighting
spurious lines as lacking coverage.

> Beside, while coverage measurements are useful, trusting them that actual 
> coverage is complete is IMO a bit foolish.
> It's not just about running every line of code.

Agree, but running every line of code is a good first step.  For
example, it is *very* useful for identifying lack of coverage for
error conditions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes

Brandon Craig Rhodes  added the comment:

Antoine, neither this issue, nor either version of my patch, was intended to 
assert that 100% test coverage indicates that a test of tests are complete. If 
you will point out where in the text this is implied, I will correct it. Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

+1 for not having pragma statements in the stdlib, especially when they target 
a third-party tool few of us know and use.
Beside, while coverage measurements are useful, trusting them that actual 
coverage is complete is IMO a bit foolish. It's not just about running every 
line of code.

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11578] Increase test coverage for timeit.py

2011-03-17 Thread Éric Araujo

Éric Araujo  added the comment:

Is there no resource (in the regrtest machinery) that could be used to flag 
those intensive tests?

Nit: the NEWS entry lacks a “by”.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Brandon Craig Rhodes

Brandon Craig Rhodes  added the comment:

Éric, the Makefile in Python trunk seems to include Objects/complexobject.o in 
the build unilaterally without any way to turn it off. What is leading you to 
believe that Python 3 can conditionally turn the "complex" type off during a 
build?

I do not understand your question about Unicode — could you reference the line 
number in the patch file that is worrying you?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10914] Python sub-interpreter test

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> distutils sure knows how to build .o or .so files, but I don’t know
> about standalone executables (because I don’t know how the .o end up
> making an executable).  If you want to try to do it, I would advise
> you not to use the config command but rather a compiler object
> directly.  distutils.ccompiler.new_compiler() should give you an
> instance of a subclass of distutils.ccompiler.CCompiler suitable for
> your system, and then you can use help or the source to find what
> methods to call.

Well, config._link() seems to do what is needed here. If you think it is
bad to rely on it, perhaps we should "inline" its code somehow in the
test module.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11589] Additional tests for email module

2011-03-17 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee:  -> r.david.murray
keywords: +needs review
stage:  -> patch review
title: Unit test extensions for email module -> Additional tests for email 
module
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11588] Add "necessarily inclusive" groups to argparse

2011-03-17 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 3.3 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-17 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +haypo -BreamoreBoy
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11553] Docs for: import, packages, site.py, .pth files

2011-03-17 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +brett.cannon, eric.araujo, ncoghlan, pje
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11573] Improve Unicode Documentation with Known Caveats

2011-03-17 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10914] Python sub-interpreter test

2011-03-17 Thread Éric Araujo

Éric Araujo  added the comment:

distutils sure knows how to build .o or .so files, but I don’t know about 
standalone executables (because I don’t know how the .o end up making an 
executable).  If you want to try to do it, I would advise you not to use the 
config command but rather a compiler object directly.  
distutils.ccompiler.new_compiler() should give you an instance of a subclass of 
distutils.ccompiler.CCompiler suitable for your system, and then you can use 
help or the source to find what methods to call.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11320] Can't call Py_SetPath() on pointer returned by Py_GetPath()

2011-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority: high -> normal
title: Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix 
ony)) -> Can't call Py_SetPath() on pointer returned by Py_GetPath()
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, the issue here is that you can't call Py_SetPath() on the point returned by 
Py_GetPath(), since the memory refered to that pointer is free()d at the 
beginning of Py_SetPath(). The following works, though:

main(int argc, char **argv)
{
  wchar_t *path, *newpath;
  path = Py_GetPath();
  newpath = malloc((wcslen(path) + 1) * sizeof(wchar_t));
  wcscpy(newpath, path);
  Py_SetPath(newpath);
  free(newpath);
  printf("Init\n");
  Py_Initialize();
  printf("-- END\n");
}


Perhaps we could modify Py_SetPath() so that it copies the new path first 
before deallocating the old one, but I'm not sure I see the point of calling 
Py_SetPath() with the pointer returned by Py_GetPath().

--
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-17 Thread Éric Araujo

Éric Araujo  added the comment:

Some code is removed by your patch, for example a check that prevented an error 
for builds that don’t include complex.  If this type of builds still exist, the 
code should be compatible.

Conversely, the code mentions unicode in some places, but it’s gone now.

--
nosy: +eric.araujo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11579] python 2.5 does not build from hg - looks for subversion keywords

2011-03-17 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

On Thu, Mar 17, 2011 at 05:16:43PM +, Skip Montanaro wrote:
> See Issue 11439.

Yes, that is relevant and applies probably to code in default and
other branches.
Just in case, this corner case in 2.5 does not overlooked (because it
does not happen in other branches), I think it is a good idea to keep
this open and fix it with the patch attached in this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11581] buildbot error when pushing to 2.5 branch?

2011-03-17 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

On Thu, Mar 17, 2011 at 05:15:09PM +, Skip Montanaro wrote:
> Should you be pushing anything to 2.5?

I think, there is a security release planned in 2011.
Also, see issue11442  which was the specific case for pushing to 2.5.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Crash fixed in a791dd7d51f3 (3.2) and b4104ffd5127 (3.3), but the original 
problem remains, or a variant of it. I now get:

Init
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
Abandon

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10914] Python sub-interpreter test

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ouch, sorry, I got my commit message wrong.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10914] Python sub-interpreter test

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset a791dd7d51f3 by Antoine Pitrou in branch '3.2':
Issue #10914: fix bogus memory management in Modules/getpath.c, leading to a 
possible crash when calling Py_SetPath()
http://hg.python.org/cpython/rev/a791dd7d51f3

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11591] "python -S" should be robust against e.g. "from site import addsitedir"

2011-03-17 Thread Carl Meyer

Carl Meyer  added the comment:

Adding a test is easier said than done. The behavior change here depends on 
python being run with -S. Currently test_site skips itself if the test suite is 
run with -S, and if I remove that skip it crashes under -S.

Options as I see it:

1. Declare this one-liner correct by inspection. It doesn't break any existing 
tests.

2. Add a new test file (test_no_site.py?) that only runs with -S and tests that 
importing something from site doesn't trigger sys.path additions. This seems 
like the most reasonable test, but I'm not sure how useful it is, since I doubt 
most people ever try running the test suite with -S.

3. Make the fix more complicated such that it uses an intermediary variable 
which can be mocked (unlike sys.flags.no_site, which is read-only), and then 
add a test which mocks this variable, temporarily removes "site" from 
sys.modules, tries importing it again, and checks whether main() is called. 
This creates a complex test which is highly coupled to the implementation in 
site.py, but would be run under normal conditions (without -S).

Which option do you prefer?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, Palm's example even segfaults here:

Program received signal SIGSEGV, Segmentation fault.
0x772452bc in free () from /lib64/libc.so.6
(gdb) bt
#0  0x772452bc in free () from /lib64/libc.so.6
#1  0x0042a591 in Py_SetPath (
path=0x88c330 
L"/home/antoine/cpython/default/usr/lib/python33.zip:/home/antoine/cpython/default/usr/lib/python3.3/:/home/antoine/cpython/default/usr/lib/python3.3/plat-linux2:/home/antoine/cpython/default/usr/lib/py"...)
at ./Modules/getpath.c:729
#2  0x00416600 in main ()


The problem is calling free() on a pointer to statically allocated memory.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11320] Usage of API method Py_SetPath causes errors in Py_Initialize() (Posix ony))

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Sridhar: I'm sorry, but at this point you should investigate a bit more into 
the actual causes of the problem. I'm not going to dig in virtualenv myself. 
Also, since there's already #10743 for the virtualenv issue, perhaps further 
virtualenv-related comments should be posted there.

(Palm, I take it your issue doesn't have anything to do with virtualenv?)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11573] Improve Unicode Documentation with Known Caveats

2011-03-17 Thread STINNER Victor

STINNER Victor  added the comment:

Can you provide a patch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11574] Unicode Fallback Encoding on Python 3.3

2011-03-17 Thread STINNER Victor

STINNER Victor  added the comment:

In my experience (PYTHONFSENCODING, sys.setfilesystemencoding()): Python should 
just use the same encoding than the locale encoding because *all* other 
programs on the system use the locale encoding. If none of LANG, LC_ALL or 
LC_CTYPE env var is set: Python does use ASCII just because nl_langinfo() 
answers ASCII.

Said differently: get_codeset() doesn't fail if there is no environment 
variable. If get_codeset() does fail: Python stops immediatly with a fatal 
error, it doesn't fallback to ASCII or something like that.

Python < 3.2 used ASCII at startup until the locale encoding codec was loaded 
(to avoid a bootstrap issue). But I fixed the bootstrap issue in Python 3.2: 
Python does now *always* use the locale encoding, even at startup. Before the 
codec is complelty loaded: Python uses _Py_char2wchar() to decode filenames 
(and other data).

For more information, see also a previous attempt: issue #8725.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5421] Irritating error message by socket's sendto method

2011-03-17 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you for the patch! This is now fixed in 3.x.

--
nosy: +pitrou
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
versions: +Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5421] Irritating error message by socket's sendto method

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c61b72b0650d by Antoine Pitrou in branch '3.1':
Issue #5421: Fix misleading error message when one of socket.sendto()'s
http://hg.python.org/cpython/rev/c61b72b0650d

New changeset 2af7a6d765fd by Antoine Pitrou in branch '3.2':
Issue #5421: merge fix
http://hg.python.org/cpython/rev/2af7a6d765fd

New changeset 90cdc371a3b8 by Antoine Pitrou in branch 'default':
Issue #5421: merge fix
http://hg.python.org/cpython/rev/90cdc371a3b8

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11592] Compilation warnings in os module

2011-03-17 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Under Linux:

./Modules/posixmodule.c: In function ‘posix_readv’:
./Modules/posixmodule.c:6239: attention : implicit declaration of function 
‘readv’
./Modules/posixmodule.c: In function ‘posix_writev’:
./Modules/posixmodule.c:6583: attention : implicit declaration of function 
‘writev’

Yet the presence of sys/uio.h seems correctly detected:

$ grep UIO pyconfig.h
#define HAVE_SYS_UIO_H 1

--
assignee: rosslagerwall
messages: 131287
nosy: pitrou, rosslagerwall
priority: normal
severity: normal
status: open
title: Compilation warnings in os module
type: behavior
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11591] "python -S" should be robust against e.g. "from site import addsitedir"

2011-03-17 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks.  Would you mind adding tests in test_site?

--
nosy: +eric.araujo
versions: +Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low
versions:  -Python 3.1, Python 3.2, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

-1

I think this will make the code harder to understand and maintain.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5421] Irritating error message by socket's sendto method

2011-03-17 Thread Matt Joiner

Matt Joiner  added the comment:

This bug is very misleading in Py3, as the TypeError makes one think that a 
string is being passed rather than bytes (how else do you get a 2 argument 
function call wrong?). Very difficult to determine that this is not in fact the 
bug in a dynamically typed language :P

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread knickerkicker

knickerkicker  added the comment:

Creating a inline function would require passing the stackpointer variable so 
that the TOP() and POP() macros continue working, and creating
variables for u, v and x. I am not sure if that will not have a performance 
impact - ideally it shouldn't, but can we trust the compilers to see what we're 
upto?

Also, the DISPATCH() macro will still need to be outside the inline function.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10812] Add some posix functions

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8945e087a5a6 by Ross Lagerwall in branch 'default':
Issue #10812: Revert os.lseek change.
http://hg.python.org/cpython/rev/8945e087a5a6

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11591] "python -S" should be robust against e.g. "from site import addsitedir"

2011-03-17 Thread Carl Meyer

Changes by Carl Meyer :


--
keywords: +patch
Added file: http://bugs.python.org/file21274/87df1d37c88e.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11591] "python -S" should be robust against e.g. "from site import addsitedir"

2011-03-17 Thread Carl Meyer

New submission from Carl Meyer :

If python is run with the -S flag, that declares the intent of the user to not 
have site-specific additions to sys.path.

However, some code in that process may have a legitimate need for a function 
defined in site.py - for instance, addsitedir. But the act of importing 
site.py, as a side effect, adds the standard site-specific directories to 
sys.path.

python -S would be more useful and reliable if it prevented importing site from 
automatically making the sys.path additions. There is no loss of flexibility 
here, as user code could still explicitly call site.main() to achieve all of 
the current side-effects of "import site".

The fix is a one-liner, and is in the linked hg repository.

--
components: Library (Lib)
hgrepos: 4
messages: 131281
nosy: carljm
priority: normal
severity: normal
status: open
title: "python -S" should be robust against e.g. "from site import addsitedir"
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-17 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

up!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5421] Irritating error message by socket's sendto method

2011-03-17 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

ping?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Robert Withrow

Robert Withrow  added the comment:

> it needs to be worded in a way that doesn't
> imply that the struct implementation is broken or misdesigned. 

Agree.

> A better note would focus on the basic (and obvious)
> fact that downgrading from double precision to single
> precision entails a loss of precision.

Sort of where I was going, but I'm sure my text could be vastly improved.

> The suggested examples are misleading because they 
> use 6.24 which is not exactly representable in binary
> floating point.

I'd quibble with this for two reasons:

1) to be precise, numbers which are not exactly representable in binary 
floating point would nonetheless pass the unpack(pack) test if you use the 'd' 
format character.  The key issue is, as you said, loss of precision.

2) I don't understand why the 6.24 example is "misleading" when it accurately 
demonstrates the issue.

One comment about portability I forgot to mention earlier:  I don't know how 
wed Python is to '754 or even binary floating point representations.  My 
personal belief is that it should be possible to write a test so that the 
unpack(fmt, pack(fmt, precision_truncate(number))) == 
precision_truncate(number) test works for any legal number on any platform.  I 
don't like the idea that one has to pick specific numbers based on knowledge of 
the platform's floating point format.

I acknowledge that this may not bother others as much as it bothers me though.  
I'm a portability nut.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11563] test_urllibnet is triggering a ResourceWarning

2011-03-17 Thread Jeff McNeil

Jeff McNeil  added the comment:

So, it turned out to be more complicated than that.  The HTTPConnection object 
returns an HTTPResponse, but never closes the underlying socket after calling 
makesock. 

Since persistent connections aren't supported, nothing actually closes  the 
socket itself, it's just set to None.  Explicitly calling a close turns out not 
to be correct either.

I went down the same path as AbstractHTTPHandler and added a Connection: close 
header.  That ensures that the remote host will close the underlying connection 
(more importantly, setting the HTTP Response object's will_close to True).  
That ensures  HTTPConnection performs in a "fire and forget" mode, causing 
everything to close out as it should.

I contemplated changing urlretrieve to use build_opener as urlopen does, but I 
figure that would have been done by now if it was a trivial operation. I'd be 
happy to take a whack at it if it's just a matter of getting around to it.

--
keywords: +patch
Added file: http://bugs.python.org/file21273/11562.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10812] Add some posix functions

2011-03-17 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
assignee:  -> rosslagerwall
resolution:  -> accepted
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The suggested examples are misleading because they use 6.24 which is not 
exactly representable in binary floating point.  Representation issues are 
orthogonal to the OP's issue which is really just a simple rounding example:

>>> x = float.fromhex('0x0.123456001')
>>> unpack('!f', pack('!f', x))[0].hex()
'0x1.23456p-4'

Also, if something like the suggested note is adopted, it needs to be worded in 
a way that doesn't imply that the struct implementation is broken or 
misdesigned.  

A better note would focus on the basic (and obvious) fact that downgrading from 
double precision to single precision  
entails a loss of precision.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10812] Add some posix functions

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 525320df8afb by Ross Lagerwall in branch 'default':
Issue #10812: Add some extra posix functions to the os module.
http://hg.python.org/cpython/rev/525320df8afb

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
nosy: +stutzbach

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10979] setUpClass exception causes explosion with "-b"

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9c09ba72136e by Michael Foord in branch 'default':
Closes issue 10979. unittest buffering now works with class and module setup 
and teardown
http://hg.python.org/cpython/rev/9c09ba72136e

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Robert Withrow

Robert Withrow  added the comment:

> If you agree that Python actually behaves correct, I fail to
> understand what it is that you disagree with in msg131195

I don't agree that Python is behaving correctly as far as the documented 
contract for struct is concerned.

I disagree with the statement in the preceding msg74708 which says:

> people should read general CS introductory material
> to learn how floating point numbers work.

Aside from being patronizing it doesn't solve the problem in any meaningful way.

> If you use numbers that are exactly representable as floats,
> the test should be portable to all platforms that use 32-bit
> IEEE-754 floats.

A reasonable suggestion, but it is a constrained definition of "portable".  
Since most (or nearly all?) modern platforms use '754 it is probably not a bad 
constraint, given that struct explicitly uses '754.

> If you then also use numbers without a fractional
> part, it should even port to non-IEEE platforms

I confess, the "CS introductory material" I read 30 years ago (predating '754) 
don't give me enough information to know if this is correct.

Anyway:

> If all you want is a documentation change, can you please propose
> specific wording?

It isn't exactly "all I want", but it is a good start.  I note that msg74705 
suggests adding documentation to struct about the 'f' format code.

First of all, as far as I know, struct is the only place where this issue of 32 
bit versus 64 bit floating point numbers shows up in Python because the rest of 
Python uses only 64 bit numbers.  (Is there anywhere else in Python where a 32 
bit float is converted to a 64 bit float?) So the documentation probably 
belongs in struct.

I would add to note 4 of 7.3.2.2 (in the 2.7.1 documentation) something like:

"Note that 32 bit representations do not generally convert exactly to 64 bit 
representations (which Python uses internally) so that the results of 
unpack(fmt,pack(fmt,number)) may not equal number when using the 'f' format 
character."

It would be friendly to add an example at the bottom demonstrating the issue 
and incorporating your comments about fractions and non-fractional values.

>>> x = unpack('!f', pack('!f', 6.24))[0]
>>> x == 6.24
False
>>> x = unpack('!f', pack('!f', 6.25))[0]
>>> x == 6.25
True

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11506] b'' += gives SystemError instead of SyntaxError

2011-03-17 Thread Andreas Stührk

Andreas Stührk  added the comment:

Added a test. Perhaps that should be done for other literals as well?

--
Added file: http://bugs.python.org/file21272/issue_11506.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11506] b'' += gives SystemError instead of SyntaxError

2011-03-17 Thread Andreas Stührk

Changes by Andreas Stührk :


Removed file: http://bugs.python.org/file21140/issue_11506.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10979] setUpClass exception causes explosion with "-b"

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0f7036ea0930 by Michael Foord in branch '3.2':
Issue #10979. unittest stdout buffering now works with class and module setup 
and teardown.
http://hg.python.org/cpython/rev/0f7036ea0930

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11470] Flag inappropriate uses of callable class attributes

2011-03-17 Thread Thomas Wouters

Changes by Thomas Wouters :


Removed file: http://bugs.python.org/file21088/nonmethod-warn-nongit.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11470] Flag inappropriate uses of callable class attributes

2011-03-17 Thread Thomas Wouters

Thomas Wouters  added the comment:

New version of the patch; instead of triggering at attribute *access*, this 
just checks when creating types and in type_setattro. It also makes the warning 
a newly added CompatibilityWarning. Also, instead of warning for all 
non-descriptors, it now only warns for PyCFunctionObjects that do not have a 
__self__ set, or of which __self__ is a module. (The reason for the latter 
being the new-ish behaviour of functions defined in modules in C getting passed 
something as __self__, defaulting to the module.) I've removed a few 
staticmethod calls from cases that do not trigger the new warning.

This patch still lacks tests and doc updates, but I'm uploading right now 
because the sprints apparently lose internet soonish.

--
Added file: http://bugs.python.org/file21271/nonmethod-warn.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11579] python 2.5 does not build from hg - looks for subversion keywords

2011-03-17 Thread Skip Montanaro

Skip Montanaro  added the comment:

See Issue 11439.

--
nosy: +skip.montanaro

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11581] buildbot error when pushing to 2.5 branch?

2011-03-17 Thread Skip Montanaro

Skip Montanaro  added the comment:

Should you be pushing anything to 2.5?

--
nosy: +skip.montanaro

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10979] setUpClass exception causes explosion with "-b"

2011-03-17 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d6abdd78d2af by Michael Foord in branch '2.7':
Issue #10979. unittest stdout buffering now works for class and module fixtures.
http://hg.python.org/cpython/rev/d6abdd78d2af

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Martin: in C I have the luxury of using 32 bit floats; not an option
> in Python.  Simple code doing the moral equivalent of NTOHL(HTONL())
> works in this case for C but wouldn't help for Python.

If you agree that Python actually behaves correct, I fail to
understand what it is that you disagree with in msg131195

If all you want is a documentation change, can you please propose
specific wording?

> Even worse, there is no straightforward way (that I'm aware of) to
> write portable tests for code using the 'f' format character.

If you use numbers that are exactly representable as floats,
the test should be portable to all platforms that use 32-bit
IEEE-754 floats. If you then also use numbers without a fractional
part, it should even port to non-IEEE platforms (as long as you
don't test for the intermediate bytes).

[...]
> This test will fail when you use the 'f' format code.

So use 6.25 instead.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11590] email quoprimime.py patch for header_encode of empty string, decode with different eol

2011-03-17 Thread Michael Henry

New submission from Michael Henry :

The attached patch adds unit tests and some minor fixes for the email
module's quoprimime.py file.  The header_encode() function did not
properly return an empty string when given an empty string.  The
decode() function did not properly detect the input string's EOL
character.

This patch depends on application of the patch in issue #11589.

--
components: Library (Lib)
files: quoprimime_patch_header_encode_decode.patch
keywords: patch
messages: 131265
nosy: michael.henry, r.david.murray
priority: normal
severity: normal
status: open
title: email quoprimime.py patch for header_encode of empty string, decode with 
different eol
Added file: 
http://bugs.python.org/file21270/quoprimime_patch_header_encode_decode.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4114] struct returns incorrect 4 byte float

2011-03-17 Thread Robert Withrow

Robert Withrow  added the comment:

Martin: in C I have the luxury of using 32 bit floats; not an option in Python. 
 Simple code doing the moral equivalent of NTOHL(HTONL()) works in this case 
for C but wouldn't help for Python.

Mark: I understand about the precision truncation issue and how Python does 
floating point arithmetic.  This C code clearly demonstrates what is going on:

#include 

int main(int argc, char *argv[])
{
  double d1 = 6.21;
  float f = 6.21;
  double d2 = f;
  
  printf("double: %.15f\n", d1);
  printf("float: %.15f\n", f);
  printf("double converted from float: %15.15f\n", d2);
}

The point here is about the contract of struct, NOT how Python does floating 
point arithmetic.  The contract is: what pack packs, unpack will unpack 
resulting in the original value.  At least, that is what the documentation 
leads you to believe.

For the 'f' format character, this contract is broken because of a basic 
implementation detail of Python and there is nothing in the documentation for 
struct that *directly* lets you know this will happen.  After all, the mentions 
in the documentation about 32 bit versus 64 bit talk about C not Python!

Even worse, there is no straightforward way (that I'm aware of) to write 
portable tests for code using the 'f' format character.  In my case I'm writing 
a tool that creates message codecs in multiple languages and the most basic 
unit test goes something like this:

m1 = example.message()
m1.f1 = 6.21
b = m.encode() # uses struct pack
m2 = example.message(b) # uses struct unpack
if m1 != m2:  # rich comparison
  print('fail')

This test will fail when you use the 'f' format code.

I suggest two things could be done to improve the situation:

1) Add a note to the documentation for struct that tells you that unpack(pack) 
using the 'f' format code will not generally give you the results you probably 
expect because .

2) Create a way in Python to write portable code related to 32 bit floats.  For 
example, if I had a way in Python to cause the precision truncation 
programmatically:

m1 = example.message()
m1.f1 = 6.21.as_32_bit_float() # Does the precision truncation upfront
b = m.encode() # uses struct pack
m2 = example.message(b) # uses struct unpack
if m1 != m2:  # rich comparison
  print('fail')

I'd expect this test to pass.

Hope this long-winded note helps.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11588] Add "necessarily inclusive" groups to argparse

2011-03-17 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +bethard

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11589] Unit test extensions for email module

2011-03-17 Thread Michael Henry

New submission from Michael Henry :

The attached patch includes additional unit tests for the email module,
and splits pre-existing test_header_encode() and test_decode() functions
into individual test functions.

--
components: Library (Lib)
files: test_email_additional_tests.patch
keywords: patch
messages: 131263
nosy: michael.henry, r.david.murray
priority: normal
severity: normal
status: open
title: Unit test extensions for email module
Added file: http://bugs.python.org/file21269/test_email_additional_tests.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11588] Add "necessarily inclusive" groups to argparse

2011-03-17 Thread John Didion

New submission from John Didion :

Just as some options are mutually exclusive, there are others that are 
"necessarily inclusive," i.e. all or nothing. I propose the addition of 
ArgumentParser.add_necessarily_inclusive_group(required=True).

This also means that argparse will need to support nested groups. For example, 
if I want to set up options such that the user has to provide an output file OR 
(an output directory AND (an output file pattern OR an output file extension)):

output_group = parser.add_mutually_exclusive_group(required=True)
output_group.add_argument("-o", "--outfile")
outdir_group = output_group.add_necessarily_inclusive_group()
outdir_group.add_argument("-O", "--outdir")
outfile_group = outdir_group.add_mutually_exclusive_group(required=True)
outfile_group.add_argument("-p", "--outpattern")
outfile_group.add_argument("-s", "--outsuffix")

The usage should then look like:

(-o FILE | (-O DIR & (-p PATTERN | -s SUFFIX))

--
messages: 131262
nosy: John.Didion
priority: normal
severity: normal
status: open
title: Add "necessarily inclusive" groups to argparse
type: feature request
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1681333] email.header unicode fix

2011-03-17 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Sadly, I agree with RDM.  There are too many workarounds in the field for this 
bug so it can really only be fixed in email6.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4492] httplib code thinks it closes connection, but does not

2011-03-17 Thread Ray.Allen

Changes by Ray.Allen :


--
nosy: +ysj.ray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Brian Curtin

Brian Curtin  added the comment:

I made a bunch of the stat changes in 3.2 so I'll assign this to myself and 
take a look.

--
assignee:  -> brian.curtin
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11577] testcase for exception binhex.Error

2011-03-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

This is fixed on default as well, I just stuffed the merge so the history looks 
odd and the integration script didn't pick it up.

You can see the additional changes I made in the linked changeset:
- try/except with a flag to clean up implicitly created file objects when 
binhex.__init__ fails
- change the getfileinfo code to use a with statement so it is also more 
exception tolerant

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11587] METH_KEYWORDS alone gives "METH_OLDARGS is no longer supported!"

2011-03-17 Thread Clive Darke

Clive Darke  added the comment:

Same error on 3.2 with Windows MSC v.1500 and Linux gcc version 4.1.2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11583] os.path.isdir() is slow on windows

2011-03-17 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Ok. It's probably not the most optimal thing we can do. It opens the directory 
with CreateFileW (specifying OPEN_EXISTING and BACKUP_SEMANTICS), then 
GetFileInformationByHandle. If we only want to find out whether the file is a 
directory, we could just to FindFirstFile, which wouldn't need to go to the MFT 
record.

I would be surprised if this makes a difference in practice, though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11505] string.py increased test coverage

2011-03-17 Thread Nick Coghlan

Nick Coghlan  added the comment:

Reopening to double check with Jerome's patch.

--
resolution: fixed -> 
stage: committed/rejected -> commit review
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-17 Thread R. David Murray

R. David Murray  added the comment:

If the message contains 8bit bytes in a header, then getitem is going to return 
a Header object.  decode_header does not operate on Header objects, as you have 
observed.  Thinking about it some more, having decode_header operate on a 
Header and return its chunks is a decent binary interface for Header.  This is 
right on the borderline between a feature and a bug fix, but given that getitem 
returning Header after a parse is a new feature in 3.2, I think I'm going to 
treat it as a bug that decode_header doesn't handle that case.

--
stage: test needed -> needs patch
title: email/header.py: missing str()ification, and bogus encode()s -> 
email.decode_header fails if msg.__getitem__ returns  Header object

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11587] METH_KEYWORDS alone gives "METH_OLDARGS is no longer supported!"

2011-03-17 Thread Ray.Allen

Ray.Allen  added the comment:

Looks like just the problem of error msg.

--
nosy: +ysj.ray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11586] Python/pythonrun.c: get_codec_name() typo

2011-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> haypo
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11587] METH_KEYWORDS alone gives "METH_OLDARGS is no longer supported!"

2011-03-17 Thread Clive Darke

New submission from Clive Darke :

In the PyMethodDef struct, METH_VARARGS | METH_KEYWORDS works fine.

METH_KEYWORDS on its own gives:
"SystemError: Bad call flags in PyCFunction_Call. METH_OLDARGS is no longer 
supported!"

METH_KEYWORDS on its own tested OK on 2.6 and 2.7, fails as described on 3.1.2 
and 3.2.

--
components: Extension Modules
messages: 131253
nosy: cdarke
priority: normal
severity: normal
status: open
title: METH_KEYWORDS alone gives "METH_OLDARGS is no longer supported!"
type: compile error
versions: Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11586] Python/pythonrun.c: get_codec_name() typo

2011-03-17 Thread Ray.Allen

New submission from Ray.Allen :

I guess there is a typo in the source of this function:
Python/pythonrun.c: get_codec_name()


diff -r 48970d754841 Python/pythonrun.c
--- a/Python/pythonrun.cThu Mar 17 17:06:27 2011 +0800
+++ b/Python/pythonrun.cThu Mar 17 22:11:15 2011 +0800
@@ -147,7 +147,7 @@
 goto error;
 
 name_utf8 = _PyUnicode_AsString(name);
-if (name == NULL)
+if (name_utf8 == NULL)
 goto error;
 name_str = strdup(name_utf8);
 Py_DECREF(name);

--
components: Interpreter Core
messages: 131252
nosy: ysj.ray
priority: normal
severity: normal
status: open
title: Python/pythonrun.c: get_codec_name() typo
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10535] Enable warnings by default in unittest

2011-03-17 Thread Brian Curtin

Brian Curtin  added the comment:

I'm not seeing those warnings anymore, so I think the patch can be ignored.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11582] Boilerplate code replaced in Python/ceval.c

2011-03-17 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Hmm, this kind of macros make it difficult to step line by line in a debugger. 
From this point of view, an inlined function would be better, I'm not sure if 
this can have a performance impact though.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11383] compilation seg faults on insanely large expressions

2011-03-17 Thread SilentGhost

SilentGhost  added the comment:

10**6 on the other hand seem to do the job

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11585] Documentation 1.8 shows Python 2 example

2011-03-17 Thread Clive Darke

Clive Darke  added the comment:

1.8. Keyword Parameters for Extension Functions

"Here is an example module which uses keywords, based on an example by Geoff 
Philbrick (philbr...@hks.com):"

The example which follows will not compile on Python 3.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11585] Documentation 1.8 shows Python 2 example

2011-03-17 Thread Clive Darke

New submission from Clive Darke :

Python 3.2 version attached

--
assignee: docs@python
components: Documentation
files: parrot.c
messages: 131246
nosy: cdarke, docs@python
priority: normal
severity: normal
status: open
title: Documentation 1.8 shows Python 2 example
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file21267/parrot.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11383] compilation seg faults on insanely large expressions

2011-03-17 Thread SilentGhost

SilentGhost  added the comment:

100k is, apparently, not enough on my system (linux2). test_crashers now fails. 
Are any system-specific details needed?

--
nosy: +SilentGhost

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11584] email/header.py: missing str()ification, and bogus encode()s

2011-03-17 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> r.david.murray
stage:  -> test needed
type:  -> behavior
versions: +Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11584] email/header.py: missing str()ification, and bogus encode()s

2011-03-17 Thread R. David Murray

R. David Murray  added the comment:

I don't see a test case here, did you forget to attatch something?

Also, in this:

  elf._msg[n] = email.header.make_header(email.header.decode_header(b))

unless 'b' is an ASCII-only string, it isn't going to work.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1681333] email.header unicode fix

2011-03-17 Thread R. David Murray

R. David Murray  added the comment:

Yes, I can well understand that feeling.  I've only relatively recently taken 
over maintaining the email package. I'm working my way through the old bug 
queue, and I can only deal with them in the context in which I find them.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1294959] Problems with /usr/lib64 builds.

2011-03-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue847812] 64 bit solaris versus /usr/local/lib

2011-03-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >