[issue19499] import this is cached in sys.modules

2013-11-05 Thread Georg Brandl

Georg Brandl added the comment:

Whatever we decide to do here, it **must** also be done for antigravity.py.

--
nosy: +georg.brandl

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



[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Paweł Wroniszewski

New submission from Paweł Wroniszewski:

I encountered the problem in logging module, but it is broader then that. Have 
a look at the following code:


import time
DATE_FORMAT = '%d/%b/%Y %H:%M:%S%z %Z'
print(time.strftime(DATE_FORMAT))
print(time.strftime(DATE_FORMAT,time.localtime()))


The first print statement prints the correct time zone offset (in the place of 
%z), while the second prints +. It is important, because the logging module 
passes a predifined time_struct to time.strftime to format it - the timezone 
offset is not usable in such case. 

The documentation for time.strftime(format[, t]) reads:
If t is not provided, the current time as returned by localtime() is used
but apparently there must be something extra going on under the hood.

I checked that the problem is present in Python 2.7 and 3.2, probably in other 
version as well. Maybe it is platform dependent - I use Ubuntu 12.04 64 bit. 

If you want to change the time zone for testing, just run e.g.:
===
import os
os.environ['TZ'] = 'Asia/Kolkata'
import time
time.tzset()
===

--
messages: 202200
nosy: pwronisz
priority: normal
severity: normal
status: open
title: Wrong time zone offset, when using time.strftime() with a given 
struct_time
type: behavior
versions: Python 2.7, Python 3.2

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



[issue18345] logging: file creation options with FileHandler and friends

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5636366db039 by Vinay Sajip in branch '3.3':
Issue #18345: Added cookbook example illustrating handler customisation.
http://hg.python.org/cpython/rev/5636366db039

New changeset 388cc713ad33 by Vinay Sajip in branch 'default':
Closes #18345: Merged documentation update from 3.3.
http://hg.python.org/cpython/rev/388cc713ad33

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

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



[issue18345] logging: file creation options with FileHandler and friends

2013-11-05 Thread Vinay Sajip

Vinay Sajip added the comment:

When the online docs update, the cookbook entry should appear at

http://docs.python.org/dev/howto/logging-cookbook.html#customising-handlers-with-dictconfig

--

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



[issue2889] curses for windows (alternative patch)

2013-11-05 Thread Christoph Baumgartner

Changes by Christoph Baumgartner hydrotox...@gmail.com:


--
nosy: +christoph.baumgartner

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



[issue19501] Buildbot testing of 3.2 broken

2013-11-05 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc8f19b4b662 by Ned Deily in branch '2.7':
Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6.
http://hg.python.org/cpython/rev/fc8f19b4b662

New changeset 268dc81c2527 by Ned Deily in branch '3.3':
Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.3.3.
http://hg.python.org/cpython/rev/268dc81c2527

New changeset f89beccd470c by Ned Deily in branch 'default':
Issue #15663: merge build-installer.py changes
http://hg.python.org/cpython/rev/f89beccd470c

--

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



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2013-11-05 Thread Ned Deily

Ned Deily added the comment:

Due to incompatibilities with some key third-party projects as documented in 
Issue 19490 and the urgency of getting new maintenance releases out, the best 
course of action is to revert built-in Tcl/Tk support for 3.3.3 and 2.7.6.  
With the knowledge gained, I will try to implement a compatible solution for 
3.4.0b1.

--

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



[issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1

2013-11-05 Thread Ned Deily

Ned Deily added the comment:

After further investigation and deliberation, I believe that we need to revert 
the built-in Tcl/Tk from the OS X installers for 2.7.6 and 3.3.3.  The 
contributing factors:

1. As implemented, we now know that the built-in Tcl/Tk breaks source installs 
and/or binary package installers for PIL/Pillow, matplotlib, and, by extension, 
pandas.  These are all widely-used projects and are important customers of the 
OS X 10.6+ installers.

2. With the recent release of OS X 10.9 Mavericks, there is now a critical 
problem (Issue18458) preventing interactive use of the current maintenance 
release installers (3.3.2 / 2.7.5) on 10.9.  New releases are needed as soon as 
possible to provide fixes for this, a few less critical 10.9 issues, and 
general bug and security fixes for all platforms.  So it is not appropriate to 
delay 3.3.3 or 2.7.6 to attempt to fix the incompatibility issue.  (Fixing the 
built-in Tcl/Tk for 3.4.0b1 or for future maintenance releases are separate 
open items to be tracked on Issue15663.)

3. Updated Tcl/Tk 8.5 installers for OS X are now available from ActiveState 
(8.5.15.1) which include the Tk patch for the 10.9 screen refresh problem 
originally seen with IDLE and patched in the built-in Tks of the 2.7.6rc1_rev1 
and 3.3.3rc1_rev1 installers.

One positive outcome of this is that we are more aware of the interdependencies 
of some of the projects using the python.org installers.  As a result, I am 
adding to the python.org OS X installer testing and release processes 
additional quicklook regression testing using some of these projects so we 
have a better chance of catching issues like this one earlier.

Another positive is that it shows that there are members of the community who 
are taking the time to try pre-releases and that such testing *is* really 
important.  Thank you to all of you who have been doing so and reporting 
issues.  And a particular thank you to Piet for calling attention to this one.

--

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



[issue19503] does gc_list_merge merge properly?

2013-11-05 Thread martenjan

New submission from martenjan:

The code for gc_list_merge is given in gcmodule.c. I retrieved it from
http://hg.python.org/cpython/file/tip/Modules/gcmodule.c#l287

The code seems to merge list `from` incompletely: the first entry of `from` is 
omitted in the merged list. 

The issue is in line 295:   tail-gc.gc_next = from-gc.gc_next;
I fixed it as : tail-gc.gc_next = from;

Please check if my analysis is correct.


See below for the context.

Original: lines 287 to 301

/* append list `from` onto list `to`; `from` becomes an empty list */
static void
gc_list_merge(PyGC_Head *from, PyGC_Head *to)
{
PyGC_Head *tail;
assert(from != to);
if (!gc_list_is_empty(from)) {
tail = to-gc.gc_prev;
tail-gc.gc_next = from-gc.gc_next;
tail-gc.gc_next-gc.gc_prev = tail;
to-gc.gc_prev = from-gc.gc_prev;
to-gc.gc_prev-gc.gc_next = to;
}
gc_list_init(from);
}


Fix:
/* append list `from` onto list `to`; `from` becomes an empty list */
static void
gc_list_merge(PyGC_Head *from, PyGC_Head *to)
{
PyGC_Head *tail;
assert(from != to);
if (!gc_list_is_empty(from)) {
tail = to-gc.gc_prev;
tail-gc.gc_next = from;
tail-gc.gc_next-gc.gc_prev = tail;
to-gc.gc_prev = from-gc.gc_prev;
to-gc.gc_prev-gc.gc_next = to;
}
gc_list_init(from);
}

--
components: Interpreter Core
messages: 202206
nosy: martenjan
priority: normal
severity: normal
status: open
title: does gc_list_merge merge properly?
type: behavior
versions: Python 2.7

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



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2013-11-05 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I don't think you can provide a solution that's compatible with existing 
3th-party extensions that use Tk and includes a private copy of Tcl/Tk. 

IMHO the best solution would be to provide the Tcl/Tk headers in the Python 
framework as well, to make it possible to link 3th party extension with the Tk 
that's provided with the Python installer.  

That should be an acceptable solution for 3.4 because that's a new feature 
release. 

A possible pain-point are 3th-party extensions that use the limited ABI, link 
with Tk and are used with Tkinter.

--

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



[issue19347] PEP 453 implementation tracking issue

2013-11-05 Thread Bohuslav Slavek Kabrda

Changes by Bohuslav Slavek Kabrda bkab...@redhat.com:


--
nosy: +bkabrda

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



[issue10197] subprocess.getoutput fails on win32

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0aa2aedc6a21 by Tim Golden in branch 'default':
Issue #10197 Tweak docs for subprocess.getstatusoutput and align the 
documentation, the module docstring, and the function docstring.
http://hg.python.org/cpython/rev/0aa2aedc6a21

--

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



[issue19503] does gc_list_merge merge properly?

2013-11-05 Thread Mark Dickinson

Mark Dickinson added the comment:

The current code is correct.  Note that `from` is the list header, and is not 
attached to a gc-tracked object.  We want to splice the last non-header element 
of `to` (`to-gc.gc_prev`) to the first non-header element of `from` 
(`from-gc.gc_next`).

Did you try running the test suite with your change?  It would be quite a feat 
for a bug this fundamental to have made it this far in 2.7 without anyone 
noticing. :-)

Closing as invalid.

--
nosy: +mark.dickinson
resolution:  - invalid
status: open - closed

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



[issue19504] Change customise to customize.

2013-11-05 Thread Eric V. Smith

New submission from Eric V. Smith:

The python source code usually uses customiz* (341 instances) over 
customis* (19 instance, 8 of which are in logging).

I realize foolish consistency, and all that, but I think the documentation 
should all use the same conventions. I'd be happy to change the documentation.

Most of these changes are in documentation or docstrings, but some are in 
comments. Which is why I'm assigning to docs@. I didn't change 2.0.rst, because 
that seemed like a historical document.

--
assignee: docs@python
components: Documentation
files: customise.diff
keywords: easy, patch
messages: 202210
nosy: docs@python, eric.smith
priority: low
severity: normal
stage: patch review
status: open
title: Change customise to customize.
versions: Python 3.4
Added file: http://bugs.python.org/file32507/customise.diff

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



[issue17828] More informative error handling when encoding and decoding

2013-11-05 Thread Nick Coghlan

Nick Coghlan added the comment:

New and improved implementation attached that extracts the exception chaining 
to a helper functions and calls it only when it is the call in to the codecs 
machinery that failed (eliminating the need for the output flag, and covering 
decoding as well as encoding).

TypeError, AttributeError and ValueError are all wrapped with chained 
exceptions that mention the codec that failed.

(Annoyingly, bz2_codec throws OSError instead of ValueError for bad input data, 
but wrapping OSError safely is a pain due to the extra state potentially 
carried on instances. So letting it escape unwrapped is the simpler and more 
conservative option at this point)

 import codecs
 codecs.encode(bhello, bz2_codec).decode(bz2_codec)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'bz2_codec' decoder returned 'bytes' instead of 'str'; use 
codecs.decode to decode to arbitrary types

 bhello.decode(rot_13)
AttributeError: 'memoryview' object has no attribute 'translate'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: decoding with 'rot_13' codec failed (AttributeError: 
'memoryview' object has no attribute 'translate')

 hello.encode(bz2_codec)
TypeError: 'str' does not support the buffer interface

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: encoding with 'bz2_codec' codec failed (TypeError: 'str' does not 
support the buffer interface)

 hello.encode(rot_13)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'rot_13' encoder returned 'str' instead of 'bytes'; use 
codecs.encode to encode to arbitrary types

--
Added file: 
http://bugs.python.org/file32508/issue17828_improved_codec_errors_v3.diff

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



[issue17828] More informative error handling when encoding and decoding

2013-11-05 Thread Nick Coghlan

Nick Coghlan added the comment:

Checking the other binary-binary and str-str codecs with input type and 
value restrictions:

- they all throw TypeError and get wrapped appropriately when asked to encode 
str input (rot_13 throws the output type error)

- rot_13 throws an appropriately wrapped AttributeError when asked to decode 
bytes or bytearray object

For bad value input, uu_codec is the only one that throws a normal 
ValueError, I couldn't figure out a way to get quopri_codec to complain about 
the input value and the others throw a module specific error:

binascii (base64_codec, hex_codec) throws binascii.Error (a custom 
ValueError subclass)
zlib (zlib_codec) throws zlib.error (inherits directly from Exception)

As with the OSError that escapes from bz2_codec, I think the simplest and most 
conservative option is to not worry about those at this point.

--

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



[issue19499] import this is cached in sys.modules

2013-11-05 Thread R. David Murray

R. David Murray added the comment:

It seems to me that having import this work more than once would teach a 
beginner the *wrong* lesson about how python import works.  So I agree that it 
should be a teaching moment, not a bug to be fixed.

--
nosy: +r.david.murray

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



[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +belopolsky, r.david.murray

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



[issue15216] Support setting the encoding on a text stream after creation

2013-11-05 Thread Nick Coghlan

Nick Coghlan added the comment:

It would be good to have this addressed in Python 3.4 (I'm following up on a 
few other encoding related issues at the moment).

Is that a reasonable possibility before beta 1, or do we need to bump this one 
to 3.5?

--

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



[issue17828] More informative error handling when encoding and decoding

2013-11-05 Thread Nick Coghlan

Nick Coghlan added the comment:

Updated patch adds systematic tests for the new error handling to 
test_codecs.TransformTests

I also moved the codecs changes up to a Codec handling improvements section.

My rationale for doing that is that this is actually a pretty significant 
usability enhancement and Python 3 codec model clarification for heavy users of 
binary codecs coming from Python 2, and because I also plan to follow up on 
this issue by bringing back the shorthand aliases for these codecs that were 
removed in issue 10807 (thus closing issue 7475).

If issue 15216 gets finished (changing stream encodings after creation) that 
would also be a substantial enhancement worth mentioning here.

--
Added file: 
http://bugs.python.org/file32509/issue17828_improved_codec_errors_v4.diff

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



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ba31940588b6 by Ned Deily in branch '2.7':
Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6.
http://hg.python.org/cpython/rev/ba31940588b6

--

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



[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I cannot reproduce this and I suspect that the problem shows up only in certain 
times.

I believe this is related to the long-standing issue that was fixed in 3.3.  
See issue 1667546.  In Python prior to 3.3, time_struct did not store timezone 
information:

Python 2.7.5 (default, Aug 13 2013, 01:04:43)
 import time
 time.localtime().tm_zone
Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'time.struct_time' object has no attribute 'tm_zone'

Python 3.3.2 (default, Aug 13 2013, 00:57:00)
 import time
 time.localtime().tm_zone
'EST'

Since this cannot be fixed without backporting new features, I don't think we 
can fix this in 2.7 or 3.2.  Those affected by this problem should upgrade to 
3.3.

--

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



[issue19503] does gc_list_merge merge properly?

2013-11-05 Thread martenjan

martenjan added the comment:

Thanks for your explanation

--

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



[issue19502] Wrong time zone offset, when using time.strftime() with a given struct_time

2013-11-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

 The documentation for time.strftime(format[, t]) reads:
 If t is not provided, the current time as returned by localtime() is used
 but apparently there must be something extra going on under the hood.

Yes, the C implementation uses tm_zone and tm_gmtoff fields on the platforms 
that support them.   I won't be unreasonable to document this fact in 2.7.

--

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Alexander Belopolsky

Changes by Alexander Belopolsky alexander.belopol...@gmail.com:


--
nosy: +belopolsky

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

+1 on adding an option to isoformat().  We already have an optional sep 
argument, so the symmetry with __str__ is not complete.  To make this option 
more useful, rather than implementing always_emit_microseconds=False flag, I 
would add a keyword argument 'precision' that would take 
('hour'|'minute'|'second'|millisecond'|'microsecond') value.

--

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



[issue19505] OrderedDict views don't implement __reversed__

2013-11-05 Thread ThiefMaster

New submission from ThiefMaster:

The view objects for `collections.OrderedDict` do not implement `__reversed__` 
so something like this fails:

 from collections import OrderedDict
 od = OrderedDict()
 reversed(od.viewvalues())
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: argument to reversed() must be a sequence

--
components: Library (Lib)
messages: 202221
nosy: ThiefMaster
priority: normal
severity: normal
status: open
title: OrderedDict views don't implement __reversed__
versions: Python 2.7, Python 3.1, Python 3.2

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



[issue19499] import this is cached in sys.modules

2013-11-05 Thread Mark Lawrence

Mark Lawrence added the comment:

If it ain't broke don't fix it.

--
nosy: +BreamoreBoy

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



[issue15216] Support setting the encoding on a text stream after creation

2013-11-05 Thread STINNER Victor

STINNER Victor added the comment:

 Is that a reasonable possibility before beta 1, or do we need to bump this 
 one to 3.5?

My patch was not reviewed yet and must be reimplemented in C. I will not have 
time before the beta1 to finish the work.

--

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



[issue19504] Change customise to customize.

2013-11-05 Thread Cameron Allan

Cameron Allan added the comment:

Done using Notepad++ and regex as needed.

Also changed file name appropriately.

--
nosy: +c3n9
Added file: http://bugs.python.org/file32510/customize.diff

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



[issue19437] More failures found by pyfailmalloc

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b93614f7ed83 by Victor Stinner in branch 'default':
Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, handle
http://hg.python.org/cpython/rev/b93614f7ed83

New changeset 00ee08fac522 by Victor Stinner in branch 'default':
Issue #19437: Fix pysqlite_connection_call() of sqlite3, return NULL when
http://hg.python.org/cpython/rev/00ee08fac522

New changeset 374635037b0a by Victor Stinner in branch 'default':
Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, when the row factory
http://hg.python.org/cpython/rev/374635037b0a

New changeset 35fdb15b4939 by Victor Stinner in branch 'default':
Issue #19437: Fix _threading.RLock constructor (rlock_new), call
http://hg.python.org/cpython/rev/35fdb15b4939

New changeset ea373a14f9e9 by Victor Stinner in branch 'default':
Issue #19437: Fix compiler_class(), handle compiler_lookup_arg() failure
http://hg.python.org/cpython/rev/ea373a14f9e9

--

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2013-11-05 Thread Claudiu.Popa

Changes by Claudiu.Popa pcmantic...@gmail.com:


--
nosy: +Claudiu.Popa

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



[issue19504] Change customise to customize.

2013-11-05 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

Not a foolish consistency; Guido ruled long ago that American spellings should 
be used.

--
nosy: +fdrake

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



[issue19499] import this is cached in sys.modules

2013-11-05 Thread Eric Snow

Eric Snow added the comment:

+0 to just doing a reload.  At the point you show someone import this, it may 
be premature to be explaining reloading to them.  Python is great because you 
usually don't have to hand-wave through some concepts in order to explain 
others. [1]

Also, under Python 3 you have to import reload() separately:

from imp import reload
reload(this)


[1] 
http://www.boredomandlaziness.org/2011/08/scripting-languages-and-suitable.html

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Zachary Ware

Zachary Ware added the comment:

Looks like the last commit broke 8.5.15 on Windows; in particular, on line 25 
of widget_tests.py, int_round doesn't exist.  Replacing 'int_round' with 
'round' allows most tests to pass, but I still get these two failures:

==
FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.EntryTest)
--
Traceback (most recent call last):
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget
s.py, line 336, in test_insertwidth
self.checkParam(widget, 'insertwidth', 0.9, expected=2)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 6
6, in checkParam
self.assertEqual2(widget[name], expected, eq=eq)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 5
0, in assertEqual2
self.assertEqual(actual, expected, msg)
AssertionError: 1 != 2

==
FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest)
--
Traceback (most recent call last):
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget
s.py, line 336, in test_insertwidth
self.checkParam(widget, 'insertwidth', 0.9, expected=2)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 6
6, in checkParam
self.assertEqual2(widget[name], expected, eq=eq)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 5
0, in assertEqual2
self.assertEqual(actual, expected, msg)
AssertionError: 1 != 2

--
nosy: +zach.ware

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



[issue19499] import this is cached in sys.modules

2013-11-05 Thread Georg Brandl

Georg Brandl added the comment:

IMO the fact that importing happens only once is also a very important one, so 
much the better this helps in learning it early.

The bad thing is that opening this.py to see what's happening will not really 
enlighten the beginner :)

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d5d0356ba5ac by Serhiy Storchaka in branch '3.3':
Fix typo in tkinter tests (issue #19085).
http://hg.python.org/cpython/rev/d5d0356ba5ac

New changeset fc4ef17c7db8 by Serhiy Storchaka in branch 'default':
Fix typo in tkinter tests (issue #19085).
http://hg.python.org/cpython/rev/fc4ef17c7db8

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Zachary.

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eb126f976fa2 by Serhiy Storchaka in branch '2.7':
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel = 8.5.12 (issue 
#19085).
http://hg.python.org/cpython/rev/eb126f976fa2

New changeset 21fbe3ec90dc by Serhiy Storchaka in branch '3.3':
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel = 8.5.12 (issue 
#19085).
http://hg.python.org/cpython/rev/21fbe3ec90dc

New changeset ce08158e3f6c by Serhiy Storchaka in branch 'default':
Fix test_insertwidth Tkinter tests on Tk 8.5 with patchlevel = 8.5.12 (issue 
#19085).
http://hg.python.org/cpython/rev/ce08158e3f6c

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Zachary Ware

Zachary Ware added the comment:

Working from ce08158e3f6c with 8.5.15 on Windows, I get the same failures with 
a different AssertionError:

==
FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.EntryTest)
--
Traceback (most recent call last):
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget
s.py, line 340, in test_insertwidth
self.checkParam(widget, 'insertwidth', 0.9)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 6
6, in checkParam
self.assertEqual2(widget[name], expected, eq=eq)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 5
0, in assertEqual2
self.assertEqual(actual, expected, msg)
AssertionError: 1 != 0.9

==
FAIL: test_insertwidth (tkinter.test.test_tkinter.test_widgets.SpinboxTest)
--
Traceback (most recent call last):
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\test_tkinter\test_widget
s.py, line 340, in test_insertwidth
self.checkParam(widget, 'insertwidth', 0.9)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 6
6, in checkParam
self.assertEqual2(widget[name], expected, eq=eq)
  File P:\Projects\OSS\Python\cpython\lib\tkinter\test\widget_tests.py, line 5
0, in assertEqual2
self.assertEqual(actual, expected, msg)
AssertionError: 1 != 0.9

By the way, thank you for all the work you're doing on this, Serhiy!

--

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



[issue18923] Use the new selectors module in the subprocess module

2013-11-05 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's an updated patch with a better logic: in the previous version - based on 
current poll-based implementation, the FD was inferred from the event (i.e. 
read ready - stdout/stderr, write ready - stderr). The new version directly 
checks the ready file object instead. I also added an extra safety in case an 
unknown FD is returned (which should never happen).

--
nosy: +pitrou
Added file: http://bugs.python.org/file32511/subprocess_selectors-3.diff

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Zachary Ware

Zachary Ware added the comment:

FTR, both 8.5.11 and 8.6.1 pass all tests on Windows from ce08158e3f6c (with 
unrelated modifications required to build and use 8.6.1).

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c97600bdd726 by Serhiy Storchaka in branch '2.7':
Revert wrong change in previous commit (issue #19085).
http://hg.python.org/cpython/rev/c97600bdd726

New changeset bec6df56c053 by Serhiy Storchaka in branch '3.3':
Revert wrong change in previous commit (issue #19085).
http://hg.python.org/cpython/rev/bec6df56c053

New changeset 545feebd58fb by Serhiy Storchaka in branch 'default':
Revert wrong change in previous commit (issue #19085).
http://hg.python.org/cpython/rev/545feebd58fb

--

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



[issue19085] Add tkinter basic options tests

2013-11-05 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

My fault. I missed that here is simple checkParam() instead of 
checkPixelsParam(). Thank you Zachary.

--

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Andrei Dorian Duma

Andrei Dorian Duma added the comment:

I would like to implement this feature. I already wrote the Python part. Is 
there anything else to decide?

--

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread STINNER Victor

STINNER Victor added the comment:

2013/11/5 Alexander Belopolsky rep...@bugs.python.org:
 +1 on adding an option to isoformat().  We already have an optional sep 
 argument, so the symmetry with __str__ is not complete.  To make this option 
 more useful, rather than implementing always_emit_microseconds=False flag, I 
 would add a keyword argument 'precision' that would take 
 ('hour'|'minute'|'second'|millisecond'|'microsecond') value.

Hour precision is not part of the ISO 8601 standard.

resolution is maybe a better name for the new parameter than precision:
http://www.python.org/dev/peps/pep-0418/#glossary

The new parameter should be added to datetime.datetime.isoformat() but
also datetime.time.isoformat().

--

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-05 Thread STINNER Victor

New submission from STINNER Victor:

The following code copies data, whereas the copy can be avoided using a memory 
view:

chunk = self._input[self._input_offset:self._input_offset + _PIPE_BUF]
self._input_offset += os.write(key.fd, chunk)

It should be replaced with:

input_view = memoryview(self._input)
...
chunk = input_view[self._input_offset:self._input_offset + _PIPE_BUF]
self._input_offset += os.write(key.fd, chunk)


This issue is a reminder for one of my comment of issue #18923.

--
messages: 202240
nosy: haypo, neologix
priority: normal
severity: normal
status: open
title: subprocess.communicate() should use a memoryview
versions: Python 3.4

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-05 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
type:  - performance

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



[issue18923] Use the new selectors module in the subprocess module

2013-11-05 Thread STINNER Victor

STINNER Victor added the comment:

subprocess_selectors-3.diff looks good to me (this patch does not
remove any test :-))

I created the issue #19506 for the memoryview optimization.

--

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



[issue19505] OrderedDict views don't implement __reversed__

2013-11-05 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue19505] OrderedDict views don't implement __reversed__

2013-11-05 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +serhiy.storchaka, stutzbach
versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2

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



[issue15411] os.chmod() does not follow symlinks on Windows

2013-11-05 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware
stage:  - patch review

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



[issue9949] os.path.realpath on Windows does not follow symbolic links

2013-11-05 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware
stage: needs patch - patch review
versions: +Python 3.4 -Python 3.2

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

+1 on all Victor's points.

I like 'resolution' because this is the term that datetime module uses already:

 from datetime import *
 datetime.resolution
datetime.timedelta(0, 0, 1)

There is a slight chance of confusion stemming from the fact that 
datetime.resolution is timedelta, but proposed parameter is a string.

I believe ISO 8601 uses the word accuracy to describe this kind of format 
variations.  I am leaning towards resolution, but would like to hear from 
others.  Here are the candidates:

1. resolution
2. accuracy
3. precision

(Note that accuracy is the shortest but resolution is the most correct.)

--

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



[issue19475] Add microsecond flag to datetime isoformat()

2013-11-05 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 05.11.2013 21:31, STINNER Victor wrote:
 
 2013/11/5 Alexander Belopolsky rep...@bugs.python.org:
 +1 on adding an option to isoformat().  We already have an optional sep 
 argument, so the symmetry with __str__ is not complete.  To make this option 
 more useful, rather than implementing always_emit_microseconds=False flag, I 
 would add a keyword argument 'precision' that would take 
 ('hour'|'minute'|'second'|millisecond'|'microsecond') value.
 
 Hour precision is not part of the ISO 8601 standard.
 
 resolution is maybe a better name for the new parameter than precision:
 http://www.python.org/dev/peps/pep-0418/#glossary
 
 The new parameter should be added to datetime.datetime.isoformat() but
 also datetime.time.isoformat().

Since this ticket is about being able to remove the seconds fraction
part, I think it's better to use a name that is not already overloaded
with other meanings, e.g. show_us=False or show_microseconds=False.

BTW: Have you thought about the rounding/truncation issues
associated with not showing microseconds ?

A safe bet is truncation, but this can lead to inaccuracies of
up to a second. Rounding is difficult, since it can lead to
a 60 second value showing up for e.g. 11:00:59.95 seconds,
or the need to return 12:00:00 for 11:59:59.95.

--
nosy: +lemburg

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



[issue19507] ssl.wrap_socket() with server_hostname should imply match_hostname()

2013-11-05 Thread Christian Heimes

New submission from Christian Heimes:

I find it surprising that wrap_socket() doesn't verify the server name with 
match_hostname() when it is called with a server_name argument. The check 
should be done by default.

I suggest:

- add validate_hostname=True flag to wrap_socket() and functions that call 
wrap_socket()

- add SSLSocket.match_hostname(hostname=None) to validate hostname with current 
cert. hostname shall default to server_hostname

--
messages: 202244
nosy: christian.heimes, giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
stage: test needed
status: open
title: ssl.wrap_socket() with server_hostname should imply match_hostname()
type: enhancement
versions: Python 3.4

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



[issue19508] Add warning that Python doesn't verify SSL certs by default

2013-11-05 Thread Christian Heimes

New submission from Christian Heimes:

Developers are still surprised that Python's ssl library doesn't validate SSL 
certs by default. We should add a *big* warning to the SSL module as well as to 
all consumers (http, ftp, imap, pop, smtp, nntp ...) that neither the CA cert 
chain nor the hostname are validated by default. (AFAIK only http.client does 
match_hostname()).

--
assignee: docs@python
components: Documentation
messages: 202245
nosy: christian.heimes, docs@python, giampaolo.rodola, janssen, pitrou
priority: high
severity: normal
stage: needs patch
status: open
title: Add warning that Python doesn't verify SSL certs by default
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-11-05 Thread Christian Heimes

New submission from Christian Heimes:

None of the TLS/SSL classes for ftp, imap, nntp, pop and smtp have support for 
match_hostname() in order to verify that the SSL cert matches the host name. 
I'm not sure how we can handle the problem without creating backwards 
incompatibilities.

--
messages: 202246
nosy: christian.heimes, giampaolo.rodola, janssen, pitrou
priority: high
severity: normal
stage: needs patch
status: open
title: No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules
type: security
versions: Python 3.2, Python 3.3, Python 3.4

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



[issue19505] OrderedDict views don't implement __reversed__

2013-11-05 Thread Eric Snow

Eric Snow added the comment:

The view objects aren't sequences.  od.items() and od.keys() implement Set.  
od.values() doesn't even do that much, only implementing __len__(), __iter__(), 
and __contains__().

The glossary implies that you should use reversed(list(view)). [1]  More 
information on mapping views is located in the docs for collections.ABC and for 
dict. [2][3]  The source for the Mapping views is also helpful. [4]

Keep in mind that OrderedDict is not a sequence-like dict.  It is essentially 
just a dict with a well-defined iteration order (by insertion order). [5]  Just 
like its views, it should not used as a sequence.

[1] http://docs.python.org/3/glossary.html#term-view
[2] http://docs.python.org/3/library/stdtypes.html#dict-views
[3] 
http://docs.python.org/3/library/collections.abc.html#collections.abc.MappingView
[4] http://hg.python.org/cpython/file/3.3/Lib/collections/abc.py#l435
[5] http://docs.python.org/3.3/library/collections.html#collections.OrderedDict

--
nosy: +eric.snow

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



[issue19510] lib2to3.fixes.fix_import gets confused if implicit relative imports and absolute imports are on the same line

2013-11-05 Thread Augie Fackler

New submission from Augie Fackler:

While tinkering (again) with Mercurial Python 3 messes, I ran across this gem:

import error, osutil, encoding, collections

(http://selenic.com/hg/file/e1317d3e59e1/mercurial/util.py#l17)

That import statement contains 3 relative imports (that is, mercurial.error, 
mercurial.osutil, and mercurial.encoding), and one standard library import 
(collections). Because of the standard lib import on that line, lib2to3 doesn't 
rewrite any of the imports. If I instead move collections to its own line, then 
the first three imports get correctly rewritten to the from . import error 
form.

I've got Python 3.3.2 locally, and the lib2to3 is the one from that stdlib.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 202248
nosy: durin42, twouters
priority: normal
severity: normal
status: open
title: lib2to3.fixes.fix_import gets confused if implicit relative imports and 
absolute imports are on the same line
versions: Python 3.3

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



[issue19497] selectors and modify()

2013-11-05 Thread Arnaud Faure

Arnaud Faure added the comment:

Corrected and cleaned

--
Added file: http://bugs.python.org/file32512/modify_data_use_a_shortcut.patch

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



[issue18840] Tutorial recommends pickle module without any warning of insecurity

2013-11-05 Thread Chris Cooper

Chris Cooper added the comment:

Here's a patch that focuses on the json module, with a smaller pickle section 
including the warning from the pickle docs.

--
nosy: +ChrisCooper
Added file: http://bugs.python.org/file32513/issue18840

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



[issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1

2013-11-05 Thread Piet van Oostrum

Piet van Oostrum added the comment:

I think future versions of Python should add the relevant information about how 
they are linked to Tcl/Tk in sysconfig. This would include the path of the 
include files, the shared libraries and the tcl files. Or a framework location 
on OS X if this is used. The setup.py for extensions that need to link to 
Tcl/Tk can then interrogate this information, and fall back to the current way, 
if it is not available.

--

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



[issue19490] Problem installing matplotlib 1.3.1 with Python 2.7.6rc1 and 3.3.3rc1

2013-11-05 Thread Ned Deily

Ned Deily added the comment:

Piet, yes, I've been thinking of how to do that.  Unfortunately, it can only be 
a hint since, in the case of an installer Python, there is no guarantee that 
the header files on the build machine are available on the installed machine in 
the same location or even at all.

--

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



[issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period

2013-11-05 Thread Jason Myers

Jason Myers added the comment:

This is a patch based on terry.reedy 's suggestion

--
keywords: +patch
nosy: +Jason.Myers
Added file: http://bugs.python.org/file32514/docstring.patch

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



[issue19439] Build _testembed on Windows

2013-11-05 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 99640494ca7f by Zachary Ware in branch 'default':
#19439: Update PCbuild/readme.txt with new sub-project
http://hg.python.org/cpython/rev/99640494ca7f

--

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