[issue25253] AttributeError: 'Weather' object has no attribute 'dom'

2015-09-27 Thread Xiang Zhang

Xiang Zhang added the comment:

I don't think this is a bug of Python. You should check your own
application to make sure you are parsing the right XML.

I run your code with the old uri and get the same traceback. The
cause is you are using xml parser to parse a html document which
is error prone, since the api is out-of-date and return a html
document.

I don't know what happens about the new api since I have no KEY
and can not do the experiment. But from the api you give,
what you will retrieve is a json. Surly parse it with a xml parse
leads to error and the attribute dom won't be created.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue14146] IDLE: source line in editor doesn't highlight when debugging

2015-09-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The workaround function added in this issue is replaced in #24972 with the Text 
widget inactiveselectbackground option.  In the course of testing, I discovered 
that while the function still works, debugger source highlighting no longer 
does, at least not on my machine.  I opened new issue #25254.  On the other 
hand, find seems to be working better.

--

___
Python tracker 

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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I first testing the workaround by selecting text and then clicking on another 
window, and the highlight stayed.  I commented out 
"self._highlight_workaround()", quit, started again, tested again, and the 
highlight disappeared.  I added the new line above, retested, and the 
hightlight stayed.

Debugger source highlighting again does not work for me on Win7 in any 
installed or repository version, before or after the patch. See #25254. The 
patch does immediately fix at least part of the find issue. I will review them 
later.

While the report above implies that I committed to 3.4 and merged forward, 
there is a screw-up in the repository that prevented merging, so I backed out 
the 3.4 patch before pushing.  So only 2.7 is patched and this issue is not 
done.

--

___
Python tracker 

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



[issue25254] Idle: debugger source line highlighting fails again

2015-09-27 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Re-occurrence of #14146. On that issue, msg225380, 2014-08-15, I said "Debugger 
source line highlighting works fine." I am really sure it was true when I 
posted previously, 2013-05-29.  In 3.4.3, Feb 24 2015, it is not working.  
Ditto for 2.7.10 and 3.5.0, released subsequently, and repository versions of 
2.7 and 3.4,  The problem is not the fix in #14146, which I tested separately 
before replacing it in #24972.

--
components: IDLE
messages: 251746
nosy: markroseman, terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Idle: debugger source line highlighting fails again
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4b3356f1a261 by Terry Jan Reedy in branch '2.7':
Issue #24972: Inactive selection background now matches active selection
https://hg.python.org/cpython/rev/4b3356f1a261

New changeset 70c01dd35100 by Terry Jan Reedy in branch '3.4':
Issue #24972: Inactive selection background now matches active selection
https://hg.python.org/cpython/rev/70c01dd35100

--
nosy: +python-dev

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

OK, I have no idea how I managed to create two commits in 3.4 and 3.5 and loose 
the NEWS entry in the end.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff68705c56a8 by Alexander Belopolsky in branch '3.4':
Closes issue #23600: Wrong results from tzinfo.fromutc().
https://hg.python.org/cpython/rev/ff68705c56a8

New changeset c706c062f545 by Alexander Belopolsky in branch '3.5':
Closes issue #23600: Wrong results from tzinfo.fromutc().
https://hg.python.org/cpython/rev/c706c062f545

New changeset 4879c10ce982 by Alexander Belopolsky in branch 'default':
Closes issue #23600: Wrong results from tzinfo.fromutc().
https://hg.python.org/cpython/rev/4879c10ce982

New changeset cbcf82f92c25 by Alexander Belopolsky in branch '3.4':
Closes issue #23600: Wrong results from tzinfo.fromutc().
https://hg.python.org/cpython/rev/cbcf82f92c25

New changeset 848d665bc312 by Alexander Belopolsky in branch '3.5':
Closes issue #23600: Wrong results from tzinfo.fromutc().
https://hg.python.org/cpython/rev/848d665bc312

--
nosy: +python-dev

___
Python tracker 

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



[issue25253] AttributeError: 'Weather' object has no attribute 'dom'

2015-09-27 Thread Tony

New submission from Tony:

The source code for ctw (CurseTheWeather) can be found here: 
https://github.com/tdy/ctw

Running `ctw USCA0987` or `ctw --nometric USCA0987` (happens regardless of 
location) results in an attribute error with Python 3.4.3. Running `ctw` by 
itself does print a *Welcome to "Curse the Weather" Version 0.6* message.

Traceback (most recent call last):
  File "/usr/bin/ctw", line 378, in 
curses.wrapper(main)
  File "/usr/lib/python3.4/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
  File "/usr/bin/ctw", line 283, in main
update(stdscr)
  File "/usr/bin/ctw", line 250, in update
weather = weatherfeed.Weather(location, metric)
  File "/usr/lib/python3.4/weatherfeed.py", line 40, in __init__
self.dom = parseString(self._getData())
  File "/usr/lib/python3.4/xml/dom/minidom.py", line 1970, in parseString
return expatbuilder.parseString(string)
  File "/usr/lib/python3.4/xml/dom/expatbuilder.py", line 925, in parseString
return builder.parseString(string)
  File "/usr/lib/python3.4/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 64, column 
26
Exception ignored in: >
Traceback (most recent call last):
  File "/usr/lib/python3.4/weatherfeed.py", line 44, in __del__
self.dom.unlink()
AttributeError: 'Weather' object has no attribute 'dom'

I did notice the API URL in weatherfeed.py gives a Bad Request error for:

urlHandle = 
urllib.request.urlopen('http://xoap.weather.com/weather/local/%s?cc=1&dayf=5&prod=xoap&link=xoap&unit=%s&par=1003666583&key=4128909340a9b2fc'

I also noticed the weather.com API now redirects to wunderground.com so I 
registered a new API and updated the URL in weatherfeed.py only to still get 
the same AttributeError. 

The new API is something like 
http://api.wunderground.com/api/APIKEY/conditions/q/CA/San_Francisco.json

--
components: Library (Lib), XML
messages: 251742
nosy: tc
priority: normal
severity: normal
status: open
title: AttributeError: 'Weather' object has no attribute 'dom'
type: crash
versions: Python 3.4

___
Python tracker 

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



[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-27 Thread Steven D'Aprano

Steven D'Aprano added the comment:

On Sun, Sep 27, 2015 at 04:17:45PM +, R. David Murray wrote:
> 
> I also want "detect if there are any surrogates".

I think that's useful enough it should be a str method. Here's a 
pure-Python implementation:

def is_surrogate(s):
return any(0xD800 <= ord(c) <= 0xDFFF for c in s)

The actual Flexible String Representation implementation can be even 
more efficient. All-ASCII and all-Latin1 strings cannot possibly include 
surrogates, so is_surrogate will be a constant-time operation.

(If we care about making this a constant-time operation for all 
strings, the constructor could set a flag on the string object. Since 
the constructor has to walk the string anyway, I don't think that will 
cost much time-wise.)

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I give up. Somehow my changes conflict with 

parent:  98335:0d3b64bbc82c
user:Serhiy Storchaka 
date:Sun Sep 27 22:38:33 2015 +0300
summary: Issue #25203: Failed readline.set_completer_delims() no longer 
left the

and my knowledge of hg is not enough to get out.  When are we switching to git?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19462] Add remove_argument() method to argparse.ArgumentParser

2015-09-27 Thread paul j3

paul j3 added the comment:

I realized while answering a Stackoverflow question that the resolve method has 
the pieces for removing an Action from the parser.  It removes an existing 
Action so that the new, conflicting one, can replace it.

It's meant to be used with flagged arguments.  If `arg1` is an action with one 
option_string, it can be removed with:

parser._handle_conflict_resolve(None, [('--arg1', arg1)])

If it is a positional, this call seems to be sufficient:

arg1.container._remove_action(arg1)

http://stackoverflow.com/a/32809642/901925

Beyond answering this question I haven't tested the idea.  If there's more 
interest I could explore it more.

--

___
Python tracker 

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



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-27 Thread Eric V. Smith

Eric V. Smith added the comment:

Good point. I quick test of our sample code shows that calling regular readline 
to read up to '\n' does in fact work correctly. Let me do some more testing, 
then I'll likely close this.

Thanks!

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Tim Peters

Tim Peters added the comment:

Afraid that's a question for python-dev - I lost track of the active branches 
over year ago :-(

--

___
Python tracker 

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



[issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat): write a new smtp server with asyncio

2015-09-27 Thread R. David Murray

R. David Murray added the comment:

Here is a proof of concept port of smtpd to asyncio.  Obviously I'm not 
suggesting we commit this patch (it isn't complete...the tests don't run).  
Instead I'm posting it as an outgrowth the of the sprint that was conducted 
today.  The DC team took a different tack, so I'm not submitting this as a 
patch to their repo, and since it is useful to look at the diff against 
default, it seems appropriate to post it here.

The advantage of this port is that it uses the existing smtpd protocol code, 
which is the "field tested" code.  Of course, I did have to change how the data 
is turned from bytes into lines, so I may have introduced some bugs.

As discussed, *using* an asyncio based smtpd has a different calling API than 
using the asynchat one.  However, the *pattern* is similar, so it may not be 
crazy to replace smtpd with the cleaned up version of this patch, exactly 
because the number of places this is used is relatively small and mostly in 
test code.  IMO it's a better option than deleting smtpd from the stdlib.

The code as is can be run using its CLI.  I tested it via telnet using the 
DebuggingServer and hand coding an email...for some reason I can't currently 
import smtplib (Enum errors in socket), so I didn't test it with smtplib, but 
it should work.

--
keywords: +patch
Added file: http://bugs.python.org/file40605/aiosmtpd.patch

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Thanks, Tim.  Now I need to figure out how to commit to multiple branches.  
This goes to 3.4 through 3.6, right? or just to 3.5 and 3.6.

--
components: +Extension Modules -Library (Lib)

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Tim Peters

Tim Peters added the comment:

Patch looks good to me!  Thanks :-)

--

___
Python tracker 

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



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm... Since \r\n ends with \n, what exactly would it help to pass in \r\n as 
the desired line ending? In either case the entire line (including the \r\n) 
would be returned.

Unless you have a need for treating foo\nbar\r\n as a single line? (But why 
would you?)  I'm guessing I'm missing something?

No worries about the bug/feature distinction, for asyncio we can do whatever we 
want (it's still provisional in 3.5).

--

___
Python tracker 

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



[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-27 Thread Zachary Ware

Changes by Zachary Ware :


--
type: crash -> behavior

___
Python tracker 

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



[issue25251] Unknown MS Compiler version 1900

2015-09-27 Thread Zachary Ware

Changes by Zachary Ware :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
type: crash -> behavior

___
Python tracker 

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



[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-27 Thread Zachary Ware

Changes by Zachary Ware :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue25252] Hard-coded line ending in asyncio.streams.StreamReader.readline

2015-09-27 Thread Eric V. Smith

New submission from Eric V. Smith:

A group of us (all added as nosy) spent part of the day working on issue 25008 
(write an smtpd with asyncio).

We came across some code that contained a copy of StreamReader.readline, but it 
used b'\r\n' instead of b'\n' for a line ending character. In 
StreamReader.readline, '\n' is hard coded.

I'd like to propose that the line ending be passed in to readline, with a 
default of b'\n', and that multi-byte line ending sequences be explicitly 
supported.

Further, I'm hoping we can treat this as a bug and not a feature request, so 
that it can go in to 3.4 and 3.5. Adding a default parameter will be backward 
compatible.

--
components: asyncio
messages: 251732
nosy: akuchling, barry, eric.smith, gvanrossum, haypo, jason.coombs, 
r.david.murray, yselivanov
priority: normal
severity: normal
status: open
title: Hard-coded line ending in asyncio.streams.StreamReader.readline
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-27 Thread Martin Panter

Martin Panter added the comment:

I don’t have much to do with Windows, but I understand we don’t support 
surrogate-escaped bytes there. E.g. see 
 and 
sys.getfilesystemencoding(). However I suspect your first patch would have 
failed on Windows doing os.fsencode(TESTFN_UNENCODABLE); apparently it cannot 
represent all possible file names in bytes. The second patch doesn’t call 
fsencode() so this shouldn’t be a problem.

Your tests do not test that the output is valid Unicode without surrogates. 
With your first patch applied, when pydoc wrote the HTML to a UTF-8 disk file, 
I got the error:

  File "/media/disk/home/proj/python/cpy\udcffthon/Lib/pydoc.py", line 2626, in 
cli
writedoc(arg)
  File "/media/disk/home/proj/python/cpy\udcffthon/Lib/pydoc.py", line 1659, in 
writedoc
file.write(page)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 
674: surrogates not allowed

I have been working on an alternative patch using my IRI (Unicode URLs) 
proposal for “file:” links, and “surrogatepass” for HTTP links. But I am also 
trying to fix some related problems with the built-in HTTP server, and the unit 
tests are a bit tricky.

--

___
Python tracker 

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



[issue25251] Unknown MS Compiler version 1900

2015-09-27 Thread Matt Hickford

New submission from Matt Hickford:

Hi distutils. I previously used compiler=mingw32 with success. Today I 
installed Visual Studio 2015. Now compiler=mingw32 gives me an error

File "c:\python35\lib\distutils\cygwinccompiler.py", line 86, in get_msvcr
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
ValueError: Unknown MS Compiler version 1900

Any ideas? I don't understand why what msvc I have installed affects build with 
mingw32

--
components: Distutils
messages: 251730
nosy: Matt.Hickford, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Unknown MS Compiler version 1900
type: crash
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



[issue24848] Warts in UTF-7 error handling

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch fixes also a bug in _PyUnicodeWriter. Other affected encoding is 
"unicode-escape":

>>> br'\u;'.decode('unicode-escape', 'replace')
'ý;'

--
Added file: http://bugs.python.org/file40604/utf7_error_handling-2.patch

___
Python tracker 

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



[issue25247] Tkinter modules built successfully but removed because they could not be imported

2015-09-27 Thread Abrantes Araujo Silva Filho

Abrantes Araujo Silva Filho added the comment:

No, I do not have any other Tcl version on my system, and my LD_LIBRARY_PATH 
alredy points to Tcl directory.

The problem with tkinter persist even if I explicity export LD_LIBRARY_PATH 
before the compilation.

Any other ideas?

Thanks!

--

___
Python tracker 

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



[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-09-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, I'm closing, then.

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

___
Python tracker 

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



[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-09-27 Thread Guido van Rossum

Guido van Rossum added the comment:

Agreed we shouldn't change this. It looks like the behavior is consistent if 
you consider `a = StringIO(stuff, newline=...)` merely a shorthand for `a = 
StringIO(newline=...); a.write(stuff)`.

I understand you would like to have a way to set the internal buffer directly, 
without newline translation; to support that we'd have to add a new argument. 
Although really, it's probably better to just do the \r\n translation in your 
app anyway.

You're very unlikely to ever need \r translation -- that was last seen on MacOS 
9, which has been dead for 14 years now. Fighting \r\n or pretending it's a 
Windows-only thing is pretty hopeless -- most text-based internet protocols 
(like HTTP) require it.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Attaching a patch that should fix the issue.

--
keywords: +patch
stage: needs patch -> commit review
versions: +Python 3.4, Python 3.5
Added file: http://bugs.python.org/file40603/issue23600.diff

___
Python tracker 

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



[issue25250] AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

2015-09-27 Thread Matt Hickford

New submission from Matt Hickford:

Hi distutils. I wrote a setup.py that conditions on compiler type, following 
the guide at [1]. I needed to add an extra include when the compiler is an msvc 
version older than 9.0 (infamously missing stdint.h [2])

Anyway the code I wrote to do this was:

if self.compiler.compiler_type == "msvc" and 
int(self.compiler._MSVCCompiler__version) <= 9:

Which worked fine on all Python versions (tested 2.7 through 3.4) UNTIL the 
recent release of Python 3.5. On Python 3.5 I get the error:

AttributeError: 'MSVCCompiler' object has no attribute '_MSVCCompiler__version'

Oh no. My fault I suppose for relying on a private variable. Can you suggest a 
more reliable way to test "compiler is msvc <= 9.0"? The test should be 
compatible all Python versions 2.7 through 3.5 so it can safely go in a setup.py

Can you help?

[1] http://stackoverflow.com/a/5192738/284795
[2] 
https://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio

--
components: Distutils
messages: 251724
nosy: Matt.Hickford, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: AttributeError: 'MSVCCompiler' object has no attribute 
'_MSVCCompiler__version'
type: crash
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



[issue22995] Restrict default pickleability

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please make a review?

--

___
Python tracker 

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



[issue25111] Broken compatibility in FrameSummary equality

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue25093] New 3.5.0 failure in test_tcl on win7

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file40602/testLoadWithUNC_2.diff

___
Python tracker 

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



[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-27 Thread Nir Soffer

Changes by Nir Soffer :


Added file: 
http://bugs.python.org/file40601/0001-Remove-unneeded-and-unsafe-mkstemp-replacement-2.7.patch

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

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



[issue25203] Incorrect handling MemoryError in readline.set_completer_delims

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue25184] "python -m pydoc -w" fails in nondecodable directory

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, perhaps using pathlib is more correct. Updated patch uses pathlib. Can you 
please test it on Windows?

Can filenames on Windows contain lone surrogates?

--
Added file: http://bugs.python.org/file40600/pydoc_undecodabple_path_2.patch

___
Python tracker 

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



[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-27 Thread Nir Soffer

New submission from Nir Soffer:

The module define unsafe replacement if tempfile.mkstemp is not available.

This function is available in both master and 2.7 branches.

--
components: Tests
files: 0001-Remove-unneeded-and-unsafe-mkstemp-replacement.patch
keywords: patch
messages: 251720
nosy: nirs
priority: normal
severity: normal
status: open
title: Unneeded and unsafe mkstemp replacement in test_subprocess.py
versions: Python 2.7, Python 3.6
Added file: 
http://bugs.python.org/file40599/0001-Remove-unneeded-and-unsafe-mkstemp-replacement.patch

___
Python tracker 

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



[issue25203] Incorrect handling MemoryError in readline.set_completer_delims

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 46aaff5e8945 by Serhiy Storchaka in branch '3.4':
Issue #25203: Failed readline.set_completer_delims() no longer left the
https://hg.python.org/cpython/rev/46aaff5e8945

New changeset d867ca794bdb by Serhiy Storchaka in branch '2.7':
Issue #25203: Failed readline.set_completer_delims() no longer left the
https://hg.python.org/cpython/rev/d867ca794bdb

New changeset 0d3b64bbc82c by Serhiy Storchaka in branch '3.5':
Issue #25203: Failed readline.set_completer_delims() no longer left the
https://hg.python.org/cpython/rev/0d3b64bbc82c

New changeset 48943533965e by Serhiy Storchaka in branch 'default':
Issue #25203: Failed readline.set_completer_delims() no longer left the
https://hg.python.org/cpython/rev/48943533965e

--
nosy: +python-dev

___
Python tracker 

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



[issue25203] Incorrect handling MemoryError in readline.set_completer_delims

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-09-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

At this point in time, I don't think it's a good idea to change the semantics 
at all. Some people might unknowingly rely on the current semantics, and the 
consequences of a change in 3.6 might be hard to debug.

The larger issue here is that the newline translation layer is meant as an 
adaptation layer between Python (where a newline is always "\n") and the 
outside world (where newlines are system-dependent or even file-dependent). But 
what is the "outside world" with StringIO? The data always comes from and goes 
to Python. So there is no obviously right decision except, perhaps, the 
decision not to have newline translation at all.

So I'd just recommend closing this as won't fix.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like I introduced this bug ~ 5 years ago when I made a switch from 
integer minutes offset to an arbitrary timedelta.  It's rather amazing that it 
took so long to discover it.

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added comments on Rietveld.

--

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2015-09-27 Thread Mark Roseman

Mark Roseman added the comment:

Good catch about yview for text widgets!

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-27 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
stage:  -> needs patch

___
Python tracker 

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



[issue22798] time.mktime doesn't update time.tzname

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Is there any platform where mktime resets global tzname but does not provide 
tm_zone?  If not, OP's issue is largely theoretical, but I still like MAL's 
suggestion of using strftime("%Z") as a fall-back.

--

___
Python tracker 

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



[issue25248] Discrepancy in unpickling integers with protocol 0

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

One funny thing is that the same data can produce different result when 
unpickled with pickle and cPickle in 2.x. But unlikely it is larger 
vulnerability than using unpickling at all.

Just FYI:

PyPy 2.2.1:
 import pickle, cPickle
 pickle.loads(b'I010\n.')
10
 cPickle.loads(b'I010\n.')
10
 pickle.loads(b'L010\n.')
8L
 cPickle.loads(b'L010\n.')
8L

Jython 2.5.3:
>>> import pickle, cPickle
>>> pickle.loads('I010\n.')
10
>>> cPickle.loads('I010\n.')
10
>>> pickle.loads('L010L\n.')
8L
>>> cPickle.loads('L010L\n.')
10L

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

___
Python tracker 

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



[issue22798] time.mktime doesn't update time.tzname

2015-09-27 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Akira,

Would issue22798.diff patch address your issue?

--
assignee:  -> belopolsky
resolution: not a bug -> 
stage: resolved -> patch review
Added file: http://bugs.python.org/file40598/issue22798.diff

___
Python tracker 

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



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Classification of test failures:

1. test_distutils, test_httpservers, test_shutil, test_subprocess - unable to 
run an executable or load a library from /tmp. This is likely testing issue, 
not a bug. We should just detect this situation and skip tests.

2. test_fcntl - likely a restriction of /tmp filesystem (if the test is passed 
in non-restricted environment). In this case we should just skip the test.

3. test_readline - readline initialization issue (issue19884). This is real bug 
that already was reported. We trying to fix it (unsuccessfully).

--
nosy: +ezio.melotti, michael.foord, pitrou
type: compile error -> behavior

___
Python tracker 

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



[issue25248] Discrepancy in unpickling integers with protocol 0

2015-09-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If it's not produced in any case, I don't think we should care about it. The 
only thing we must be careful about is not to crash or open any vulnerabilities.

--

___
Python tracker 

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



[issue25248] Discrepancy in unpickling integers with protocol 0

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, it is never produced by standard pickler. I'm just interesting, could we 
do something with this, and should we do anything?

--

___
Python tracker 

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



[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-27 Thread R. David Murray

R. David Murray added the comment:

I also want "detect if there are any surrogates".

--

___
Python tracker 

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



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-27 Thread R. David Murray

R. David Murray added the comment:

That's an interesting possibility regardless of this issue.  That's probably 
something the test suite *should* take into account, since as people get more 
careful about security that's something we could see happening more often.

--

___
Python tracker 

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



[issue25011] Smarter rl complete: hide private and special names

2015-09-27 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue25248] Discrepancy in unpickling integers with protocol 0

2015-09-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is b'I010\n.' actually produced by the pickler, or is it something you 
contructed yourself?

--

___
Python tracker 

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



[issue25248] Discrepancy in unpickling integers with protocol 0

2015-09-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

There are discrepancies between Python 2 and Python 3, Python and C 
implementations, INT and LONG opcodes when unpickle integer with protocol 0.

Python 2.7:

>>> import pickle, cPickle
>>> pickle.loads(b'I010\n.')
10
>>> cPickle.loads(b'I010\n.')
8
>>> pickle.loads(b'L010\n.')
8L
>>> cPickle.loads(b'L010\n.')
8L

Python 3.6:

>>> import pickle
>>> pickle.loads(b'I010\n.')
8
>>> pickle._loads(b'I010\n.')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/pickle.py", line 1557, in _loads
encoding=encoding, errors=errors).load()
  File "/home/serhiy/py/cpython/Lib/pickle.py", line 1039, in load
dispatch[key[0]](self)
  File "/home/serhiy/py/cpython/Lib/pickle.py", line 1106, in load_int
val = int(data, 0)
ValueError: invalid literal for int() with base 0: b'010\n'
>>> pickle.loads(b'L010\n.')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: invalid literal for int() with base 0: '010\n'
>>> pickle._loads(b'L010\n.')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/pickle.py", line 1557, in _loads
encoding=encoding, errors=errors).load()
  File "/home/serhiy/py/cpython/Lib/pickle.py", line 1039, in load
dispatch[key[0]](self)
  File "/home/serhiy/py/cpython/Lib/pickle.py", line 1126, in load_long
self.append(int(val, 0))
ValueError: invalid literal for int() with base 0: b'010'

--
components: Extension Modules, Library (Lib)
messages: 251705
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Discrepancy in unpickling integers with protocol 0
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25247] Tkinter modules built successfully but removed because they could not be imported

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Do you have other Tcl versions in 8.6 branch installed? Try to set

export LD_LIBRARY_PATH=/usr/local/lib/tcl8.6.4/lib

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25247] Tkinter modules built successfully but removed because they could not be imported

2015-09-27 Thread Abrantes Araujo Silva Filho

New submission from Abrantes Araujo Silva Filho:

I'm trying to compile Python 3.5 on a CentOS 7.1, with TCL 8.6.4, but make 
always give me the following message:

*** WARNING: renaming "_tkinter" since importing it failed: 
build/lib.linux-x86_64-3.5/_tkinter.cpython-35m-x86_64-linux-gnu.so: undefined 
symbol: Tcl_GetCharLength

Following modules built successfully but were removed because they could not be 
imported:
_tkinter


The configure command was the following (both, Tcl and Tk are installed under 
/usr/local/lib/tcl8.6.4):

CXX=g++ ./configure --prefix=/usr/local/python3 --enable-shared 
--enable-loadable-sqlite-extensions --enable-ipv6 
--with-tcltk-includes="-I/usr/local/lib/tcl8.6.4/include" 
--with-tcltk-libs="-L/usr/local/lib/tcl8.6.4/lib"

I could not found a solution for this issue, and I do not know if this is a bug.

--
components: Tkinter
messages: 251703
nosy: abrantesasf
priority: normal
severity: normal
status: open
title: Tkinter modules built successfully but removed because they could not be 
imported
type: compile error
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



[issue25177] OverflowError in statistics.mean when summing large floats

2015-09-27 Thread Bar Harel

Bar Harel added the comment:

Alright, this patch passed all tests.
I've changed the function sum to include a new parameter called fraction which 
decides whether to return a fraction or not. It might be useful in more 
scenarios due to the fact fractions are more accurate.
I'm still unsure why not to support mixed types, as we can just again, return a 
mixed type as fraction but I left it like this in order not to cause unexpected 
behavior. I still think however that supporting mixed types should be fine as 
the bottleneck regarding precision is fraction, which is used as the base for 
conversion anyway.
I've added a few doctests on the way including the float max and min, which did 
not previously pass on the current implementation, and changed the unittest to 
match.

--
Added file: http://bugs.python.org/file40597/Issue25177_rev2.patch

___
Python tracker 

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



[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-27 Thread Nick Coghlan

Nick Coghlan added the comment:

As far as the rationale for adding the functions at all goes, my main interest 
is still in having somewhere in the codecs module documentation to *define the 
problem*, and to my mind that entails also offering a simple way to do the 
relevant pre-/post-processing.

The nice aspect of building any related capabilities atop the standard error 
handlers is that it also means that third party modules can provide custom 
error handlers to support further escaping techniques, and those will also be 
available for use in decoding and encoding operations, rather than being 
specific to pre-/post-processing of the data.

However, it's also the case that we're generally going to be talking about the 
combination of encoding misconfiguration *and* processing data that gets 
potentially corrupted by the misconfiguration *and* doing something with it 
that isn't already handled by a surrogateescape round-trip, which is why I 
suspect in practice most applications are going to be able to get away with 
ignoring the problem entirely (especially with C.UTF-8 support coming to Fedora 
24, so the Fedora/RHEL/CentOS ecosystem will be joining the Debian/Ubuntu 
ecosystem in offering that by default)

--

___
Python tracker 

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



[issue25011] Smarter rl complete: hide private and special names

2015-09-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue25209] Append space after completed keywords

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your review Martin. Hope to see your patch for completing import 
statement.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue25209] Append space after completed keywords

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f64ec4aac935 by Serhiy Storchaka in branch 'default':
Issue #25209: rlcomplete now can add a space or a colon after completed keyword.
https://hg.python.org/cpython/rev/f64ec4aac935

--
nosy: +python-dev

___
Python tracker 

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



[issue25011] Smarter rl complete: hide private and special names

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4dbb315fe667 by Serhiy Storchaka in branch 'default':
Issue #25011: rlcomplete now omits private and special attribute names unless
https://hg.python.org/cpython/rev/4dbb315fe667

--
nosy: +python-dev

___
Python tracker 

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



[issue25177] OverflowError in statistics.mean when summing large floats

2015-09-27 Thread Bar Harel

Bar Harel added the comment:

Alright, I issued a fix, now testing it

--

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-27 Thread STINNER Victor

STINNER Victor added the comment:

test_regrtest.patch: add tests for the 8 (!) ways to run the Python test suite.

TODO:
* try test on Windows
* maybe test also PCbuild/rt.bat on Windows

--
Added file: http://bugs.python.org/file40596/test_regrtest.patch

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 892b4f029ac6 by Victor Stinner in branch 'default':
Issue #25220: Fix Lib/test/autotest.py
https://hg.python.org/cpython/rev/892b4f029ac6

--

___
Python tracker 

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



[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-27 Thread Nick Coghlan

Nick Coghlan added the comment:

I think moving this forward mainly needs someone with the time and energy 
wrangle a python-ideas/dev discussion to get some additional feedback on the 
API design. As I see it, there are 2 main questions to be resolved:

1. Where to expose these functions

The default location would be the codecs module, as they're closely related to 
the error handlers in that module, and the main reasons for needing to clean 
data at all are handling dirty data produced by an interface that uses 
surrogatepass or surrogateescape when decoding (handle_surrogates, 
handle_surrogateescape), or encoding data for use in a context which doesn't 
correctly handle code points outside the basic multilingual plane 
(handle_astrals).

If added to the codecs module, they could be documented in new sections on 
"Postprocessing decoded text" and "Preprocessing text for encoding".

The main argument against that would be Stephen's one, which is that these 
aren't themselves encoding or decoding operations, but rather internal state 
manipulations on Python strings.

2. The exact function set to be provided.

The three potential data cleaning cases currently being considered:

* process_surrogates: reprocessing all surrogates in the string, including lone 
surrogates and valid surrogate pairs. Such strings may be produced by using the 
"surrogatepass" handler when decoding, or by decomposing astral characters to 
surrogate pairs.
* process_surrogateescape: reprocessing only lone surrogates in the U+DC80 to 
U+DCFF range, with other surrogate pairs or lone surrogates triggering 
UnicodeTranslateError. Such strings may be produced by using the 
"surrogateescape" error handler when decoding.
* process_astrals: reprocessing all code points in the astral plane.

These seem to cover the essentials to me, and I changed the proposed prefix to 
"process_*" based on the idea of documentating them as preprocessing and 
postprocessing steps for encoding and decoding.

--

___
Python tracker 

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



[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-27 Thread STINNER Victor

STINNER Victor added the comment:

Hum, I suggest to put these functions in a package on PyPI, or recipes on a
website like stackoverfkow., and close the issue.

I'm still not convinced that these functions are useful . Usually we take a
function from an existing project used in applications to put it in the
stdlib. Here the use case still looks artifical. For example which
application requires to escape non-BMP character? How does it handle them
currently?

Threre are too many ways to handle surrogate characters. The common ways to
show undecodable bytes are not supported by functions proposed by Serhiy.
Example: %80 on Mac OS X. Gnome uses something else.

It was said that one reason to add new functions is performance. I'm not
convinced neither that such function is the bottleneck on any application.

I prefer to wait until users experiment with their own implementation and
see if a common function can be extracted from this to put it in the stdlib.

--

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2015-09-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

By reading http://www.tcl.tk/man/tcl8.6/TkCmd/text.htm I discovered that 
Text.yview(index) puts the line with index at the top of the windows, given 
enough line below to fill the window.  This fixes another glitch.

Still left: the original 3 items (msg251181), navigating the text with up and 
down arrow (msg251571), and operating TOC button with keyboard (msg251556).

--
Added file: http://bugs.python.org/file40595/top-of-window.diff

___
Python tracker 

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



[issue25246] Alternative algorithm for deque_remove()

2015-09-27 Thread Raymond Hettinger

New submission from Raymond Hettinger:

The current algorithm for remove() rotates the deque one-by-one until a match 
is found, pops it off the deque and does single mass rotate to undo the 1-step 
rotates.

An alternative approach is to use deque_index() to locate the value of interest 
and use deque_del_item() to remove it.  

If not value is found, the alternative is better because it never moves the 
data in the deque.  If the value is found, the alternative removes it using two 
mass rotations.  The advantage in that case is the mass rotates are faster than 
many 1-step rotates.  The disadvantage is that we go through the pointer chain 
twice (the first time visiting and comparing every element and the second time 
only following the chain of links).

If the deque mutates during the search, a RuntimeError is raised.  This is a 
behavior change, formerly it raised an IndexError.

--
assignee: rhettinger
files: deque_better_remove.diff
keywords: patch
messages: 251691
nosy: rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Alternative algorithm for deque_remove()
versions: Python 3.6
Added file: http://bugs.python.org/file40594/deque_better_remove.diff

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40bab637295d by Terry Jan Reedy in branch '2.7':
Issue #25198: When using the Idle dov TOC menu, put the section title at the
https://hg.python.org/cpython/rev/40bab637295d

New changeset 5b635a3ca3d5 by Terry Jan Reedy in branch '3.4':
Issue #25198: When using the Idle dov TOC menu, put the section title at the
https://hg.python.org/cpython/rev/5b635a3ca3d5

--

___
Python tracker 

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



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Okay, I think it might make more sense for |s| to be a return value, but that 
change probably isn't appropriate for bugfix releases.

--

___
Python tracker 

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



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f0dcf7599517 by Benjamin Peterson in branch '3.4':
initialize return value to NULL to avoid compiler compliants (closes #25245)
https://hg.python.org/cpython/rev/f0dcf7599517

New changeset ef3b833b98c2 by Benjamin Peterson in branch '3.5':
merge 3.4 (#25245)
https://hg.python.org/cpython/rev/ef3b833b98c2

New changeset 4d23598f1428 by Benjamin Peterson in branch 'default':
merge 3.5 (#25245)
https://hg.python.org/cpython/rev/4d23598f1428

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Why not just initially set *s to NULL in _Unpickler_Read?

It would be the third variant.

The fourth variant is to change the signature of _Unpickler_Read() and return 
char * (NULL on error). All these variants work, I examined them.

--

___
Python tracker 

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



[issue25245] Compile warnings in _pickle.c

2015-09-27 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Why not just initially set *s to NULL in _Unpickler_Read?

--

___
Python tracker 

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



[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-09-27 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue23329] _ssl cannot be compiled with LibreSSL anymore (on OpenBSD 5.5) because of ALPN

2015-09-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 38a5b0f6531b by Benjamin Peterson in branch '3.5':
detect alpn by feature flag not openssl version (closes #23329)
https://hg.python.org/cpython/rev/38a5b0f6531b

New changeset 747996431c7e by Benjamin Peterson in branch 'default':
merge 3.5 (#23329)
https://hg.python.org/cpython/rev/747996431c7e

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