[issue1191964] asynchronous Subprocess

2014-04-16 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2014-04-16 Thread Martin Panter

Martin Panter added the comment:

I don’t think these ones could be so easily fixed, but on my computer “pydoc” 
references:

* library/importlib.machinery.html (ideally should be 
library/importlib.html#module-importlib.machinery)
* library/tkinter.font.html (not in Python documentation at all that I am 
aware, except for brief mention in §25.1.1)

--
nosy: +vadmium

___
Python tracker 

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



[issue21106] Updated Mac folder icon

2014-04-16 Thread Vivek Jain

Vivek Jain added the comment:

No reply from Apple yet, so I'm guessing at this stage they won't be 
responding. Does anyone have any contacts at Apple they could nudge to have a 
look at this? :) The other option is to recreate something that looks like 
Apple's folder icon but isn't. There is a tutorial at 
http://www.tutorial9.net/tutorials/photoshop-tutorials/photoshop-tutorial-design-the-mac-os-x-leopard-folder/
 (I actually used the tutorial to create the current icon, but I only used step 
10).

--

___
Python tracker 

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



[issue5904] strftime docs do not explain locale effect on result string

2014-04-16 Thread David Wolever

David Wolever added the comment:

It may also be worth noting that the strftime formatters table now includes 
examples from different locales: 
https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior

This change was introduced about a year ago.

--

___
Python tracker 

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



[issue21240] Add an abstactmethod directive to the Python ReST domain

2014-04-16 Thread Georg Brandl

Georg Brandl added the comment:

LGTM without having tested it.

--

___
Python tracker 

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



[issue5904] strftime docs do not explain locale effect on result string

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

This may help: 
http://blog.codekills.net/2013/04/13/strftime--table-of-locale-aware-formatters-in-different-locales/

--
nosy: +wolever

___
Python tracker 

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2014-04-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
title: tempfile.NamedTemporaryFile can close the file too early, if not 
assigning to a variablwe -> tempfile.NamedTemporaryFile can close the file too 
early, if not assigning to a variable

___
Python tracker 

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



[issue21272] use _sysconfigdata.py in distutils.sysconfig to initialize distutils.sysconfig

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

Because removing distutils.sysconfig would break things.

--

___
Python tracker 

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



[issue1062] nice to have a way to tell if a socket is bound

2014-04-16 Thread Martin Panter

Martin Panter added the comment:

The suggested subclass might have to call the default bind(("", 0)) before 
running certain other operations, including connect(), send[to](), 
recv[from](), since these operations are meant to automatically bind if 
necessary.

--
nosy: +vadmium

___
Python tracker 

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



[issue16349] Document whether it's safe to use bytes for struct format string

2014-04-16 Thread Martin Panter

Martin Panter added the comment:

The issue of Struct.format being a byte string has been raised separately in 
Issue 21071.

--

___
Python tracker 

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



[issue21071] struct.Struct.format is bytes, but should be str

2014-04-16 Thread Martin Panter

Martin Panter added the comment:

This is closely related to Issue 16349. If format strings were explicitly 
allowed to be byte strings there would be less conflict, but documenting the 
data type of the “format” attribute is better than nothing.

--
nosy: +vadmium

___
Python tracker 

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



[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Serhiy, Gregory, Raymond, Antoine: so what is your feeling on 
> this issue? Is it worth it?

I don't think it is worth it.  There may be some cases that benefit, but it 
adds extra branching code to the common cases (sets and dicts) that already 
have the identity check.

--

___
Python tracker 

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



[issue21279] str.translate documentation incomplete

2014-04-16 Thread Martin Panter

Martin Panter added the comment:

I suspect “iterable” is the wrong term.

>>> isinstance(set(), Iterable)
True
>>> "abc".translate(set())
TypeError: 'set' object does not support indexing
>>> "abc".translate(object())
TypeError: 'object' object is not subscriptable

Maybe “indexable” or “subscriptable” would be more correct? If this behaviour 
is part of the API, it would be nice to document, because it would have saved 
me a few times from implementing the __len__() and __iter__() methods of the 
mapping interface in my custom lookup tables.

Here is my suggestion:

str.translate(table):

Return a copy of the string where all characters have been mapped through 
“table”, a lookup table. The lookup table must be a subscriptable object, for 
instance a dictionary or list, mapping Unicode ordinals (integers) to Unicode 
ordinals, strings or None. If a character is not in the table, the subscript 
operation should raise LookupError, and the character is left untouched. 
Characters mapped to None are deleted.

--
nosy: +vadmium

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread Martin Panter

Martin Panter added the comment:

If you do go ahead and add “except Exception” clauses, maybe look around at 
what other exceptions are being handled. The other day I stumbled across this 
in “tkinter.font” module:

try:
...
except (KeyboardInterrupt, SystemExit):
raise
except Exception:
pass

It would have been simpler (and semantically equivalent) to write

try:
...
except Exception:
pass

--
nosy: +vadmium

___
Python tracker 

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



[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c2f6551c9eaf by Benjamin Peterson in branch 'default':
support setting fpu precision on m68k (closes #20904)
http://hg.python.org/cpython/rev/c2f6551c9eaf

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue21248] BROWSER env var described inaccurately in webbrowser docs

2014-04-16 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for the bug report. The documentation has been fixed in the active 
versions.

--
versions: +Python 3.4, Python 3.5 -Python 2.7

___
Python tracker 

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




[issue21248] BROWSER env var described inaccurately in webbrowser docs

2014-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 503bf9dee28e by Senthil Kumaran in branch '3.4':
Clarify BROWSER envar behavior in webbrowser.py. Noted by David Turner. Closes 
#21248
http://hg.python.org/cpython/rev/503bf9dee28e

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-16 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Yes. And thanks for the patch. I applied a slight variation of it.

--

___
Python tracker 

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



[issue21171] Outdated usage str.encode('rot-13') in rot13 codec

2014-04-16 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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

___
Python tracker 

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



[issue21229] Path used for HTTP PUT request doesn't match the description

2014-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 57c66f85942d by Senthil Kumaran in branch '3.4':
Correct the URL in the http.client example. Noted by Evens Fortuné. Closes 
#21229
http://hg.python.org/cpython/rev/57c66f85942d

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Several areas for attention:
* Changes to the test suite probably should not be made
  The user doesn't benefit in any way and you risk
  unintentionally breaking the test suite in a way that
  isn't obvious (we have no tests for the tests themselves
  so changing tests is like refactoring without a safety net).
* Some of the exception handling in IDLE needs to catch
  all exceptions (i.e. SystemExit and KeyboardInterrupt
  are supposed to display tracebacks and not terminate
  IDLE itself).
* Changing the exceptions in threading.py is worrisome.
* The Pdb debugger may have legitimate reasons to catch
  all exceptions (like IDLE, we want don't want to 
  terminate the debugger itself).

In other words, many of the proposed changes should not
be made.  

For the rest, be careful to not change semantics
unintentionally and consider adding tests if you think
there is a real bug.   In cases where there is doubt
about the right thing to do, consider assigning the
original author or maintainer of the code.

--

___
Python tracker 

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



[issue21272] use _sysconfigdata.py in distutils.sysconfig to initialize distutils.sysconfig

2014-04-16 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Apr 16, 2014, at 10:12 PM, Matthias Klose wrote:

>
>distutils/sysconfig still parses the Makefile and config header; it should
>use the same approach now as the toplevel sysconfig module.

Why do we still have two sysconfig modules?

--
nosy: +barry
title: use _sysconfigdata.py in distutils.sysconfig to initialize 
distutils.sysconfig -> use _sysconfigdata.py in distutils.sysconfig to
initialize distutils.sysconfig

___
Python tracker 

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



[issue18628] Better index entry for encoding declarations

2014-04-16 Thread R. David Murray

R. David Murray added the comment:

Thanks, Sam.

--
nosy: +r.david.murray
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread STINNER Victor

STINNER Victor added the comment:

> If you (Victor) want to individually study each one to make sure it is the 
> right thing to do, I would place more faith in the patch. But as it stands 
> now, reviewing the patch for correctness will take substantially more care 
> and thought than it took to create it in the first place.

Agreed. I would like to help Stéphane to fix these issues. I agree
that the huge patch must be splitted, I just explained how the patch
should be splitted and how Stéphane can provide more useful patches.

--

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread STINNER Victor

STINNER Victor added the comment:

@Raymond: To give you more context, Stéphane is sprinting at Pycon on Pycon. I 
suggested him to fix all bare "except: pass". His first patch is wrong, but 
ignoring any exception is even worse.

--

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread STINNER Victor

STINNER Victor added the comment:

> 3) replace "except: pass" with more precise exceptions like "except OSError:" 
> => please write multiple small patches for this part

You may even open a new issue just for "except: pass" => "except OSError: pass"

--

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed  issue21259-replace_except_pass-2.patch. Please split this huge 
patch into smaller patches:

1) remove dummy "except: raise"
2) use os.unlink()
3) replace "except: pass" with more precise exceptions like "except OSError:" 
=> please write multiple small patches for this part
4) generic change "except: pass" to "except Exception: pass"

You might open a new issue for these 4 kind of patches (4 issues).

--

___
Python tracker 

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



[issue18628] Better index entry for encoding declarations

2014-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0413e0b1f76d by R David Murray in branch '3.4':
#18628: clarify index entry for source file encoding declaration.
http://hg.python.org/cpython/rev/0413e0b1f76d

New changeset 7c2dcb18146c by R David Murray in branch 'default':
Merge: #18628: clarify index entry for source file encoding declaration.
http://hg.python.org/cpython/rev/7c2dcb18146c

New changeset 2a793df32be5 by R David Murray in branch '2.7':
#18628: clarify index entry for source file encoding declaration.
http://hg.python.org/cpython/rev/2a793df32be5

--
nosy: +python-dev

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Please don't close the issue, Stéphane is fixing real bug.

He appears to be doing a blanket search and replace without adding tests, 
without evaluating each change to see if makes sense, and without consulting 
the original author of each affected piece of code.

We have never received a bug report on any one of these.  If you think any one 
of them is an actually bug, it should be carefully considered one at a time, 
evaluating why the bare except was put there in the first place.  

Guido pushes for holistic refactoring for a reason.  It is too easy to 
introduce bugs into stable code by these kind of wholesale changes.

If you (Victor) want to individually study each one to make sure it is the 
right thing to do, I would place more faith in the patch.  But as it stands 
now, reviewing the patch for correctness will take substantially more care and 
thought than it took to create it in the first place.

--

___
Python tracker 

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



[issue21151] winreg.SetValueEx causes crash if value = None

2014-04-16 Thread Dave Odell

Dave Odell added the comment:

Patch works on my end.

--

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread STINNER Victor

STINNER Victor added the comment:

> FYI, the two are not equivalent.

I don't get your point, the purpose of the change is to get ride of "except: 
pass" which is *bad*.

> Even then, the new code would be slower than the original,

I don't understand why you are talking about performances here. Ignore 
SystemExit and KeyboardInterrupt is a huge bug, performances don't matter here.

I don't want to benchmark, but I expect that performances are exactly the same 
if no exception is raised.

Please don't close the issue, Stéphane is fixing real bug.

I agree that it would be better to split the large patch is shorter parts. Or 
all changes replacing "except: pass" should be grouped into the same patch.

Replacing "except: ; raise" with "except Exception: ; raise" is 
wrong.

--
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue21101] Extend the PyDict C API to handle cases where the hash value is known

2014-04-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think we can start with making them private. Do you know of any third-party 
code bases which may be interested in the speedup?

--

___
Python tracker 

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



[issue21028] ElementTree objects should support all the same methods as Element objects

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Given Stephan's concerned, I withdraw this feature request.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue21101] Extend the PyDict C API to handle cases where the hash value is known

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Antoine, do you support adding these as part of the public API?  If not, I can 
make them private.

I think the functions are broadly useful, but no one has ever asked for this 
functionality either.

--

___
Python tracker 

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



[issue21259] replace "except: pass" by "except Exception: pass"

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

After more consideration, I'm going to reject the patch because it doesn't 
really make the code better and may make it worse (changing semantics, slower, 
etc).   Any such changes should be done holistically as part of a deeper 
refactoring on an individual module.  

I appreciate the patch effort but would like to avoid code churn for nearly 
zero benefit.

--
assignee:  -> rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue21279] str.translate documentation incomplete

2014-04-16 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
keywords: +easy
stage:  -> patch review
versions: +Python 3.4, Python 3.5 -Python 3.3

___
Python tracker 

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



[issue21234] __contains__ and friends should check "is" for all elements first

2014-04-16 Thread Raymond Hettinger

Raymond Hettinger added the comment:

>  when doing an operation that does linear search through a container,
> the interpreter checks all items one by one, first checking identity
> and then equality.

This is the guaranteed behavior.  Changing it would result in subtle change in 
semantics (i.e. an equality match early in a sequence would be bypassed in 
favor of a later identity match).

The current behavior also has favorable cache characteristics (i.e. each 
element is accessed exactly once) which provide benefits for long lists that 
cannot fit in L1 or L2 cache.

That said, I feel your pain.  Slow __eq__ tests are the bane of linear search.  
I recommend using a hashed container for fast searching or that you use a tool 
like PyPy that gives significant speed-ups.

--
resolution:  -> rejected
status: open -> closed
versions:  -Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue21279] str.translate documentation incomplete

2014-04-16 Thread bob gailer

New submission from bob gailer:

Documentation for str.translate only mentions a dictionary for the translation 
table. Actually any iterable can be used, as long as its elements are integer, 
None or str.

Recommend wording:

str.translate(translation_table)

Return a copy of the s where all characters have been "mapped" through the 
translation_table - which must be either a dictionary mapping Unicode ordinals 
(integers) to Unicode ordinals, strings or None,
or an iterable. In this case the ord() of each character in s is used as an 
index into the iterable; the corresponding element of the iterable replaces the 
character. If ord() of the character exceeds the index range of the iterator, 
no substitution is made.

Example: to shift any of the first 255 ASCII characters to the next:

>>> 'Now is the time for all good men'.translate(range(1, 256))
'Opx!jt!uif!ujnf!gps!bmm!hppe!nfo'

COMMENT: I placed mapped in quotes as technically this only applies to 
dictionaries. Not sure what the best word is.

--
assignee: docs@python
components: Documentation
messages: 216630
nosy: bgailer, docs@python
priority: normal
severity: normal
status: open
title: str.translate documentation incomplete
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue12148] Clarify "or-ing together" doctest option flags

2014-04-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue21272] use _sysconfigdata.py in distutils.sysconfig to initialize distutils.sysconfig

2014-04-16 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +dstufft, eric.araujo
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue21230] imghdr does not accept adobe photoshop mime type

2014-04-16 Thread Faiz Abbasi

Faiz Abbasi added the comment:

Hey, just checking in on this?

--

___
Python tracker 

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



[issue5904] strftime docs do not explain locale effect on result string

2014-04-16 Thread Caelyn McAulay

Caelyn McAulay added the comment:

Added to Docs that strftime will return a locale dependent byte string.

--
keywords: +patch
nosy: +math_foo
Added file: http://bugs.python.org/file34940/issue5904.patch

___
Python tracker 

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



[issue21277] don't try to link _ctypes with a ffi_convenience library

2014-04-16 Thread Matthias Klose

Matthias Klose added the comment:

the list of libs should be just: ('ffi', 'ffi_pic')

--

___
Python tracker 

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-16 Thread Daniel Black

Changes by Daniel Black :


--
nosy: +grooverdan

___
Python tracker 

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



[issue21088] curses addch() argument position reverses in Python3.4.0

2014-04-16 Thread Larry Hastings

Larry Hastings added the comment:

Here's my version of the patch, which is like Victor's patch but adds a test.

For what it's worth, I'll make sure this issue is fixed before I release 3.4.1.

--
Added file: 
http://bugs.python.org/file34939/larry.curses.window.addch.y.x.1.diff

___
Python tracker 

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



[issue12148] Clarify "or-ing together" doctest option flags

2014-04-16 Thread Caelyn McAulay

Caelyn McAulay added the comment:

I grepped for 's together' and found two instances of "or's together" in the 
docs which I reworded to use bitwise-or instead, in the attached patch.

--
keywords: +patch
nosy: +math_foo
Added file: http://bugs.python.org/file34938/issue12148.patch

___
Python tracker 

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



[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-16 Thread Stefan Krah

Stefan Krah added the comment:

Larry Hastings  wrote:
> Andreas, is there someone who would normally check this in for you, or should 
> I do it?

Traditionally Mark commits the floating point stuff. :)

--

___
Python tracker 

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



[issue20904] HAVE_PY_SET_53BIT_PRECISION for m68k

2014-04-16 Thread Larry Hastings

Larry Hastings added the comment:

Okay, I say let's check this in.  If mirabilos can cite problems it causes we 
can revert it.

Andreas, is there someone who would normally check this in for you, or should I 
do it?

--

___
Python tracker 

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



[issue20438] inspect: Deprecate getfullargspec?

2014-04-16 Thread Larry Hastings

Larry Hastings added the comment:

+1 to doc deprecation and adding a DeprecationWarning for 3.5.

--

___
Python tracker 

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



[issue21227] Decimal class error messages for integer division aren't good

2014-04-16 Thread Stefan Krah

Stefan Krah added the comment:

The idea behind the list as the exception message is this:  If multiple
conditions would have raised the signal they are all listed, while the
"highest ranking" signal is the one that is ultimately raised.

>>> from decimal import *
>>> c = getcontext()
>>> for v in c.traps:
... c.traps[v] = True
... 
>>> 
>>> Decimal(8) ** 1000
Traceback (most recent call last):
  File "", line 1, in 
decimal.Overflow: [, , 
]

Exception precedence is listed here at the bottom of the page:

http://speleotrove.com/decimal/daexcep.html

--

___
Python tracker 

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



[issue17861] put opcode information in one place

2014-04-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b187c9e3e92 by Thomas Wouters in branch 'default':
Fix Tools/scripts/generate_opcode_h.py from issue #17861 to work correctly
http://hg.python.org/cpython/rev/2b187c9e3e92

--

___
Python tracker 

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



[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-16 Thread Christian Theune

Changes by Christian Theune :


--
keywords: +patch
Added file: http://bugs.python.org/file34937/4ae151db1bd9.diff

___
Python tracker 

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



[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-16 Thread Christian Theune

Christian Theune added the comment:

I managed to create a patch that relies (in hopefully reasonably safe manner) 
on embedding an object repr for identification in this and similar cases. This 
is basically what implements what Martin suggested.

Caveat emptor: my C knowledge is only good enough to be dangerous. Thomas 
Wouters and RDM helped me through it.

I haven't adapted the tests yet (lots of failures due to the output change) but 
I managed them to stop crashing.

The 'repr.py' in the root is my current testbed to see what's going on.

--
nosy: +ctheune, r.david.murray, twouters

___
Python tracker 

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



[issue17752] many distutils tests fail when run from the installed location

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

The xx module is built by the unit tests IIRC.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue21235] importlib's spec module create algorithm is not exposed

2014-04-16 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue21240] Add an abstactmethod directive to the Python ReST domain

2014-04-16 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue21199] Python on 64-bit Windows uses signed 32-bit type for read length

2014-04-16 Thread Larry Hastings

Larry Hastings added the comment:

Here's my version of the patch.  It does the same thing Victor's patch does, 
but removes a now-completely-irrelevant stanza of code, and adds a test.

I'm on 64-bit Linux, so the test was always going to work anyway.  So I tested 
the test by changing file_read to use an int (and the "i" format unit), which 
happily causes it to fail.

--
stage:  -> patch review
Added file: http://bugs.python.org/file34936/larry.file_read.8.bytes.1.diff

___
Python tracker 

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



[issue21278] Running the test suite with -v makes the test_ctypes and the test_zipimport erroneously reported as failed

2014-04-16 Thread ddve...@ucar.edu

New submission from ddve...@ucar.edu:

Running 

EXTRATESTOPTS='-x test_gdb -uall -v' make testall

Produces:


test_csv
test_ctypes
test test_ctypes produced unexpected output:
**
Trying:
from ctypes import *
Expecting nothing
ok
Trying:
array = (c_char_p * 5)()
Expecting nothing
ok
Trying:
print array._objects
Expecting:
None
ok
Trying:
array[4] = 'foo bar'
Expecting nothing
ok
Trying:
array._objects
Expecting:
{'4': 'foo bar'}
ok
Trying:
array[4]
Expecting:
'foo bar'
ok
Trying:
class X(Structure):
_fields_ = [("x", c_int), ("y", c_int), ("array", c_char_p * 5)]
Expecting nothing
ok
Trying:
x = X()
Expecting nothing
ok
Trying:
print x._objects
Expecting:
None
ok
Trying:
print x.array._b_base_ # doctest: +ELLIPSIS
Expecting:

ok
Trying:
x.array[0] = 'spam spam spam'
Expecting nothing
ok
Trying:
x._objects
Expecting:
{'0:2': 'spam spam spam'}
ok
Trying:
x.array._b_base_._objects
Expecting:
{'0:2': 'spam spam spam'}
ok
2 items had no tests:
ctypes.test.test_objects.TestCase
ctypes.test.test_objects.TestCase.test
1 items passed all tests:
  13 tests in ctypes.test.test_objects
13 tests in 3 items.
13 passed and 0 failed.
Test passed.

**
test_curses
.
test_zipimport
test test_zipimport produced unexpected output:
**
Trying:
log.append(True)
Expecting nothing
ok
1 items passed all tests:
   1 tests in xyz.txt
1 tests in 1 items.
1 passed and 0 failed.
Test passed.
Trying:
log.append(True)
Expecting nothing
ok
1 items passed all tests:
   1 tests in xyz.txt
1 tests in 1 items.
1 passed and 0 failed.
Test passed.

**
test_zipimport_support
test_zlib
366 tests OK.
4 tests failed:
test_ctypes test_urllib2net test_urllibnet test_zipimport
26 tests skipped:
test_aepack test_al test_applesingle test_bsddb test_bsddb185
test_bsddb3 test_cd test_cl test_curses test_dl test_gl
test_imageop test_imgfile test_kqueue test_linuxaudiodev
test_macos test_macostools test_msilib test_ossaudiodev
test_pep277 test_scriptpackages test_startfile test_sunaudiodev
test_winreg test_winsound test_zipfile64
2 skips unexpected on linux2:
test_bsddb test_bsddb3

Clearly the test_ctypes and the test_zipimport are not failing but the test 
suite thinks so. In fact, rerunning without the -v let them succeed.

--
messages: 216616
nosy: ddve...@ucar.edu
priority: normal
severity: normal
status: open
title: Running the test suite with -v makes the test_ctypes and the 
test_zipimport erroneously reported as failed
versions: Python 2.7

___
Python tracker 

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



[issue21202] Naming a file` io.py` causes cryptic error message

2014-04-16 Thread Christian Theune

Changes by Christian Theune :


--
hgrepos: +238

___
Python tracker 

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



[issue21227] Decimal class error messages for integer division aren't good

2014-04-16 Thread Stefan Krah

Stefan Krah added the comment:

leewz  wrote:
> - Error message for `DivisionImpossible` is
>   []
>   instead of an actual error message.

No, the error message for the *signal*  that is raised (InvalidOperation) lists
the *condition* that triggered the signal (DivisionImpossible).

I followed the recommendation at:

http://speleotrove.com/decimal/daexcep.html#refexcep

"It is recommended that implementations distinguish the different conditions
 listed above, and also provide additional information about exceptional
 conditions where possible (for example, the operation being attempted and
 the values of the operand or operands involved)."

Distinguishing the conditions is easy, adding additional information in
all cases would require changes to libmpdec.

--

___
Python tracker 

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



[issue21277] don't try to link _ctypes with a ffi_convenience library

2014-04-16 Thread Matthias Klose

New submission from Matthias Klose:

the ffi_convenience library was once built and installed with oldish GCC 
versions. Either remove it completely from the search path, or search for  the 
standard libffi system library.

--- a/setup.py
+++ b/setup.py
@@ -1939,7 +1939,7 @@
 break
 ffi_lib = None
 if ffi_inc is not None:
-for lib_name in ('ffi_convenience', 'ffi_pic', 'ffi'):
+for lib_name in ('ffi', 'ffi_convenience', 'ffi_pic', 'ffi'):
 if (self.compiler.find_library_file(lib_dirs, lib_name)):
 ffi_lib = lib_name
 break

--
components: Build
messages: 216614
nosy: doko
priority: normal
severity: normal
status: open
title: don't try to link _ctypes with a ffi_convenience library
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue21276] don't define USE_XATTRS on kfreebsd and the Hurd

2014-04-16 Thread Matthias Klose

New submission from Matthias Klose:

don't define USE_XATTRS on kfreebsd and the Hurd, not available there.

--
files: kfreebsd-xattrs.diff
keywords: patch
messages: 216613
nosy: doko
priority: normal
severity: normal
status: open
title: don't define USE_XATTRS on kfreebsd and the Hurd
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file34935/kfreebsd-xattrs.diff

___
Python tracker 

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



[issue21275] fix a socket test on KFreeBSD

2014-04-16 Thread Matthias Klose

New submission from Matthias Klose:

Fix a socket test on KFreeBSD

--
components: Tests
files: kfreebsd-testsuite.diff
keywords: patch
messages: 216612
nosy: doko
priority: normal
severity: normal
status: open
title: fix a socket test on KFreeBSD
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file34934/kfreebsd-testsuite.diff

___
Python tracker 

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



[issue21274] define PATH_MAX for GNU/Hurd in Python/pythonrun.c

2014-04-16 Thread Matthias Klose

New submission from Matthias Klose:

PATH_MAX is not defined on GNU/Hurd. Take the same approach as taken for 
Windows in the very same file and define it in terms of MAXPATHLEN.

--
components: Interpreter Core
files: hurd-path_max.diff
keywords: patch
messages: 216611
nosy: doko
priority: normal
severity: normal
status: open
title: define PATH_MAX for GNU/Hurd in Python/pythonrun.c
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file34933/hurd-path_max.diff

___
Python tracker 

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



[issue21273] don't defined socket constants which are not implemented for GNU/Hurd

2014-04-16 Thread Matthias Klose

New submission from Matthias Klose:

Comment out constant exposed on the API which are not implemented on
GNU/Hurd. They would not work at runtime anyway.

--
components: Extension Modules
files: hurd-disable-nonworking-constants.diff
keywords: patch
messages: 216610
nosy: doko
priority: normal
severity: normal
status: open
title: don't defined socket constants which are not implemented for GNU/Hurd
versions: Python 3.4, Python 3.5
Added file: 
http://bugs.python.org/file34932/hurd-disable-nonworking-constants.diff

___
Python tracker 

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



[issue21272] use _sysconfigdata.py in distutils.sysconfig to initialize distutils.sysconfig

2014-04-16 Thread Matthias Klose

New submission from Matthias Klose:

distutils/sysconfig still parses the Makefile and config header; it should use 
the same approach now as the toplevel sysconfig module.

--
components: Library (Lib)
files: distutils-init.diff
keywords: patch
messages: 216609
nosy: doko
priority: normal
severity: normal
status: open
title: use _sysconfigdata.py in distutils.sysconfig to initialize 
distutils.sysconfig
versions: Python 3.5
Added file: http://bugs.python.org/file34931/distutils-init.diff

___
Python tracker 

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



[issue15887] urlencode should accept iterables of pairs

2014-04-16 Thread Thomas Fenzl

Changes by Thomas Fenzl :


--
nosy: +Thomas Fenzl

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

And it takes a string or an object?

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

> I'd keep the name ("splitdoc"), and let it receive a string.

Yes please.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Ok, I will work on this bug after the feedback of Eric and David.

Thanks for your time.
--
Stéphane Wirtel - http://wirtel.be - @matrixise

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Yury Selivanov

Yury Selivanov added the comment:

I'd keep the name ("splitdoc"), and let it receive a string.  But let's hear 
what Eric & David think about it.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Totally agree with you,

I want to learn how to contribute to cpython and there is a learning 
curve and it's normal.

So, if you think we need to change the names or the signature of the 
function, I can work on this issue.

--

___
Python tracker 

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



[issue21255] Attaching a PropertyMock records calls

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

>>> type(foo).prop = prop
>>> foo.attach_mock(prop, 'prop')

Are both of these lines needed?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Yury Selivanov

Yury Selivanov added the comment:

> Are you agree with that, or there is a good way for this kind of 
improvement?

Having a unittest to check if a deprecated functionality is removed in the 
future versions was Brett's idea, and I like it. So I think it's good to do the 
same here.  Your way of doing this is fine.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Yury Selivanov

Yury Selivanov added the comment:

> In the inspect module, I think all the functions take a object and not a 
string, it's the reason why I included the code of pydoc.getdoc() into 
inspect.splitdoc().

I understand. But you also do inspect.getdoc or inspect.getcomments, which I 
don't really like.  What's the point of having getcomments there?  Are comments 
considered docstrings?  If not, then why is the method called splitdocs?

Don't get me wrong, I'm not trying to pushback on the idea (since everybody is 
agreeing to have it), I just want the naming and behaviour be consistent.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Yury,

An other point, as you proposed, I will check the version of Python in 
an unit test.

But is there a good practice?
Here is my way to check that:

Example from my patch for the issue with inspect.getfullargspec()

+getfullargspec = getattr(inspect, 'getfullargspec', None)
+if getfullargspec and sys.version_info >= (3, 7):
+self.fail("inspect.getfullargspec() is deprecated since 
3.5, "
+  "you must to remove it in 3.7")

Are you agree with that, or there is a good way for this kind of 
improvement?

Thank you so much,

Stephane

--

___
Python tracker 

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



[issue17861] put opcode information in one place

2014-04-16 Thread Thomas Wouters

Thomas Wouters added the comment:

Here's a minimal patch to at least make the current mechanism work when using a 
separate build directory.

I still don't like the fact that this is importing opcode.py in a different 
Python than the target Python. Nor do I like that the script hardcodes 
information about the opcodes (specifically, the first opcode to 
HAVE_ARGUMENT.) This feels like it's not actually better for maintenance than 
the previous solution.

--
assignee:  -> kushal.das
resolution: fixed -> 
status: closed -> open
Added file: http://bugs.python.org/file34930/generate_opcode_h.diff

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

On 16 Apr 2014, at 17:24, Yury Selivanov wrote:

> Yury Selivanov added the comment:
>
> The current patch proposes to add inspect.splitdoc(obj), instead of 
> pydoc.splitdoc(doc).  The former takes an object, extracts 
> documentation out of it, and returns a tuple.  The latter, just splits 
> the passed doc string.
>
> If you want this function in inspect, we need to find a better name 
> for it, or don't make it to receive an object.
>
> --
>
> ___
> Python tracker 
> 
> ___

In the inspect module, I think all the functions take a object and not a 
string, it's the reason why I included the code of pydoc.getdoc() into 
inspect.splitdoc().

One point, the former ( pydoc.splitdoc() ) takes a string, and returns a 
tuple. it's not the case with the new version.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Yury Selivanov

Yury Selivanov added the comment:

The current patch proposes to add inspect.splitdoc(obj), instead of 
pydoc.splitdoc(doc).  The former takes an object, extracts documentation out of 
it, and returns a tuple.  The latter, just splits the passed doc string.

If you want this function in inspect, we need to find a better name for it, or 
don't make it to receive an object.

--

___
Python tracker 

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



[issue21190] Broken download link on README for CPython docs

2014-04-16 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Éric, no preference. I thought this was explicit and if you would like to 
change it back to /3/, fine, no problem with me. Just think of any redirection 
issue, if we may accidentally stumble upon, that's it.

--

___
Python tracker 

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



[issue18243] mktime_tz documentation out-of-date

2014-04-16 Thread akira

akira added the comment:

I've added the documentation patch with the outdated remark removed from 
mktime_tz docs.

--
keywords: +patch
nosy: +akira
type:  -> behavior
versions: +Python 3.2, Python 3.5
Added file: http://bugs.python.org/file34929/mktime_tz-doc.patch

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

Added some comments.

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue20309] Not all method descriptors are callable

2014-04-16 Thread Christian Hudon

Christian Hudon added the comment:

Work in progress for fixing this bug. (See descr_v1.diff) I converted the 
"curious.py" file into additional testcases. I started writing the functions 
for the tp_call slots for class and static methods.

To do: add tests to make sure that the code works for more than what's accepted 
by function_call(), then switch to using PyObject_Call() (which is the right 
function to use here, thanks to ncoghlan for catching that). Will finish this 
in the next few days.

--
keywords: +patch
nosy: +chrish42
Added file: http://bugs.python.org/file34928/descr_v1.diff

___
Python tracker 

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



[issue1684] CGIHTTPServer does not chdir prior to executing the CGI script

2014-04-16 Thread Thomas Fenzl

Changes by Thomas Fenzl :


--
nosy: +Thomas Fenzl

___
Python tracker 

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



[issue17861] put opcode information in one place

2014-04-16 Thread Thomas Wouters

Thomas Wouters added the comment:

FYI, this broke building in a separate object directory (again!) for multiple 
reasons: it's running the script without specifying $(srcdir), and it's writing 
to $(srcdir)/Include/opcode.h (where $(srcdir) may be unwritable), and it's 
picking up the wrong opcode module: the sys.path mucking in 
Tools/generate_opcode_h.py isn't inserting the right directory for 'import 
opcode' to pick up the target-Python's opcode.py. It should probably be using 
execfile() and have the name of the file passed in, instead.

Even if it were importing the right opcode.py, relying on 'import' or 
'execfile' here sounds like a bad idea: it means the opcode module of the 
*target* Python needs to be compatible with the Python that the 
generate_opcode_h.py script runs with. Since the syntax of opcode.h is much 
more constrained, a more flexible approach, in my opinion, would be to parse 
opcode.h to produce opcode.py (or an _opcode.py with just the definitions, that 
opcode.py would then import.)

--
nosy: +twouters

___
Python tracker 

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



[issue21190] Broken download link on README for CPython docs

2014-04-16 Thread Éric Araujo

Éric Araujo added the comment:

For the record, there is a convention (and server config) to have “current 
version” links: http://legacy.python.org/dev/peps/pep-0430/

Senthil: What do you think about using /3/ instead of /3.4/ in the link so that 
it does not become another thing that needs to change with each release?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue19316] devguide: compiler - wording

2014-04-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I will try to take a look, but anyone else is welcome to also.

--

___
Python tracker 

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



[issue21271] reset_mock needs parameters to also reset return_value and side_effect

2014-04-16 Thread Michael Foord

New submission from Michael Foord:

unittest.mock.Mock.reset_mock deliberately doesn't reset the return_value and 
side_effect. It would be nice if it gained parameters so that it *could*.

--
assignee: michael.foord
components: Library (Lib)
messages: 216588
nosy: kushal.das, michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: reset_mock needs parameters to also reset return_value and side_effect
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue21227] Decimal class error messages for integer division aren't good

2014-04-16 Thread leewz

leewz added the comment:

Total list of issues now:
- Error message for `DivisionImpossible` is
  []
  instead of an actual error message.
- `decimal.DivisionImpossible.__doc__` is empty.
- Calling `help(decimal.DivisionImpossible)` turns up nothing useful.

I checked all of these just now on my 3.2.3 (Windows). These issues are a 
CHANGE from 3.2 to 3.3. For example:
- Old error:
  decimal.InvalidOperation: quotient too large in //, % or divmod
- New error:
  InvalidOperation: []

I assume that the issues also apply to the other InvalidOperation types. So I 
guess what I'm really asking for is to pull forward the 3.2 docs and messages.

> That doesn't mean the implementation should change.

Er, I was explaining why it wasn't really surprising once I thought about it.

> There may be a documentation issue, but then again, people who are 
> "surprised" usually haven't studied the docs in detail.

To clarify:
- I looked at the Decimal docs
- skimmed for references to modulo and division
- looked for `DivisionImpossible`
- Then looked on Google for '"DivisionImpossible" Python'.
- Experimented with changing precision and fooling around with bigger and 
smaller numbers, and realized why the operation was logically impossible.
- Came here, posted, got a response that it was a flag raised by libmpdec.

I'm not asking for a change in behavior. I did point out that it was 
inconsistent with regular floats, in case consistency with Pyfloats was a thing 
that mattered. But I don't care about that. I only worry about anyone else who 
would use Decimal coming across the same unhelpful error.

> AFAICT, this particular "confusion" has never arisen before (i.e. bug 
> reports, questions in python classes, posts on stackoverlow, blog posts, 
> etc).  Likewise, the issue does not seem to have ever arisen in the many 
> other non-Python implementations of the decimal spec.

I agree it'd be (very) rare, but part of the reason why it might not appear 
online is that the issues at the top of this email are relatively new (3.3).

--

___
Python tracker 

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



[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2014-04-16 Thread Michael Foord

Changes by Michael Foord :


--
nosy: +kushal.das
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue21270] unittest.mock.call object has inherited count method

2014-04-16 Thread Michael Foord

New submission from Michael Foord:

The unittest.mock.call object inherits methods from tuple that prevent you 
using them as normal call attributes. They should be overridden.

--
assignee: michael.foord
messages: 216587
nosy: kushal.das, michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: unittest.mock.call object has inherited count method
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue21227] Decimal class error messages for integer division aren't good

2014-04-16 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue21269] Provide args and kwargs attributes on mock call objects

2014-04-16 Thread Michael Foord

Changes by Michael Foord :


--
assignee:  -> michael.foord
components: +Library (Lib)
nosy: +kushal.das
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.5

___
Python tracker 

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



[issue4744] asynchat documentation needs to be more precise

2014-04-16 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

In your issue4744_2.patch, the anchor contains 'asychat' and not 'asynchat'.

--

___
Python tracker 

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



[issue21269] Provide args and kwargs attributes on mock call objects

2014-04-16 Thread Michael Foord

New submission from Michael Foord:

The unittest.mock.call object could have args/kwargs attributes to easily 
access the arguments it was called with.

--
messages: 216585
nosy: michael.foord
priority: normal
severity: normal
status: open
title: Provide args and kwargs attributes on mock call objects

___
Python tracker 

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



[issue21167] float('nan') returns 0.0 on Python compiled with icc

2014-04-16 Thread Stefan Krah

Stefan Krah added the comment:

I quite agree, and it's hard to tell what users want. Basically I'm afraid
of a bug report "C extension using unsafe math got slower in Python-3.5".

I would find either decision reasonable.

--

___
Python tracker 

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



[issue21265] ConfigParser allows "get(*, raw=True), but no corresponding "set(*, raw=True)"

2014-04-16 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue21167] float('nan') returns 0.0 on Python compiled with icc

2014-04-16 Thread Mark Dickinson

Mark Dickinson added the comment:

Sure, if that's really the expectation.  I'm not sure I'd want any of *my* 
extension modules being built with non-strict FP, but there's a bit of a 
personal bias there.

--

___
Python tracker 

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



[issue21227] Decimal class error messages for integer division aren't good

2014-04-16 Thread Stefan Krah

Stefan Krah added the comment:

Raymond Hettinger  wrote:
> > It is certainly possible to document DivisionImpossible etc.
> 
> This should not be done.  We've made strong efforts to not extend the Decimal 
> Arithmetic Specification.

The exceptions are already there:

Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import decimal
>>> print(decimal.DivisionImpossible.__doc__)
Cannot perform the division adequately.

This occurs and signals invalid-operation if the integer result of a
divide-integer or remainder operation had too many digits (would be
longer than precision).  The result is [0,qNaN].

The specification distinguishes between "conditions" and "signals". It is
true that the conditions are not technically raised, but they are very
much "subclasses" of InvalidOperation.

Cowlishaw himself makes the distinction between InvalidOperation
and IEEEInvalidOperation. The latter groups all conditions together:

#define DEC_IEEE_754_Invalid_operation (DEC_Conversion_syntax | \
DEC_Division_impossible |   \
DEC_Division_undefined |\
DEC_Insufficient_storage |  \
DEC_Invalid_context |   \
DEC_Invalid_operation)

So while I don't particularly care whether we document the conditions or
not, I don't think doing so would extend the specification.

--

___
Python tracker 

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



[issue21268] Update pydoc module docstring

2014-04-16 Thread Éric Araujo

New submission from Éric Araujo:

“In the Python interpreter, do "from pydoc import help" to provide online help.”

“online” has changed meaning in the last decades, and help is a semi-builtin 
automatically added by the site module on startup.

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 216581
nosy: docs@python, eric.araujo
priority: normal
severity: normal
stage: needs patch
status: open
title: Update pydoc module docstring
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



  1   2   3   >