[issue1195571] simple callback system for Py_FatalError

2012-12-22 Thread Jonathan McDougall

Jonathan McDougall added the comment:

While trying to come up with a patch, I'm starting to realize the number
of modifications needed to make this work. Py_FatalError() is called all
over the place assuming that it never returns. The scope of this feature
is enormous.

I'm wondering what would happen if I threw an exception from there :)

--

___
Python tracker 

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



[issue16531] Allow IPNetwork to take a tuple

2012-12-22 Thread pmoody

pmoody added the comment:

Sorry. I thought I'd uploaded this earlier. I'm working on a version that 
pushes the parsing into _split_optional_netmask

--
Added file: http://bugs.python.org/file28402/issue16531-2.patch

___
Python tracker 

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



[issue15861] ttk.Treeview "unmatched open brace in list"

2012-12-22 Thread Guilherme Polo

Guilherme Polo added the comment:

I consider myself the main responsible for this bug, so if the current patch 
(which I didn't look at) passes all tests, doesn't slow things up (unlikely, I 
would think) and also works with some more involved styling code then I'm fine 
with it.

These formatting functions were added to the ttk module to make it easier to 
create and adjust styles using Python. It wouldn't be possible without them 
unless the person basically coded in Tcl while in Python. These functions ended 
up being used in other places (as was noticed here) for convenience. All in 
all, I'm glad someone else is using the module, reporting, and improving it.

--
nosy: +gpolo

___
Python tracker 

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



[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Brett Cannon

Brett Cannon added the comment:

This was committed in default through rev d22e9e3a3326 but there was some error 
in the connection from hg.python.org and so it didn't get tacked on.

Thanks to Thomas for the report and Berker for the patch!

--
nosy: +brett.cannon
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



[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1b9b7cb136db by Brett Cannon in branch '3.3':
Issue #16752: Add a missing import to modulefinder.
http://hg.python.org/cpython/rev/1b9b7cb136db

--
nosy: +python-dev

___
Python tracker 

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



[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-22 Thread Brett Cannon

Brett Cannon added the comment:

I would totally support tossing relative file paths in Python 3.4 as it has 
been nothing but backwards-compatibility headaches and is essentially wrong as 
the module's file is not relative to the current directory necessarily.

--

___
Python tracker 

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



[issue16745] Hide symbols in _decimal.so

2012-12-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ccc372b37fbb by Stefan Krah in branch '3.3':
Issue #16745: The gcc visibility pragma is buggy on OpenIndiana and NetBSD.
http://hg.python.org/cpython/rev/ccc372b37fbb

--

___
Python tracker 

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



[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-12-22 Thread Vance Maverick

Vance Maverick added the comment:

FYI, http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ is no longer 
online, so that workaround is no longer possible.

--
nosy: +Vance.Maverick

___
Python tracker 

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



[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Berker Peksag

Berker Peksag added the comment:

Here is a patch with a test case.

--
keywords: +patch
nosy: +berker.peksag
versions: +Python 3.4
Added file: http://bugs.python.org/file28401/issue16752.diff

___
Python tracker 

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



[issue16747] Remove 'file' type reference from 'iterable' glossary entry

2012-12-22 Thread Chris Jerdonek

Chris Jerdonek added the comment:

If you are changing just a few minor things, can you resubmit the patch without 
reflowing?  It will be easier to see what minor things have changed.  (It is 
okay to have the occasional short line to avoid having long lines.  Reflowing 
can be done as part of a separate commit if it is severe.)

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Antoine reminded me about a lock. In Python implementation it needed because 
linked list modifications are not atomic. In C implementation linked list 
modifications are atomic. However dict operations can call Python code and 
therefore they are not atomic. I don't know what bad things can happened with 
concurrent cache updating, however using lock will be safer and cheap enought.

Please add lock field to lru_cache_object and use it as in Python 
implementation. If no one can prove that a lock is not needed.

--
stage: commit review -> patch review

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Anatoly, we are not going to change the default buffering to the most 
inefficient possible to meet your expectation -- especially when there is a 
simple option to give you what you want. Unix/C and hence windows has two 
output streams because people often want the two streams to go to different 
places. Anyone who knows and uses the magic incantation '2>&1' to mix them 
together had better know (or learn) what this really means and what the options 
are. This issue has nothing in particular to do with Python.

--

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Thank you, Matt and Alexey.

Here is a simple benchmark. On my computer it shows 10-25x speedup using the C 
accelerator.

--
stage: needs patch -> commit review
Added file: http://bugs.python.org/file28400/lru_cache_bench.py

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

And arguably you shouldn't redirect stdout and stderr to the same place, except 
for temporary debugging purposes.

--
nosy: +pitrou
status: open -> closed

___
Python tracker 

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



[issue16752] Missing import in modulefinder.py

2012-12-22 Thread Thomas Heller

New submission from Thomas Heller:

It seems the statement
import importlib
is missing in 3.3's modulefinder.py

--
components: Library (Lib)
messages: 177951
nosy: theller
priority: normal
severity: normal
status: open
title: Missing import in modulefinder.py
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



[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-22 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



[issue16686] audioop overflow issues

2012-12-22 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



[issue1195571] simple callback system for Py_FatalError

2012-12-22 Thread Jonathan McDougall

Jonathan McDougall added the comment:

The latest patch does not allow changing the default behaviour of
aborting the process, which is for me a problem. I am both embedding
and extending python using Boost.Python, but scripting is optional. In
case python fails to initialize, I want to disable scripting but keep
the program running.

Libraries shouldn't abort; they should report errors to the caller and
let it figure out what to do.

--
nosy: +jonathanmcdougall

___
Python tracker 

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



[issue16618] Different glob() results for strings and bytes

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is an updated patches. I hope it satisfies Antoine's comments.

--
Added file: http://bugs.python.org/file28398/glob_dotfiles_3.patch
Added file: http://bugs.python.org/file28399/glob_tests-2.7_3.patch

___
Python tracker 

___diff -r 8006110102c5 Lib/glob.py
--- a/Lib/glob.py   Sat Dec 22 10:36:45 2012 +0100
+++ b/Lib/glob.py   Sat Dec 22 20:32:21 2012 +0200
@@ -57,8 +57,8 @@
 names = os.listdir(dirname)
 except OSError:
 return []
-if pattern[0] != '.':
-names = [x for x in names if x[0] != '.']
+if not _ishidden(pattern):
+names = [x for x in names if not _ishidden(x)]
 return fnmatch.filter(names, pattern)
 
 def glob0(dirname, basename):
@@ -82,3 +82,6 @@
 else:
 match = magic_check.search(s)
 return match is not None
+
+def _ishidden(path):
+return path[0] in ('.', b'.'[0])
diff -r 8006110102c5 Lib/test/test_glob.py
--- a/Lib/test/test_glob.py Sat Dec 22 10:36:45 2012 +0100
+++ b/Lib/test/test_glob.py Sat Dec 22 20:32:21 2012 +0200
@@ -31,7 +31,8 @@
 self.mktemp('a', 'bcd', 'efg', 'ha')
 if can_symlink():
 os.symlink(self.norm('broken'), self.norm('sym1'))
-os.symlink(self.norm('broken'), self.norm('sym2'))
+os.symlink('broken', self.norm('sym2'))
+os.symlink(os.path.join('a', 'bcd'), self.norm('sym3'))
 
 def tearDown(self):
 shutil.rmtree(self.tempdir)
@@ -44,10 +45,16 @@
 p = os.path.join(self.tempdir, pattern)
 res = glob.glob(p)
 self.assertEqual(list(glob.iglob(p)), res)
+bres = [os.fsencode(x) for x in res]
+self.assertEqual(glob.glob(os.fsencode(p)), bres)
+self.assertEqual(list(glob.iglob(os.fsencode(p))), bres)
 return res
 
 def assertSequencesEqual_noorder(self, l1, l2):
+l1 = list(l1)
+l2 = list(l2)
 self.assertEqual(set(l1), set(l2))
+self.assertEqual(sorted(l1), sorted(l2))
 
 def test_glob_literal(self):
 eq = self.assertSequencesEqual_noorder
@@ -56,15 +63,15 @@
 eq(self.glob('aab'), [self.norm('aab')])
 eq(self.glob('zymurgy'), [])
 
-# test return types are unicode, but only if os.listdir
-# returns unicode filenames
-uniset = set([str])
-tmp = os.listdir('.')
-if set(type(x) for x in tmp) == uniset:
-u1 = glob.glob('*')
-u2 = glob.glob('./*')
-self.assertEqual(set(type(r) for r in u1), uniset)
-self.assertEqual(set(type(r) for r in u2), uniset)
+res = glob.glob('*')
+self.assertEqual({type(r) for r in res}, {str})
+res = glob.glob(os.path.join(os.curdir, '*'))
+self.assertEqual({type(r) for r in res}, {str})
+
+res = glob.glob(b'*')
+self.assertEqual({type(r) for r in res}, {bytes})
+res = glob.glob(os.path.join(os.fsencode(os.curdir), b'*'))
+self.assertEqual({type(r) for r in res}, {bytes})
 
 def test_glob_one_directory(self):
 eq = self.assertSequencesEqual_noorder
@@ -93,18 +100,18 @@
 eq(self.glob('*', '*a'), [])
 eq(self.glob('a', '*', '*', '*a'),
[self.norm('a', 'bcd', 'efg', 'ha')])
-eq(self.glob('?a?', '*F'), map(self.norm, [os.path.join('aaa', 'zzzF'),
-   os.path.join('aab', 'F')]))
+eq(self.glob('?a?', '*F'), [self.norm('aaa', 'zzzF'),
+self.norm('aab', 'F')])
 
 def test_glob_directory_with_trailing_slash(self):
 # Patterns ending with a slash shouldn't match non-dirs
-res = glob.glob(os.path.join(self.tempdir, 'Z*Z') + os.sep)
+res = glob.glob(self.norm('Z*Z') + os.sep)
 self.assertEqual(res, [])
-res = glob.glob(os.path.join(self.tempdir, 'ZZZ') + os.sep)
+res = glob.glob(self.norm('ZZZ') + os.sep)
 self.assertEqual(res, [])
 # When there is wildcard pattern which ends with os.sep, glob()
 # doesn't blow up.
-res = glob.glob(os.path.join(self.tempdir, 'aa*') + os.sep)
+res = glob.glob(self.norm('aa*') + os.sep)
 self.assertEqual(len(res), 2)
 # either of these results are reasonable
 self.assertIn(set(res), [
@@ -115,22 +122,35 @@
 def test_glob_bytes_directory_with_trailing_slash(self):
 # Same as test_glob_directory_with_trailing_slash, but with a
 # bytes argument.
-res = glob.glob(os.fsencode(os.path.join(self.tempdir, 'Z*Z') + 
os.sep))
+res = glob.glob(os.fsencode(self.norm('Z*Z') + os.sep))
 self.assertEqual(res, [])
-res = glob.glob(os.fsencode(os.path.join(self.tempdir, 'ZZZ') + 
os.sep))
+res = glob.glob(os.fsencode(self.norm('ZZZ') + os.sep))
 self.assertEqu

[issue16618] Different glob() results for strings and bytes

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Aha! It's OS/2 where glob('*/') returns result without trailing slash. Here 
also glob() can return str (on 2.7) result for unicode pattern.

--

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread Charles-François Natali

Charles-François Natali added the comment:

To be more specific, for performance reasons, you definitely don't
want stdout to be line buffered when redirected to a file, but fully
buffered.
It makes sense to have stderr unbuffered or line buffered either way
to make sure that errors get printed - right away.
See http://www.delorie.com/gnu/docs/glibc/libc_226.html for an explanation.

--

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread Charles-François Natali

Charles-François Natali added the comment:

> I am not convinced that "won't fix" is the solution. If you're redirecting 
> both output streams to the same destination, you expect that the output will 
> appear in the final file exactly as it appears on the screen.

There's nothing to fix.
The order in which the output appears in the final file depends on the
buffering.

--
status: pending -> open

___
Python tracker 

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



[issue16749] Fatal Python Error

2012-12-22 Thread Leonardo DaVinci

Leonardo DaVinci added the comment:

Ok I'll try booting and installing in Mac to see if the issue reappears.

Thanks for your time.

Happy holidays.

Ciro

On Sat, Dec 22, 2012 at 9:46 AM, R. David Murray wrote:

>
> R. David Murray added the comment:
>
> Not really, I'm afraid.  You'd have to look at the crash dump in a
> debugger to get more useful information.  Perhaps one of the windows devs
> will have more concrete advice, I don't use Windows myself.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue16618] Different glob() results for strings and bytes

2012-12-22 Thread Hynek Schlawack

Hynek Schlawack added the comment:

Serhiy, are you going to update your patches? I can implement the feedback of 
our Q4 Community Service Award awardee too in case you’re busy.

--

___
Python tracker 

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



[issue16751] Using modern unittest asserts in the documentation

2012-12-22 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +michael.foord

___
Python tracker 

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



[issue16749] Fatal Python Error

2012-12-22 Thread R. David Murray

R. David Murray added the comment:

Not really, I'm afraid.  You'd have to look at the crash dump in a debugger to 
get more useful information.  Perhaps one of the windows devs will have more 
concrete advice, I don't use Windows myself.

--

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread anatoly techtonik

anatoly techtonik added the comment:

I am not convinced that "won't fix" is the solution. If you're redirecting both 
output streams to the same destination, you expect that the output will appear 
in the final file exactly as it appears on the screen.

tag:wart

--
status: closed -> pending

___
Python tracker 

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



[issue16745] Hide symbols in _decimal.so

2012-12-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 51b0a150f8aa by Stefan Krah in branch '3.3':
Issue #16745: Hide symbols in _decimal.so.
http://hg.python.org/cpython/rev/51b0a150f8aa

--

___
Python tracker 

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



[issue16746] clarify what should be sent to peps@

2012-12-22 Thread Chris Jerdonek

Chris Jerdonek added the comment:

By the way, thanks for the clarifying info, David.  Also, I thought I was the 
one that was going to be accused of reading the original text like a computer. 
:)

--

___
Python tracker 

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



[issue16746] clarify what should be sent to peps@

2012-12-22 Thread Chris Jerdonek

Chris Jerdonek added the comment:

This issue was just addressed by Nick's fix for issue 16581, specifically the 
following parts of http://hg.python.org/peps/rev/24d5623ab21e :

+ is a mailing list consisting of PEP editors.  All
+email related to PEP administration (such as requesting a PEP number
+or providing an updated version of a PEP for posting) should be sent to
+this address (no cross-posting please).
+
+
 Submitting a PEP
 
 
-The PEP editors assign PEP numbers and change their status.  Please send
-all PEP-related email to  (no cross-posting please).
-Also see `PEP Editor Responsibilities & Workflow`_ below.
-

 A PEP editor must subscribe to the  list.  All
-PEP-related correspondence should be sent (or CC'd) to
+correspondence related to PEP administration should be sent (or forwarded) to
  (but please do not cross-post!).

--
nosy: +ncoghlan
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



[issue16581] define "PEP editor" in PEP 1

2012-12-22 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks a lot, Nick.  It looks like you also went ahead and took care of issue 
16746. :)

--

___
Python tracker 

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



[issue16581] define "PEP editor" in PEP 1

2012-12-22 Thread Nick Coghlan

Nick Coghlan added the comment:

Committed, along with a few other changes, as 
http://hg.python.org/peps/rev/24d5623ab21e

Subsequent commit addresses Ezio's comment by changing the phrase to "list for 
contacting the PEP editors".

The attitude I mainly take to PEP 1 now is that if I notice cases where what it 
says and what we actually do really don't match, I update the PEP accordingly. 
If I get anything glaringly wrong, I trust people will yell at me on 
python-checkins about it :)

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



[issue16750] Python Code module implements uncomputable function

2012-12-22 Thread Mark Dickinson

Mark Dickinson added the comment:

Closing as invalid.  There's no issue with comparing code objects---__eq__ 
implements a perfectly good equivalence relation.  This is not an extensional 
definition of function equality.

--
nosy: +mark.dickinson
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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file28366/audioop.py

___
Python tracker 

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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file28365/audioop_tests.patch

___
Python tracker 

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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file28364/audioop.patch

___
Python tracker 

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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file28397/audioop_2.py

___
Python tracker 

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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file28396/audioop_2.py

___
Python tracker 

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



[issue16686] audioop overflow issues

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I found that the documentation contains a receipt which depends on the fact 
that bias() wraps around samples. Here is an updated patch. Also some docs 
changes included.

--
Added file: http://bugs.python.org/file28395/audioop_2.patch

___
Python tracker 

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



[issue16531] Allow IPNetwork to take a tuple

2012-12-22 Thread Nick Coghlan

Nick Coghlan added the comment:

IIRC, construction from existing instances in general is an issue in the 
current version of the module. One particularly murky question if it were 
allowed is what should happen if you pass an IPAdapter instance (which already 
has associated network info) rather than an ordinary IPAddress.

Forcing people to go through an integer or a string in that case, or call one 
of the explicit conversion methods, forces them to be explicit about the fact 
that they're deliberate discarding any other information associated with the 
original object. (Note that I like the 2-tuple idea - I'm just pointing out 
that allowing an IPAddress object as the first element of that 2-tuple isn't 
quite as straightforward as it may first appear)

--

___
Python tracker 

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



[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-22 Thread Nick Coghlan

Nick Coghlan added the comment:

So yes, any code that assumes __main__.__file__ is a relative path is just 
plain wrong, as Python provides no such guarantee. It may currently be either 
relative or absolute at the implementation's discretion.

If the status quo ever changes, it would be to switch to requiring that all 
module __file__ attributes be absolute paths (including in __main__).

--

___
Python tracker 

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



[issue16737] Different behaviours in script run directly and via runpy.run_module

2012-12-22 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, some glorious (in)consistency here:

$ cat > echo_file.py
print(__file__)

(2.7, old import system)
$ python -c "import echo_file"
echo_file.pyc
$ python -m "echo_file"
/home/ncoghlan/devel/play/echo_file.py
$ python echo_file.py
echo_file.py

(3.2, cache directories)
$ python3 -c "import echo_file"
echo_file.py
$ python3 -m "echo_file"
/home/ncoghlan/devel/play/echo_file.py
$ python3 echo_file.py
echo_file.py

(3.3, new import system)
$ ../py33/python -c "import echo_file"
./echo_file.py
$ ../py33/python -m "echo_file"
/home/ncoghlan/devel/play/echo_file.py
$ ../py33/python echo_file.py
echo_file.py

However, if we change Python's behaviour here, it's more likely to be in the 
direction of making __file__ reliably absolute, as allowing relative paths in 
__file__ can cause problems if the current directory ever changes. (I do wonder 
if this could be the reason nosetests doesn't work with -m, though).

--
nosy: +brett.cannon
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



[issue16712] collections.abc.Sequence should not provide __reversed__

2012-12-22 Thread Nick Coghlan

Nick Coghlan added the comment:

The observation about it incorrectly flagging __reversed__ as an expected 
method for Sequence objects is also valid.

--

___
Python tracker 

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



[issue16712] collections.abc.Sequence should not provide __reversed__

2012-12-22 Thread Nick Coghlan

Nick Coghlan added the comment:

This sounds like a legitimate complaint to me, as the one in the ABC will be at 
least marginally slower in CPython since it's written in Python while reversed 
uses a builtin C implementation.

Classing it as an enhancement rather than a behavioural bug though, as what we 
have now isn't *wrong*, it's just not optimal.

--
nosy: +ncoghlan
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks as for example stdout is line-buffered when output to terminal and 
block-buffered when redirected to file or pipe and stderr is line-buffered in 
any case in Python 3.3 (this a common behavior for all C programs). Or 
something like.

Python has an option -u to control this.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16689] stdout stderr redirection mess

2012-12-22 Thread Charles-François Natali

Charles-François Natali added the comment:

It's not an issue at all, it's simply buffering in effect.
Depending on the version, stdout/stderr is either unbuffured or fully buffered, 
see http://bugs.python.org/issue13597

Simply pass '-u' and streams will be unbuffered, and appear in the order in 
chich the print() calls are made.

--
nosy: +neologix
resolution:  -> invalid
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



[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Éric, can you submit a test which exposes the problem?

--
stage:  -> test needed

___
Python tracker 

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



[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No need to add this trivial class to test.support. Mixin can have different 
parameters in additional to 'module' (see 16659).

I found a lot of usages of this idiom in tests and some of them can't be 
changed so simple (for example test_genericpath and test_functools).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16694] Add pure Python operator module

2012-12-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't understand what is difference between v5 and v6.

--

___
Python tracker 

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



[issue16751] Using modern unittest asserts in the documentation

2012-12-22 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch update the documentation examples to use more modern 
unittest asserts.

--
assignee: docs@python
components: Documentation, Tests
files: docs_unittest_assert.patch
keywords: easy, patch
messages: 177924
nosy: docs@python, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Using modern unittest asserts in the documentation
type: enhancement
versions: Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28394/docs_unittest_assert.patch

___
Python tracker 

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