[issue15767] add ModuleNotFoundError

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

Should it be ModuleNotFoundError or ModuleNotFound? It's not necessarily an 
error if a module doesn't exist, so failing to find it isn't quite that 
negative. It also acts somewhat like StopIteration/GeneratorExit which also 
don't have the common Error suffix of exception names.

--

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



[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Mark Dickinson

Mark Dickinson added the comment:

The first patch looks great (modulo a stray extra line in test_int). Thank you!

Let's just apply that for now; I'll open a new issue for the suggested 
OverflowError / ValueError switch.  (Getting rid of the TypeError seems a clear 
win to me;  switching the OverflowError to ValueError may be more 
controversial.)

--

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



[issue15767] add ModuleNotFoundError

2012-11-15 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
stage: needs patch - test needed

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



[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed in http://hg.python.org/cpython/rev/a2b54b6d9759.  Thanks for the report 
and patch.

--
resolution:  - fixed
status: open - closed

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



[issue16391] add terminator ctor argument to logging.StreamHandlers derived handlers

2012-11-15 Thread Nikolay Bryskin

Nikolay Bryskin added the comment:

Great, thanks!

--

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



[issue16483] Make int(float('inf')) raise ValueError rather than OverflowError.

2012-11-15 Thread Mark Dickinson

New submission from Mark Dickinson:

[Broken out of the issue 16469 discussion about infinity - Fraction and nan - 
Fraction conversions.]

Conversions from float('inf') or Decimal('inf') to int (or Fraction) currently 
generate an OverflowError, while conversions from nan give a ValueError.  I'm 
of the opinion that it would make more sense for both conversions to generate 
ValueError, and I'm opening this issue to track discussion for that.  There's 
also a reasonable case that the behaviour is fine as it is, and there's little 
to be gained by changing it.

--
messages: 175642
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: Make int(float('inf')) raise ValueError rather than OverflowError.
type: enhancement
versions: Python 3.4

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



[issue9893] Removing the Misc/Vim/ files

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

Files removed in 7e37a6c76e36.

--
resolution:  - fixed
status: open - closed

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



[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Mark Dickinson

Mark Dickinson added the comment:

See issue #16483 for the ValueError / OverflowError switch.  To be honest, 
while I would have preferred ValueError to OverflowError for int(float('inf')) 
if we were doing this from scratch, I'm not convinced that it's actually worth 
switching.

--

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



[issue7620] Vim syntax highlight

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

7e37a6c76e36 removed the Misc/Vim files since we just were not staying on top 
of them. Thanks for the patch regardless, July. If the syntax file in Vim 
itself is off I would submit those as I have found the Vim maintainers very 
willing to accept fixes.

--
resolution:  - wont fix
status: open - closed

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



[issue9084] vimrc: use matchall() instead of :match to allow multiple matches

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

7e37a6c76e36 removes the files in Misc/Vim. Thanks for the patch regardless, 
Daniel. If the syntax file in Vim is out of date then I would suggest trying to 
submit a patch. I have found the Vim maintainer quite willing to take fixes.

--
resolution:  - wont fix
status: open - closed

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



[issue15783] decimal.localcontext(None) fails when using the C accelerator module

2012-11-15 Thread Mark Dickinson

Mark Dickinson added the comment:

 Should we go ahead with this?

Sure:  if you're willing to write the patch, go for it.

--

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



[issue9893] Removing the Misc/Vim/ files

2012-11-15 Thread Éric Araujo

Éric Araujo added the comment:

Did you decide against including README.vim after all or just forgot that part?

--

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



[issue16479] Can't install Python 3 on Redhat Linux, make failed

2012-11-15 Thread Stephen

Stephen added the comment:

Please ignore this. I have figured out it was caused by our company's make 
wrapper. Using native make works like a charm.

--

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



[issue15767] add ModuleNotFoundError

2012-11-15 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Since it subclasses ImportError, it seems like we're already considering it to 
be an error?  StopIteration and GeneratorExit don't inherit from an Error 
exception type unlike, say, the OSError exception types.

--

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



[issue15767] add ModuleNotFoundError

2012-11-15 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I meant to include this link for convenience:

http://docs.python.org/dev/library/exceptions.html#exception-hierarchy

--

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



[issue16479] Can't install Python 3 on Redhat Linux, make failed

2012-11-15 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, closing then.

--
nosy: +pitrou
resolution:  - invalid
status: open - closed

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



[issue16478] Fix division in tabnanny

2012-11-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +georg.brandl

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



[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned

2012-11-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The C implementation writes and reads BINBYTES and BINUNICODE up to 4G (on 
64-bit platform). The Python implementation writes and reads BINBYTES and 
BINUNICODE up to 2G. What should be compatible fix? Allow the Python 
implementation to write and read up to 4G? Then Python can pickle a large data 
which can't be unpickled on non-patched Python (and on 2.7). Limit size to 2G? 
Then non-patched Python (including 3.1) can pickle a data which can't be 
unpickled on patched Python.

Also there is an unpleasant fact that 64-bit Python can pickle data which can't 
unpickle 32-bit Python.

--

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



[issue16483] Make int(float('inf')) raise ValueError rather than OverflowError.

2012-11-15 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Patch is attached (ported from full issue patch for issue 16469).

--
keywords: +patch
nosy: +kachayev
Added file: http://bugs.python.org/file27993/issue16483.diff

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



[issue16469] Exceptions raised by Fraction() different from those raised by int()

2012-11-15 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Ok, I think that ValueError is more appropriate and I have already attached 
adopted patch for issue 16483.

--

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



[issue10049] Add a no-op (null) context manager to contextlib

2012-11-15 Thread Dwayne Litzenberger

Dwayne Litzenberger added the comment:

After seeing a context manager named like TempfileIfNeeded(..., cond), whole 
sole purpose is to handle the conditional case, I'm firmly +1 on this proposal.

It's much easier to just read with Tempfile() if cond else nullcontext(): 
than to read through another level of indirection every time someone wanted 
some conditional logic on a context manager.

Is there any chance that this issue could be reopened?

Perhaps a more elegant solution would be to modify the with statement so that 
any object can be given to it (then we could just use None directly), but I 
suspect that would be a tad more controversial. ;)

--
nosy: +DLitz

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



[issue16386] imp.find_module does not specify registry key it searches on windows

2012-11-15 Thread Eric Snow

Eric Snow added the comment:

I agree with Andrew.

--

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



[issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object

2012-11-15 Thread Eric Snow

Eric Snow added the comment:

Though I haven't been able to get to this, I do have a demo of sorts that I've 
been using elsewhere:

https://bitbucket.org/ericsnowcurrently/pylt/src/default/pylt/_importing.py?at=default#cl-225

--

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



[issue15767] add ModuleNotFoundError

2012-11-15 Thread Eric Snow

Eric Snow added the comment:

I'd say ModuleNotFoundError.  You could argue that other exception types aren't 
really errors in certain circumstances.  I'd think that generally this would be 
an error.

--

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



[issue15767] add ModuleNotFoundError

2012-11-15 Thread Eric Snow

Eric Snow added the comment:

Effectively the exception indicates that the import system had an error.

--

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



[issue15031] Split .pyc parsing from module loading

2012-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Perhaps go a bit more generic and call it something like load_cached_data?

--

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



[issue10049] Add a no-op (null) context manager to contextlib

2012-11-15 Thread Nick Coghlan

Nick Coghlan added the comment:

No, an empty ExitStack() instance already works fine as a no-op context manager 
in 3.3: 
http://docs.python.org/3/library/contextlib#simplifying-support-for-single-optional-context-managers

We're not going to add a dedicated one under a different name.

--

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



[issue9893] Removing the Misc/Vim/ files

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

I decided against it. If Emacs doesn't already have one I figured Vim shouldn't 
either.

--

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



[issue15031] Split .pyc parsing from module loading

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

You can't use data as there are connotations for that word thanks to 
get_data(). Same goes for load since this is something that get_code() would 
use more directly than load_module().

--

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



[issue15894] _PyImport_ReInitLock() doesn't check return value of PyThread_acquire_lock

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

The chances of this being a problem is REALLY small and the single function 
that calls this is a public void function so there is no way for an exception 
to propagate short of a fatal error which seems a bit much.

I did change to using NOWAIT_LOCK, though.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

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



[issue10966] eliminate use of ImportError implicitly representing SkipTest

2012-11-15 Thread Brett Cannon

Brett Cannon added the comment:

I'm at PyCon Argentina Friday and Saturday, so I have a rare opportunity to get 
stuff done. If anyone has issues or comments, please get them in over the next 
day or so, else I'm going to check this in as-is.

--

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



[issue16423] urllib data URL recipe

2012-11-15 Thread Mathias Panzenböck

Mathias Panzenböck added the comment:

New patch. Instead of adding the data URL support to the doc as a recipe I 
added it to urllib.request directly. I think this is better and justified, 
because the old legacy URLopener had (some kind) of support for data URLs.

OT: I think that the legacy URLopener has bugs. It only unquotes the data if 
it's base64 encoded, but it should be unquoted in any case. Also it returns a 
StringIO and decodes the content as latin-1. This is wrong, the content is a 
binary string. It could be text encoded in any kind of charset or not text at 
all (e.g. an image).

--
Added file: http://bugs.python.org/file27994/urllib.request-data-url.patch

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



[issue16423] urllib data URL

2012-11-15 Thread Mathias Panzenböck

Changes by Mathias Panzenböck grosser.meister.mo...@gmx.net:


--
components: +Library (Lib) -Documentation
title: urllib data URL recipe - urllib data URL
type:  - enhancement

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



[issue16483] Make int(float('inf')) raise ValueError rather than OverflowError.

2012-11-15 Thread Case Van Horsen

Case Van Horsen added the comment:

I agree that ValueError is a more correct exception but I also don't think 
OverflowError is all that wrong. I don't think the change is worth the risk of 
breaking existing code.

I'd be fine with either option.

--
nosy: +casevh

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



[issue16478] Fix division in tabnanny

2012-11-15 Thread Georg Brandl

Georg Brandl added the comment:

Well, sounds reasonable since we're working with an integer number of spaces :)

--

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



<    1   2