[issue5729] Allows tabs for indenting JSON output

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Updated and applied in r86022.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue10260] Add a threading.Condition.wait_for() method

2010-10-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
title: Add a thrading.Condition.wait_for() method -> Add a 
threading.Condition.wait_for() method

___
Python tracker 

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



[issue9974] tokenizer.untokenize not invariant with line continuations

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> My patch handles the described situation, albeit a bit poorly ...

Let us know when you've got a cleaned-up patch and have run the round-trip 
tests on a broad selection of files.

For your test case, don't feel compelled to use doctest.  It's okay to write a 
regular unittest and add that to the test suite.

--
assignee: rhettinger -> 
priority: normal -> low

___
Python tracker 

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



[issue10261] tarfile iterator without members caching

2010-10-31 Thread Karsten Wolf

New submission from Karsten Wolf :

It would be helpful to have a tarfile iterator that does not cache every 
archive member encountered.

This makes it nearly impossible to iterate over an archive with millions of 
files.

--
components: Library (Lib)
messages: 120041
nosy: karstenw
priority: normal
severity: normal
status: open
title: tarfile iterator without members caching
type: feature request

___
Python tracker 

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



[issue10261] tarfile iterator without members caching

2010-10-31 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

I assume you're using Python 2.x. because tarfile's memory footprint was 
significantly reduced in Python 3.0, see the patch in issue2058 and r62337. 
This patch was not backported to the 2.x branch back then. As the 2.x branch 
has been closed for new features, this is not going to happen in the future.

--
assignee:  -> lars.gustaebel
nosy: +lars.gustaebel

___
Python tracker 

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



[issue10261] tarfile iterator without members caching

2010-10-31 Thread Karsten Wolf

Karsten Wolf  added the comment:

Yes, I'm on 2.6. I checked the Python 3.x tarfile just for this one line in 
TarFile.next():

self.members.append(tarinfo)

to conclude it would have the same problem.

Reducing 2.5gb memory usage as measured in my particular case by 60%, still 
leaves 1.5gb ram burned which is too much on a 32-bit 2gb ram machine.

My solution was to comment out that line which worked perfectly for my case but 
may not be the solution for the module.

--

___
Python tracker 

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



[issue10254] unicodedata.normalize('NFC', s) regression

2010-10-31 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue10261] tarfile iterator without members caching

2010-10-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
type: feature request -> resource usage
versions: +Python 2.7, 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



[issue10262] Add --disable-abi-flags option to `configure`

2010-10-31 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

Some packagers might want to disable ABI flags. The attached patch adds 
--disable-abi-flags option to `configure`.

--
components: Build
files: python-abi-flags.patch
keywords: patch
messages: 120044
nosy: Arfrever, barry
priority: normal
severity: normal
status: open
title: Add --disable-abi-flags option to `configure`
versions: Python 3.2
Added file: http://bugs.python.org/file19443/python-abi-flags.patch

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Doug Hellmann

New submission from Doug Hellmann :

Running "python -m site" is supposed to print a report about the current import 
path and its components (like USER_BASE and USER_SITE).

This works under 2.6 and 3.1, but not 2.7.  No output is produced under 2.7 at 
all.  

When I add a print statement to the end of the module, I see that __name__ is 
set to "site" instead of "__main__", so the _script() function isn't being 
invoked at all.

--
components: Library (Lib)
messages: 120045
nosy: doughellmann
priority: normal
severity: normal
status: open
title: "python -m site" does not print path details
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



[issue10258] Fix resource warnings in test_tokenize

2010-10-31 Thread Brian Brazil

Brian Brazil  added the comment:

Fixing title.

--
title: Fix resource warnings in distutil test_tokenize -> Fix resource warnings 
in test_tokenize

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +eric.araujo, ncoghlan

___
Python tracker 

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



[issue10264] Fix resource warnings in test_smtplib

2010-10-31 Thread Brian Brazil

New submission from Brian Brazil :

Please see attached.

--
components: Tests
files: test_smtplib_fd_leak.patch
keywords: patch
messages: 120047
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Fix resource warnings in test_smtplib
versions: Python 3.3
Added file: http://bugs.python.org/file19444/test_smtplib_fd_leak.patch

___
Python tracker 

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



[issue9561] distutils: set encoding to utf-8 for input and output files

2010-10-31 Thread Mike Auty

Changes by Mike Auty :


--
nosy: +ikelos

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

Since it works for me (I tried both r84120, my old 2.7 build from August or so, 
and r86033, which is the 2.7 head), we'll need more information. The starting 
blurb from the interactive prompt would be a good place to start.

(-m was slightly broken from April-June or so during 2.7 development, so custom 
builds in that window may exhibit occasional weirdness)

--

___
Python tracker 

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



[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Brazil

New submission from Brian Brazil :

Please see attached.

It's possible that this change will lead to fds leaking if someone is passing 
in a fd, however a) this is consistent with how other modules (e.g. uu) do it 
and b) of the 2 (!) uses of this module I found on Google Codesearch, both pass 
in filenames.

--
components: Library (Lib)
messages: 120049
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Fix fd leak in sunau
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



[issue6715] xz compressor support

2010-10-31 Thread Per Øyvind Karlsen

Per Øyvind Karlsen  added the comment:

I've uploaded a new version of the patch to 
http://codereview.appspot.com/2724043/ now.

I'd be okay on doing maintenance directly against the CPython repository btw. :)

--

___
Python tracker 

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



[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Curtin

Brian Curtin  added the comment:

Forget the attachment?

--
nosy: +brian.curtin
type:  -> resource usage
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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Doug Hellmann

Doug Hellmann  added the comment:

I downloaded an OS X installer from python.org, but I don't remember the date I 
did that.

Here's the output when I start the interpreter:

$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
$ python
Python 2.7 (r27:82508, Jul  3 2010, 21:12:11) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

--

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

Note also that site.py runs twice when used with -m: once implicitly during 
interpreter startup, and a second time as the main module. Due to the way the 
interpreter starts up and figures out sys.path, it is possible for the implicit 
import to pick up the correct version, but for the explicit invocation to find 
an old version.

With my site.py patched to include a "print __name__" line, I get the following:

$ ./python -m site
site
__main__
sys.path = [
  
]
USER_BASE:  (exists)
USER_SITE:  (exists)
ENABLE_USER_SITE: True

The fact that you're only seeing one printout suggests to me that this is 
exactly the problem you're running into. The easiest way to confirm that is to 
run "python Lib/site.py" explicitly rather than via -m. That way you aren't 
relying on the second import working correctly (and I'm assuming you want to 
run this because you have doubts as to the correctness of the contents of your 
sys.path)

--

___
Python tracker 

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



[issue10266] uu.decode fd leak if in_file is a filename

2010-10-31 Thread Brian Brazil

New submission from Brian Brazil :

I missed this when fixing issue 10246. The attached patch fixes this and adds a 
test that produces a resource warning with the old code.

--
components: Library (Lib)
files: uu_decode_fd_leak.patch
keywords: patch
messages: 120054
nosy: bbrazil
priority: normal
severity: normal
status: open
title: uu.decode fd leak if in_file is a filename
versions: Python 3.3
Added file: http://bugs.python.org/file19445/uu_decode_fd_leak.patch

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Doug Hellmann

Doug Hellmann  added the comment:

Actually I'm trying to update the PyMOTW article about site, and I discovered 
that the output from the old examples that showed using --user-base and 
--user-site were no longer producing any output.  It looks like the build of 
2.7 I downloaded is fairly old, so I'll try updating that.

--

___
Python tracker 

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



[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Brazil

Brian Brazil  added the comment:

That'd help alright.

--
keywords: +patch
Added file: http://bugs.python.org/file19446/sunau_fd_leak.patch

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

r82508 is the correct release binary (created after the error I mentioned above 
was fixed).

I've CC'ed Ronald to see if he can shed any light - it may be a platform 
specific issue with the way sys.path is calculated.

--

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Doug Hellmann

Doug Hellmann  added the comment:

Ah, I assumed that since the revision number was older there might be a newer 
build available now.

--

___
Python tracker 

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



[issue10160] operator.attrgetter slower than lambda after adding dotted names ability

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The PyUnicode_GET_SIZE issue was still there, but I've fixed it and committed 
in r86036. Thanks for your contribution!

--
resolution:  -> fixed
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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

No, there won't be another binary release until 2.7.1 comes out. The SVN 
revision number ratchets up pretty fast, since it is counting checkins on *all* 
branches, even experimental ones.

--

___
Python tracker 

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



[issue10265] Fix fd leak in sunau

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It's possible that this change will lead to fds leaking if someone is
> passing in a fd

I don't think so, why do you say that?

That said, there's an indentation problem in your patch.

--
nosy: +pitrou

___
Python tracker 

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



[issue10264] Fix resource warnings in test_smtplib

2010-10-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +giampaolo.rodola, r.david.murray
stage:  -> patch review
type:  -> resource usage

___
Python tracker 

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



[issue10266] uu.decode fd leak if in_file is a filename

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Now that the previous patch has been committed, could you post a patch against 
current SVN?

--
nosy: +pitrou
type:  -> resource usage
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



[issue10241] gc fixes for module m_copy attribute

2010-10-31 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Oops, my patch doesn't work since m_base can be shared by more than one module 
instance.  I guess a different solution would be to cleanup the m_copy 
references on interpreter shutdown.  Somehow they would have to be found though.

--

___
Python tracker 

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



[issue10266] uu.decode fd leak if in_file is a filename

2010-10-31 Thread Brian Brazil

Brian Brazil  added the comment:

The patch is against current SVN.

--

___
Python tracker 

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



[issue10266] uu.decode fd leak if in_file is a filename

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Oops, sorry. I hadn't seen that this was about a different function.
I've committed the patch in r86037.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10265] Fix fd leak in sunau

2010-10-31 Thread Brian Brazil

Brian Brazil  added the comment:

Currently, if you pass in a fd it'll be closed by the __del__. My patch no 
longer does this so any use of the module depending on this behaviour could 
leak an fd. However, noone seems to use the module that way.

V2 attached.

--
Added file: http://bugs.python.org/file19447/sunau_fd_leak_v2.patch

___
Python tracker 

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



[issue10267] test_ttk_guionly leaks many references

2010-10-31 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This can be seen on all 3 branches:

$ ./python -m test.regrtest -uall -R 3:2 test_ttk_guionly
[306/349] test_ttk_guionly
beginning 5 repetitions
12345
.
test_ttk_guionly leaked [590, 590] references, sum=1180

--
components: Tkinter
messages: 120067
nosy: gpolo, pitrou
priority: high
severity: normal
status: open
title: test_ttk_guionly leaks many references
type: resource usage
versions: Python 2.7, 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



[issue9685] tuples should remember their hash value

2010-10-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



[issue6715] xz compressor support

2010-10-31 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

After starting to review the code, I'm becoming skeptical whether this is the 
right approach. This does way to much action in C, and thus becomes complicated 
but also limited.

An alternative approach would be to just expose lzma_code to Python, and then 
integrate that into the io architecture, i.e. as a subclass of RawIOBase. I.e. 
LZMAFile would go; if you want to compress to a file, use FileIO instead, and 
wrap that with a LZMAIO (say). LZMACompressor and Decompressor could stay if 
desired, although it seems more liblzma-like to have a single object for both 
compression and decompression.

In addition, I find the options object too complicated. It seems to serve 
documentation purposes only, so I wonder whether it could be reduced in code 
size.

--

___
Python tracker 

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



[issue10268] Add --enable-loadable-sqlite-extensions option to `configure`

2010-10-31 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

I would like to suggest introduction of --enable-loadable-sqlite-extensions 
option, so that packagers (and maybe other users) don't need to comment out 1 
line in setup.py. I'm attaching the patch.

--
components: Build
files: python-loadable-sqlite-extensions.patch
keywords: patch
messages: 120069
nosy: Arfrever, ghaering
priority: normal
severity: normal
status: open
title: Add --enable-loadable-sqlite-extensions option to `configure`
type: feature request
versions: Python 3.2
Added file: 
http://bugs.python.org/file19448/python-loadable-sqlite-extensions.patch

___
Python tracker 

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



[issue10268] Add --enable-loadable-sqlite-extensions option to `configure`

2010-10-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r86045

--
nosy: +benjamin.peterson
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue10264] Fix resource warnings in test_smtplib

2010-10-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r86046. Thanks

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10246] uu.encode fd leak if arguments are filenames

2010-10-31 Thread Brett Cannon

Brett Cannon  added the comment:

On Sat, Oct 30, 2010 at 06:04, Antoine Pitrou  wrote:
>
> Antoine Pitrou  added the comment:
>
> Committed in r85975 (3.2). I guess we'll do a big svnmerge to other branches 
> later.

Or not at all. I honestly have not been worrying about backporting
since these are minor changes that are more stylistic cleanup than
fixes that have to get in. While it's good to be doing this for 3.2, I
don't view it as critical enough to worry about backporting (although
I have no issue if people do a backport).

--

___
Python tracker 

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



[issue10110] Queue doesn't recognize it is full after shrinking maxsize

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Applied in r86049.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10246] uu.encode fd leak if arguments are filenames

2010-10-31 Thread Brian Brazil

Brian Brazil  added the comment:

The garbage collector should take care of the vast majority of these, it's only 
bugs in the C like issue 10253 that I'd worry about.

--

___
Python tracker 

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



[issue9846] ZipExtFile provides no mechanism for closing the underlying file object

2010-10-31 Thread Brian Curtin

Brian Curtin  added the comment:

A fix to this would help silence a number of ResourceWarning messages coming 
out of the test suite.

--
nosy: +brian.curtin

___
Python tracker 

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



[issue10025] random.seed not initialized as advertised

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Removed the inaccurate description.
See r86053.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10269] Fix some resource warnings in test_sax

2010-10-31 Thread Brian Brazil

New submission from Brian Brazil :

Please see attached.

--
components: Tests
files: test_sax_fd_leak.patch
keywords: patch
messages: 120077
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Fix some resource warnings in test_sax
versions: Python 3.3
Added file: http://bugs.python.org/file19449/test_sax_fd_leak.patch

___
Python tracker 

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



[issue10269] Fix some resource warnings in test_sax

2010-10-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r86055

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10270] Fix resource warnings in test_threading

2010-10-31 Thread Brian Brazil

New submission from Brian Brazil :

Please see attached.

--
components: Tests
files: test_threading_fd_leak.patch
keywords: patch
messages: 120079
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Fix resource warnings in test_threading
Added file: http://bugs.python.org/file19450/test_threading_fd_leak.patch

___
Python tracker 

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



[issue10271] warnings.showwarning should allow any callable object

2010-10-31 Thread lekma

New submission from lekma :

Overriding warnings.showwarning() with a c/python module function (from a 
c/python module) doesn't work because warn_explicit() only allow PyFunction or 
PyMethod objects to be called (unfortunately c/python module functions are of 
type PyCFunction).

Suggested changes in _warnings.c (from py3k) - not tested at all:

from:
412if (!PyMethod_Check(show_fxn) && !PyFunction_Check(show_fxn)) {
413PyErr_SetString(PyExc_TypeError,
414"warnings.showwarning() must be set to a "
415"function or method");

to:
412if (!PyCallable_Check(show_fxn)) {
413PyErr_SetString(PyExc_TypeError,
414"warnings.showwarning() must be set to a "
415"callable");

--
components: Library (Lib)
messages: 120080
nosy: lekma
priority: normal
severity: normal
status: open
title: warnings.showwarning should allow any callable object
type: feature request
versions: Python 2.6, Python 2.7, 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



[issue10271] warnings.showwarning should allow any callable object

2010-10-31 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon
nosy: +brett.cannon

___
Python tracker 

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



[issue10271] warnings.showwarning should allow any callable object

2010-10-31 Thread Brett Cannon

Changes by Brett Cannon :


--
versions:  -Python 2.6, Python 2.7, Python 3.1

___
Python tracker 

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



[issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

2010-10-31 Thread David Watson

David Watson  added the comment:

> FWIW, you can do the same on a Linux box, i.e. setup the host name
> and domain to some completely bogus values. And as David pointed out,
> without also updating the /etc/hosts on the Linux, you always get the
> resolver error with hostname -f I mentioned earlier on (which does
> a DNS lookup), so there's no real connection to the DNS system on
> Linux either.

Just to clarify here: there isn't anything special about
/etc/hosts; it's handled by a pluggable module which performs
hostname lookups in it alongside a similar module for the DNS.
glibc's Name Service Switch combines the views provided by the
various modules into a single byte-oriented namespace for
hostnames according to the settings in /etc/nssswitch.conf (this
namespace allows non-ASCII bytes, as the /etc/hosts examples
demonstrate).

http://www.kernel.org/doc/man-pages/online/pages/man5/nsswitch.conf.5.html
http://www.gnu.org/software/libc/manual/html_node/Name-Service-Switch.html

It's an extensible system, so people can write their own modules
to handle whatever name services they have to deal with, and
configure hostname lookup to query them before, after or instead
of the DNS.  A hostname that is not resolvable in the DNS may be
resolvable in one of these.

--
title: socket,  PEP 383: Mishandling of non-ASCII bytes in host/domain names -> 
socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names

___
Python tracker 

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



[issue9584] Allow curly brace expansion

2010-10-31 Thread Mathieu Bridon

Mathieu Bridon  added the comment:

I finally found the time to follow up on this issue, sorry for the absence of 
response.

The thread on Python-Ideas didn't really lead to a consensus (nor did it 
generate a lot of discussion).

Some wanted to see this in fnmatch, others in glob and others in shutils. Most 
thought glob was the appropriate place though, and this is also my opinion.

>From the Python documentation, fnmatch is a « Unix filename pattern matching » 
>while glob is a « Unix style pathname pattern expansion ».

This makes it clear to me that curly expansion has its place in glob, that 
would then use fnmatch to match the resulting list of expanded paths.

Here is a patch against the py3k branch.

The patch contains both the implementation, unit tests, and some changes to the 
documentation.

Note that could I only run the unit tests on Linux (Fedora 14 x86_64) which is 
the only system I have at hand.

--
title: Allow curly braces in fnmatch -> Allow curly brace expansion
Added file: 
http://bugs.python.org/file19451/0001-Curly-brace-expansion-in-glob.patch

___
Python tracker 

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



[issue9584] Allow curly brace expansion

2010-10-31 Thread Mathieu Bridon

Changes by Mathieu Bridon :


Removed file: http://bugs.python.org/file18497/curly-fnmatch.patch

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Ned Deily

Ned Deily  added the comment:

Unfortunately, the problem here is caused by having setuptools or Distribute 
installed. As released, both setuptools and Distribute install an 
easy-install.pth into site-packages to insert its "egg" into sys.path.  If you 
look inside the egg, you'll see it has its own site.py which gets executed 
first as a bootstrap to do sys.path manipulations after finding and importing 
the site module from the standard library.  So -m site actually runs the 
setuptools/distribute site module and not the expected standard library one.  
To work as expected, the problem needs to be corrected in setuptools and 
Distribute so you may want to open issues with both projects if necessary.

BTW, I was unable to reproduce the problem with a current Debian Linux system 
with the Debian distribute package installed; it seems that the package there 
is patched to not install easy-install.pth.  I expect you would see the problem 
there if you installed either manually.

--
nosy: +ned.deily
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue6715] xz compressor support

2010-10-31 Thread Per Øyvind Karlsen

Per Øyvind Karlsen  added the comment:

LZMAFile, LZMACompressor & LZMADecompressor are all inspired by and written to 
be as similar to bz2's for easier use & maintenance. I must admit that I 
haven't really put much thought into alternate ways to implement them beyond 
monkey see, monkey do.. ;)

LZMAOptions is a bit awkwardly written, but it doesn't serve documentation 
purposes only, it also exposes these values for max, min etc. to python (ie. as 
used by it's regression tests) and are also used when processing various 
compression options passed.

IMO it does serve a useful purpose, but certainly wouldn't hurt from being 
rewritten in some better way...

--

___
Python tracker 

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



[issue6715] xz compressor support

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I feel guilty of having said, some months ago, that "Well, I wouldn't say 
bz2module is the best module out there, but as you say it's probably good 
enough" (my words).

It's true that bz2module is not awful in terms of coding style or quality; the 
main issue with it is that uses outdated ways of doing I/O compared to what 
Python 3 recommends (that is, compose various building blocks together to allow 
for better re-use).

A point of reference is gzip, where the core compression routines (mostly 
wrappers) are in zlibmodule (in C), but the high-level file object is written 
in pure Python (and is composeable with other building blocks for fast buffered 
IO).

--

___
Python tracker 

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



[issue6715] xz compressor support

2010-10-31 Thread Per Øyvind Karlsen

Per Øyvind Karlsen  added the comment:

Hehe, don't feel guily on my part at least, I had already implemented it like 
this long before. :p

I guess I could rewrite it following these suggestions, but I probably won't be 
able to finish it in time for 3.2 beta.

--

___
Python tracker 

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



[issue10265] Fix fd leak in sunau

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r86067. Thank you Brian!

--
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



[issue7447] Sum() doc and behavior mismatch

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed in r86066, r86068 and r86069.

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 2.6

___
Python tracker 

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



[issue6715] xz compressor support

2010-10-31 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> LZMAFile, LZMACompressor & LZMADecompressor are all inspired by and
> written to be as similar to bz2's for easier use & maintenance. I
> must admit that I haven't really put much thought into alternate ways
> to implement them beyond monkey see, monkey do.. ;)

My concern really is with LZMAFile only. It uses stdio, and it really
shouldn't - we are trying to drop stdio in Python, as it's causing too
many problems. LZMACompressor/Decompressor may be fine.

> LZMAOptions is a bit awkwardly written, but it doesn't serve
> documentation purposes only, it also exposes these values for max,
> min etc. to python (ie. as used by it's regression tests) and are
> also used when processing various compression options passed.
> 
> IMO it does serve a useful purpose, but certainly wouldn't hurt from
> being rewritten in some better way...

If you are willing to do that, here is what I propose: rename the module
to _lzma, drop options and lzmafile from _lzma. Then write lzma.py,
which re-introduces this Options class in pure Python, as well as
reintroduces LZMAFile, wrapping io.FileIO. The various constants that
go into options should be exposed from _lzma using
PyModule_AddIntConstant (except perhaps for the ones that you define
yourself, such as LZMA_BEST_SPEED)

That assumes, of course, that there is a need to provide backwards
compatibility. I would personally be fine with *just* having the LZMA
symbolic constants exposed, leaving it to the user to determine which
constant serves which purpose (e.g. guessing what LZMA_DICT_SIZE_MIN
and LZMA_DICT_SIZE_MAX do when there is a dict_size keyword parameter
isn't too hard). But then, having the various options explained
in a consistent manner may be useful enough to preserve the Options
class.

--

___
Python tracker 

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



[issue10272] SSL handshake timeouts not caught by transient_internet

2010-10-31 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The issue here is that ssl is using its own exception class rather than the 
socket module's "timeout" class:

test test_httplib failed -- Traceback (most recent call last):
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/test_httplib.py",
 line 408, in test_networked
h.request('GET', '/')
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py",
 line 943, in request
self._send_request(method, url, body, headers)
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py",
 line 981, in _send_request
self.endheaders(body)
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py",
 line 939, in endheaders
self._send_output(message_body)
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py",
 line 791, in _send_output
self.send(msg)
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py",
 line 737, in send
self.connect()
  File 
"/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py",
 line 1086, in connect
server_hostname=server_hostname)
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", 
line 168, in wrap_socket
_context=self)
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", 
line 254, in __init__
raise x
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", 
line 250, in __init__
self.do_handshake()
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", 
line 429, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: _ssl.c:374: The handshake operation timed out

--
components: Tests
messages: 120090
nosy: pitrou
priority: low
severity: normal
status: open
title: SSL handshake timeouts not caught by transient_internet
type: behavior
versions: Python 2.7, 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



[issue6715] xz compressor support

2010-10-31 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> I guess I could rewrite it following these suggestions, but I probably won't 
> be able to 
> finish it in time for 3.2 beta.

The more I think about it, the more I feel like -1 about this code as
long as it uses stdio, and does buffering. We really don't need another
implementation of splitting a stream of bytes into lines.

--

___
Python tracker 

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



[issue775964] fix test_grp failing when NIS entries present

2010-10-31 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think this approach (of file19364) is reasonable.

--
nosy: +loewis

___
Python tracker 

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



[issue7402] Improve reduce example in doanddont.rst

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed in r86070, r86071, and r86072.

--

___
Python tracker 

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



[issue7402] Improve reduce example in doanddont.rst

2010-10-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Doug Hellmann

Doug Hellmann  added the comment:

That's strange.  I have Distribute 0.6.10, including an easy-install.pth file, 
installed under 2.6 and it doesn't exhibit the problem.  Is there some 
interaction between a change in Python 2.7 and Distribute?

--

___
Python tracker 

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



[issue9886] Make operator.itemgetter/attrgetter/methodcaller easier to discover

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixed.  See r86073.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9120] Reduce pickle size for an empty set

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Have looked at this again and think I don't care what happens to it.  The gain 
is minimal but it doesn't take much extra core.  Like Fred, I'm not sure having 
another code path to test and maintain just to save 5 bytes.

Unassigning.  If anyone except the OP feels strongly either way, either close 
it or apply it.

--
assignee: rhettinger -> 
type: feature request -> performance

___
Python tracker 

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



[issue10254] unicodedata.normalize('NFC', s) regression

2010-10-31 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue10263] "python -m site" does not print path details

2010-10-31 Thread Ned Deily

Ned Deily  added the comment:

For me, python2.6 exhibits the same behavior as python2.7, using either 
Distribute 0.6.14 or 0.6.10 for both (this is on OS X with a stock framework 
build but that should not be significant). Perhaps you have a file permissions 
problem with your 2.6 site-packages or sys.path isn't what you expect?  Try 
adding a print in the distribute site.py to verify whether it is being executed 
at startup time.

--

___
Python tracker 

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



[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-10-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I'll fix this in 2.7.

For 3.2, may remove the method entirely (for the reasons discussed on 
python-dev).

--
assignee: michael.foord -> rhettinger

___
Python tracker 

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



[issue7061] Improve 24.5. turtle doc

2010-10-31 Thread Éric Araujo

Éric Araujo  added the comment:

“Python” is lower-cased only when referring to the executable (as a file) 
itself.  When talking about the language, the implementation or the VM in an 
abstract way (not a file), It think it’s always “Python”.

--

___
Python tracker 

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



[issue775964] fix test_grp failing when NIS entries present

2010-10-31 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.3

___
Python tracker 

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



[issue9977] TestCase.assertItemsEqual's description of differences

2010-10-31 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-10-31 Thread Raymond Hettinger

New submission from Raymond Hettinger :

* Dedocument assertSetEqual, assertDictEqual, assertListEqual, and 
assertTupleEqual.  These are all automatically dispatched from assertEqual.  
The user need not call any of these directly.  These methods should not have 
been exposed in the docs.

* Add new names and dedocument old names for assertLess, assertLessEqual, 
assertGreater, assertGreaterEqual.   The new names are modeled after the gt, 
le, lt convention used elsewhere in the language.  This avoids to problems 
remembering the current spelling quirks (dropping the Than in LessEqual, 
pluralization, camel casing, being too long, etc).  New names will be assertLE, 
assertLT, assertGE, and assertGT.

* Add news names and dedocument assertRegexpMatches and assertNotRegexpMatches. 
 These names haves have multiple issues (they actually do a re.search not a 
re.match, they are long, the pluralization is inconsistent with the assertEqual 
convention, they don't agree with the names used in other unittest 
implementations such as PHPunit and Junit).  The new names will be assertRegexp 
and assertNotRegexp.

* Remove the assertItemsEqual method (which is new in 3.2).  Its semantics are 
not obvious from its name (i.e. duplicates matter, order does not matter, 
expects elements not items, has O(n**2) behavior after an impending bug fix, 
uses on equality for matching not hashing or ordering).  In most common cases, 
it is more explicit and flexible to use assertEqual after casting to a set, a 
list, or sorted list.  Also note that other unittest implementations such as 
PHPunit and JUnit do not have this method.  See 
http://mail.python.org/pipermail/python-dev/2010-October/105073.html 

* Recombine the package into a single file.  See 
http://mail.python.org/pipermail/python-dev/2010-October/105025.html and 
http://mail.python.org/pipermail/python-dev/2010-October/104887.html

* We need to review the camel cased spelling on two methods that are new in 
3.2.  Should it be assertIsinstance or assertIsInstance?
 assert

--
assignee: rhettinger
messages: 120100
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Clean-up Unittest API
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



[issue10273] Clean-up Unittest API

2010-10-31 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti, michael.foord

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-10-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I would prefer assertRegex to assertRegexp.

--
nosy: +pitrou

___
Python tracker 

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



[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-10-31 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue7059] 'checking getaddrinfo bug' doesn't output the result during ./configure

2010-10-31 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

The attached patch fixes output of `configure`.

--
keywords: +patch
nosy: +Arfrever, benjamin.peterson
Added file: http://bugs.python.org/file19452/python-configure-getaddrinfo.patch

___
Python tracker 

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



[issue7059] 'checking getaddrinfo bug' doesn't output the result during ./configure

2010-10-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

r86075

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-10-31 Thread Michael Foord

Changes by Michael Foord :


--
assignee: rhettinger -> michael.foord

___
Python tracker 

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



[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-10-31 Thread Michael Foord

Michael Foord  added the comment:

As this has been released in 2.7 (and unittest2) I don't think it can be just 
removed in 3.2 - it would make porting code from Python 2 to 3 more painful. 
Very happy for you to fix in Python 2.7. Please let me know when it goes in so 
that I can keep unittest2 up to date.

--
assignee: michael.foord -> rhettinger

___
Python tracker 

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



[issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual

2010-10-31 Thread Michael Foord

Michael Foord  added the comment:

David - would you get a good approximation of what you want simply with:

self.assertEqual(ascii(first), ascii(second))

(This actually returns "b'first'" "b'second'" so you may want a convenience 
function that chops the leading and trailing b'/')

As ascii returns unicode it would automatically delegate to 
assertMultilineEqual.

The obvious way to hook this up by default for assertEqual is having the 
split-character as '\n'. This would not be meaningful for using assertEqual to 
compare bytes that *aren't* text.

--

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-10-31 Thread Michael Foord

Michael Foord  added the comment:

In general *none* of this should be done until there is clear consensus on 
Python-dev and it isn't clear that this is the case.

* On the deocumenting: barry warsaw objects to public apis that aren't 
documented and gregory smith asserts (natch) that it *can* be useful to call 
these methods directly for the explicit type checking they do. Let's see how 
this discussion pans out.

* For the greater / less comparison methods (etc) they would have to be new 
names as Python 2.7, 3.1 and unittest2 have the old names. This makes the 
TestCase even *bigger*. Let's see if we can get any consensus on this on 
Python-dev. Like Antoine I prefer assertRegex to assertRegexp.

* Note that assertItemsEqual is not new in 3.2 it is new in 2.7. If we remove 
it we make porting code using Python 2.7 (or earlier with unittest2) 
unnecessarily hard. The functionality is still useful but I agree that making 
the slow path more efficient would be good.

* Recombining the package into a single file *will not* happen without a BDFL 
pronouncement. unittest is massively easier to maintain now.

* Review the camel casing on assertIsInstance - isn't this just bike shedding?

--
assignee: rhettinger -> michael.foord

___
Python tracker 

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



[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-10-31 Thread david

david  added the comment:

So I know the current patch doesn't support IP addresses but I thought I would 
link to what mozilla considered a security problem(just for future reference):

CVE-2010-3170: http://www.mozilla.org/security/announce/2010/mfsa2010-70.html

"Security researcher Richard Moore reported that when an SSL certificate was 
created with a common name containing a wildcard followed by a partial IP 
address a valid SSL connection could be established with a server whose IP 
address matched the wildcard range by browsing directly to the IP address. It 
is extremely unlikely that such a certificate would be issued by a Certificate 
Authority."

--

___
Python tracker 

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



[issue10274] imaplib should provide a means to validate a remote server ssl certificate(s)

2010-10-31 Thread david

New submission from david :

imaplib should provide a means to validate a remote server ssl certificate(s).

So currently imaplib allows you to do the following:

import imaplib
conn = imaplib.IMAP4_SSL("imap.gmail.com")

#the following should fail
conn = imaplib.IMAP4_SSL("74.125.39.109")
conn = 
imaplib.IMAP4_SSL("i.broke.the.internet.and.all.i.got.was.this.t-shirt.phreedom.org",
443)
conn = imaplib.IMAP4_SSL("insert_self_signed_imap_server_here")
However, only the first call("imap.gmail.com") should *NOT* result in an error 
being raised (if the certificate is being checked :) ).

I wasn't able to find a way to get imaplib.IMAP4_SSL to take the certificate 
for the remote server without wanting a private cert (which wasn't / isn't 
desired ).

If an option is added / method added that takes in an optional parameter to 
validate the remote IMAP's ssl certificate has been signed by a trusted 
certificate authority this would be a good solution.

--
components: None
messages: 120108
nosy: db
priority: normal
severity: normal
status: open
title: imaplib should provide a means to validate a remote server ssl 
certificate(s)
type: security
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



[issue8555] tkinter doesn't see _tkinter

2010-10-31 Thread py.user

Changes by py.user :


--
resolution: invalid -> fixed

___
Python tracker 

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



[issue10275] how to know that a module is a module, a function is a function ?

2010-10-31 Thread py.user

New submission from py.user :

>>> import os
>>> m = os
>>> type(m)

>>> isinstance(m, module)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'module' is not defined
>>> n = 1
>>> type(n)

>>> isinstance(1, int)
True
>>>

--
components: Interpreter Core
messages: 120109
nosy: py.user
priority: normal
severity: normal
status: open
title: how to know that a module is a module, a function is a function ?
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue10275] how to know that a module is a module, a function is a function ?

2010-10-31 Thread Brian Curtin

Brian Curtin  added the comment:

See the "types" module, specifically types.ModuleType. Compare that to your 
"type(os)" result.

This is not a support channel. Please see python-list for these types of 
questions.

--
nosy: +brian.curtin
resolution:  -> rejected
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



[issue8555] tkinter doesn't see _tkinter

2010-10-31 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Not sure, why changed the resolution. It is an invalid bug report. You could 
have resolved it by a little research or by asking around.

--
resolution: fixed -> invalid

___
Python tracker 

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