[issue25883] python 2.7.11 mod_wsgi regression on windows

2015-12-17 Thread stephan

stephan added the comment:

OK, I renamed:

 HKLM\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath
to
 HKLM\Software\Wow6432Node\Python\PythonCore\2.7-32\PythonPath

and now it works again.

So I'll wait for python 2.7.12 :-)

Thanks Steve

--

___
Python tracker 

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



[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-17 Thread Zachary Ware

Zachary Ware added the comment:

Martin Panter added the comment:
> Okay, so you have a test with subtests. You have presented three cases:
>
> 1. Single subtest which passes. No problem I assume.

Or several subtests which pass.  No problems.

> 2. Two subtests: 1st fails, 2nd passes. This is how subtests are normally 
> used, so I guess there is no problem. Is that right?

Any of multiple subtests fail, and there is no indication in the
"summary line" (the line that is usually "..",
a dot for each successful test).  When a a regular test fails, an F
(or an E, if the raised exception was anything but
self.failureException) is added to the line; when any subtests fail,
nothing is added.  If you have 10 tests methods that use subtests, and
any subtest in each method fails, your summary line will be blank.  In
verbose mode, you'd get "test_one ... test_two ... test_three ... ..."
(note lack of newlines) instead of the expected "test_one ...
FAILURE\ntest_two ... FAILURE\ntest_three ... FAILURE\n..." (note the
newlines).

> 3. After two subtests have already run (one of which failed), SkipTest is 
> raised. I guess you want the test results to be reported better in this case.
>
> What is the use case? Why not skip the test before any subtests are started?

Only the subtest is skipped (which should be valid, or documented as
not valid), and the order of the subtests doesn't matter:

$ tests=210 ./python.exe subtest_test.py -v
test_subTest (__main__.TestClass) ... skipped 'skipped'

==
FAIL: test_subTest (__main__.TestClass) ()
--
Traceback (most recent call last):
  File "subtest_test.py", line 14, in test_subTest
self.assertTrue(t)
AssertionError: 0 is not true

--
Ran 1 test in 0.001s

FAILED (failures=1, skipped=1)

But, the summary makes it seem as though the entire test was skipped.

Hopefully this makes it a bit clearer :)

--

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

If the timespec allowed any arbitrary number of digits after the decimal point, 
that would remove any argument about nanoseconds not being supported. It would 
also mean I could use this in one case where I currently format to two decimal 
places (my compromise between accurate timestamps and excessive information). 
Just a suggestion :)

--

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne

SpaceOne added the comment:

It makes error handling really hard.
Here is a patch:
https://github.com/python/cpython/compare/master...spaceone:idna?expand=1

--
status: closed -> open

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb7a19e42566 by Martin Panter in branch '3.4':
Issue #25809: Skip testing platform-dependent French thousands separator
https://hg.python.org/cpython/rev/bb7a19e42566

--

___
Python tracker 

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



Re: How can I get/save Pandas DataFrame help content?

2015-12-17 Thread Peter Otten
Robert wrote:

> Hi,
> 
> When I use Enthought/Canopy, help(DataFrame) has so much content that it
> exceeds the display buffer, i.e. its head is cut off as I go up to see it.
> I would like to know whether there is a way similar to Linux redirection
> to save the help DataFrame content to a file?
> 
> I have search on-line Pandas DataFrame web page. Surprisingly, it has much
> less content than help(DataFrame) command.
> 
> If there is no way to save the content to a file, do you know where I can
> get the full help DataFrame content on a web page?

On the commandline start a webserver with

python -m pydoc -p 8000

and then point your browser to

http://localhost:8000/pandas.core.frame.html#DataFrame

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25885] ast Str type does not annotate the string type when it parses a python document

2015-12-17 Thread STINNER Victor

STINNER Victor added the comment:

> Would it be prudent to add a Parse flag to the AST module that could provide 
> one of two types of AST's an optimized AST or a complete AST

Adding syntax ("formatting", call it as you want) info to AST requires
to add new attributes to existing AST nodes and probably add new AST
nodes. It will make the code more complex, not only the code to
produce AST, but also code using AST (static code analyzer, my AST
optimizer project, etc.).

I don't think that it's worth it.

--

___
Python tracker 

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



[issue25885] ast Str type does not annotate the string type when it parses a python document

2015-12-17 Thread STINNER Victor

STINNER Victor added the comment:

If you consider that we are wrong, please follow the advice of
starting a discussion on python-ideas. This is how Python is
developed, we have a workflow. Proposing ideas on the bug tracker
works in some cases, but AST is really a *core* feature of Python. You
need deep discussions to change the core. To be cristal clear: *if*
anyone is going to change AST, IMHO a PEP is needed. Writing a PEP
requires a specific workflow starting at python-ideas.

--

___
Python tracker 

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



[issue19587] Remove empty tests in test_bytes.FixedStringTest

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

test_contains() does not appear to be overriding anything, so there is no 
problem removing that.

Unmasking the other three methods will allow six new test methods to run (via 
ByteArrayAsStringTest and BytesAsStringTest). There are already three 
equivalent methods defined in buffer_tests.py run via BytearrayPEP3137Test. I 
suggest to remove those three from buffer_tests. The net result will be the 
same tests run for bytes(), and three new tests for bytearray(). The 
buffer_tests file is not used anywhere else.

--
nosy: +martin.panter
versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file41335/test_bytes.v3.diff

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

Can you explain why it makes error handling hard?  I'm still not seeing the use 
case.  I've always viewed UnicodeEncodeError vs UnicodeDecodeError as "extra" 
information for the consumer of the error message, not something that matters 
in code (I just catch UnicodeError).

I'm not objecting to the change, but it might be nice to know why Martin chose 
plain UnicodeError, if he's got the time to answer.

--
nosy: +loewis

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne

SpaceOne added the comment:

Because i need to do everywhere where I use this:

try:
user_input.encode(encoding)
except UnicodeDecodeError:
raise
except (UnicodeError, UnicodeEncodeError):
do_my_error_handling()

instead of
try:
user_input.encode(encoding)
except UnicodeEncodeError:
do_my_error_handling()

--

___
Python tracker 

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



Re: Hangman Code.

2015-12-17 Thread Denis McMahon
On Thu, 17 Dec 2015 05:28:23 -0800, trkaplan24 wrote:

> Hello, I created a python code for a simple hangman game. Was wondering
> if anyone could edit to help me make it multiplayer so when one person
> guesses a letter incorrectly, the next player can then guess a letter.

First you need to prompt for the number of players, and store this in a 
variable.

Next you need a variable to keep track of the current player. Set this to 
1 at the start of the program, because we're humans and we like to be 
player 1 ... player n, not player 0 ... player n-1.

Use the current player variable value to prompt for the next player.

After each player takes a turn, add 1 to the current player. If this is 
greater than the number of players, set it back to 1.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list


python 3.4, os.walk does not walk into cdroms

2015-12-17 Thread Siegfried Kaiser
Hello all,

 I have a problem with os.walk - it does not walk into a mounted cdrom, I do 
not see the cdrom in the walk at all.
What can I do to walk into cdrom?

Thanks,
Siegfried

-- 
Siegfried Kaiser 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Tk alternative to askopenfilename and askdirectory?

2015-12-17 Thread Ulli Horlacher
Rick Johnson  wrote:

> Oh i understand. What you opine for is something like: askOpenFileOrDir()
> -- which displays a dialog from which a file or directory can be selected
> by the user. 

Yes, exactly!
Now: how?

-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de
Universitaet Stuttgart Tel:++49-711-68565868
Allmandring 30aFax:++49-711-682357
70550 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-17 Thread Ulli Horlacher
Rick Johnson  wrote:

> Unlike a true "applications language", like say, um, *JAVA*, one cannot
> simply compile an executable and distribute it in a teeny tiny binary
> form, no, with Python

Of course you can!
If have done this with pyinstaller. This creates a standalone Windows
executable you can distribute.
Example:
http://fex.rus.uni-stuttgart.de:8080/fexit.html




-- 
Ullrich Horlacher  Server und Virtualisierung
Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de
Universitaet Stuttgart Tel:++49-711-68565868
Allmandring 30aFax:++49-711-682357
70550 Stuttgart (Germany)  WWW:http://www.tik.uni-stuttgart.de/
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25809] "Invalid" tests on locales

2015-12-17 Thread koobs

koobs added the comment:

Thank you all. A+++, would collaborate again.

--

___
Python tracker 

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



Hangman Code.

2015-12-17 Thread trkaplan24
Hello, I created a python code for a simple hangman game. Was wondering if 
anyone could edit to help me make it multiplayer so when one person guesses a 
letter incorrectly, the next player can then guess a letter. 

import time
player1 = raw_input("What is your name Player 1? ")
player2 = raw_input("What is your name Player 2? ")

print "Hello, " + player1, "You get to go first!"
print "Hello, " + player2, "Wait for your turn!"

print "\n"
time.sleep(1)
print "Start guessing..."
time.sleep(0.5)
word = "hockey"
guesses = ''
turns = 10
while turns > 0:
failed = 0
for char in word:
if char in guesses:
print char,
else:
print "_",
failed += 1
if failed == 0:
print "\nYou won"
break
print
guess = raw_input("guess a character:")
guesses += guess
if guess not in word:
turns -= 1
print "Wrong\n"
print "You have", + turns, 'guesses left'
if turns == 0:
print "You Lose\n"

Thank you!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python 3.4, os.walk does not walk into cdroms

2015-12-17 Thread Mark Lawrence

On 17/12/2015 13:03, Siegfried Kaiser wrote:

Hello all,

  I have a problem with os.walk - it does not walk into a mounted cdrom, I do 
not see the cdrom in the walk at all.
What can I do to walk into cdrom?

Thanks,
 Siegfried



Please give us.

1) Your OS.
2) Your code.
3) How you tried to run it.
4) Exactly what happened.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

I believe this was discussed at the time subTest was added and deemed an 
acceptable tradeoff for a simpler implementation.  I'm not sure it is, but I'm 
not prepared to write code to fix it :)  I'm bothered every time I see this, 
but I have to admit that the tracebacks are the most important feedback and you 
do get those.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25885] ast Str type does not annotate the string type when it parses a python document

2015-12-17 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree that the proposed change would require a PEP, and this should be 
discussed on python-ideas.

I also think there's very little chance such a change would be accepted, but 
that doesn't mean it's impossible.

I think using a external library is your best bet here. If you want to pursue 
this on python-ideas, you should discuss why being in the stdlib's ast module 
would be an improvement over using an external library.

--
nosy: +eric.smith
status: open -> closed

___
Python tracker 

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



Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-17 Thread Oscar Benjamin
On 17 December 2015 at 00:03, Bruce Whealton
 wrote:
> I watched one training video that discussed Python and Tkinter. Like many 
> similar tutorials from online training sites, I was left scratching my head.
>
> What seems to be blatantly missing is how this would be distributed. In the 
> first mentioned tutorial from Lynda.com the Tkinter app was related to a web 
> page. However, the browser cannot run Python Bytecode or Python Scripts.
>
> Surely, one is going to want to create GUI apps for users that are not Python 
> Developers. I would not think to ask someone to install Python on their 
> system and make sure it is added to the path. Maybe it is not so hard for the 
> non-technical, average users.
>
> I would want to package in some way so that when launched, it installs 
> whatever is needed on the end user's computer. How is this done?
> Are there common practices for this?

There are different general approaches in this area. One possibility
is to ship an installer. Another is to try and ship a complete single
file executable. For the single-file executable you have
pyinstaller/py2exe/py2app etc.

If you're user can be expected to install the software before running
it then in the basic case it is not too hard. Python itself comes with
a graphical installer for Windows and is already installed on every
other OS. If you can assume that Python is installed then you can
distribute your application simply as a zip file but with a .py(z)(w)
file extension.

See here:
https://www.python.org/dev/peps/pep-0441/

A Windows user should then be able to simply double click the .pyz
file and have it run. I'm not sure how that works on a MAC but on
Linux you can preface the zip file with a shebang make it executable
and it will run from the terminal and from any file-browser if it
knows how to run executable files.

Another option for Windows although it is relatively new is that as of
Python 3.5 there is an embedded distribution of Python that is
intended to be shipped as part of an application installer and
installed local to the application. This is new and I haven't heard
anyone using it and don't know if any tools exist to help actually
creating an installer using it.

--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SilentGhost

SilentGhost added the comment:

I think what David was trying to say is that you could do

try:
user_input.encode(encoding)
except UnicodeError:
do_my_error_handling()

since UnicodeError is a super class of UnicodeDecodeError and 
UnicodeEncodeError.

--
nosy: +SilentGhost

___
Python tracker 

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



Re: How can I get/save Pandas DataFrame help content?

2015-12-17 Thread Robert Kern

On 2015-12-17 04:09, Steven D'Aprano wrote:

On Thursday 17 December 2015 13:48, Robert wrote:


Hi,

When I use Enthought/Canopy, help(DataFrame) has so much content that it
exceeds the display buffer, i.e. its head is cut off as I go up to see it.



Step 1: report this as a bug to Enthought and/or the Python bug tracker.
help(DataFrame) should automatically choose a pager such as `less` on Linux
or equivalent (`more` I think?) on Windows.


I suspect that he is using the embedded IPython console in the Canopy IDE, so 
it's more of an issue that help() knows that it's not in a true terminal so it 
doesn't page. If he had been using python at the terminal, help() would have 
indeed used the appropriate terminal pager.


Robert, in the IPython console, you can also use a special syntax to get the 
content. The IPython console widget does know how to page this:


  In [1]: pandas.DataFrame?

http://ipython.readthedocs.org/en/stable/interactive/reference.html#dynamic-object-information

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
https://mail.python.org/mailman/listinfo/python-list


[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne

SpaceOne added the comment:

I know that UnicodeEncodeError is a subclass of UnicodeError. The problem here 
is that UnicodeError would also catch UnicodeDecodeError.
This is especially disturbing if you catch errors of a whole function.

If you e.g. use python2.7 you might want to catch only UnicodeEncodeError if 
you encode something and don't want to catch UnicodeDecodeError.

>>> b'\xff'.encode('utf-8')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal 
not in range(128)

(Read that code carefully!!! It's not something which should ever be done but 
might happen in the world)
Especially if you are writing python2+3 compatible applications.

--

___
Python tracker 

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



[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread paul j3

paul j3 added the comment:

Argument groups are not designed to be nested.

If you print_help the parent parser, you'll see that the sub_args are missing 
entirely, not just displaced.  They appear in the usage, but not the help 
lines.  sub_group has no record that it was added to global_group (it doesn't 
have the ._container attribute).  

All containers, both parsers and groups, have a ._action_groups list (inherited 
from their common super), but I don't think any of the group code uses that 
list.  And the part of the help_formatter than handles groups is not recursive. 
 It handles just one level of groups.

I suspect the sub_group actions appear in the 'optional arguments' group for 
similar reasons as with the mutually_exclusive_group, but the details probably 
differ.

There have been a number of questions on SO about using argument_groups to add 
actions to a mutually_exclusive_group.  They either want a convenient way of 
adding a group of actions, or they want some sort of 'any'  logic applied to 
the subgroup.  We've had to say - no you can't nest groups like that.  I have 
explored in another bug/issue the idea of nesting groups and applying all sorts 
of logic (not just xor), but that's a big issue.

--

___
Python tracker 

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



[issue25887] awaiting on coroutine more than once should be an error

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Please review the attached patch.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41336/Issue25887.patch

___
Python tracker 

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



[issue25887] awaiting on coroutine more than once should be an error

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

New patch -- added more tests, made gen_send_ex() to always raise an error if 
the genobject is an exhausted coroutine.

--
Added file: http://bugs.python.org/file41337/Issue25887_2.patch

___
Python tracker 

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



[issue25888] awaiting on coroutine that is being awaited should be an error

2015-12-17 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue25887] awaiting on coroutine more than once should be an error

2015-12-17 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



Re: error reading api with urllib

2015-12-17 Thread Simian
I will try adding the get.

I have not used curl.

I also forgot to mention that the code runs against another server, though a 
slightly different version number.

Thanks to you both.

Simian
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25896] array.array accepting byte-order codes in format strings

2015-12-17 Thread Zoinkity .

New submission from Zoinkity .:

I'd like to propose allowing the use of byte-order characters in the typecode 
string used by the array.array class.  

This removes any ambiguity on the order of the data, especially when that data 
is not known and loaded from an outside source.  You wouldn't need to presume 
little or big endian machine byteorder or test the system to determine this.  
Also, it removes the necessity of byteswapping data that isn't in the correct 
order.

--
components: Extension Modules
messages: 256614
nosy: Zoinkity..
priority: normal
severity: normal
status: open
title: array.array accepting byte-order codes in format strings
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue24505] shutil.which wrong result on Windows

2015-12-17 Thread Toby Tobkin

Toby Tobkin added the comment:

Patch and tests attached. All Python tests passed on Windows 8 and Ubuntu 
14.04LTS.

--
keywords: +patch
Added file: http://bugs.python.org/file41338/issue 24505 proposed patch windows 
cmd semantics.patch

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread G

New submission from G:

I have installed one copy of Python 3.5.1 and Tcl/Tk 8.6.4.1 in a high school 
lab with 28 more computers. Want to be sure I'm doing it correctly. Before the 
update we were running Python 2.7.10 and always got a warning: Tcl/Tk (8.5.9) 
may be unstable. I'm still getting the same warning after installing Tcl/Tk 
8.6.4.1 . What to I need to do so 3.5.1 sees the correct Tcl/Tk file? What does 
unstable in this context mean? We had no issues I was aware of.

--
files: python update 1.png
messages: 256616
nosy: ccgm
priority: normal
severity: normal
status: open
title: Python 3.5.1 and Active Tcl/Tk 8.6.4.1
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41340/python update 1.png

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread Ned Deily

Ned Deily added the comment:

Please read the information at the web page linked to in that message you have 
been seeing:  https://www.python.org/download/mac/tcltk/.  As explained there, 
the current Pythons downloaded from python.org for OS X dynamically link with 
Tcl/Tk 8.5.x, not 8.6.x.  You should download and install the latest ActiveTcl 
8.5 version for OS X which is currently 8.5.18.0 from 
http://www.activestate.com/activetcl/downloads.  You don't need to uninstall 
the 8.6.5.1 version that you've already installed; it will be ignored.

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



[issue25888] awaiting on coroutine that is being awaited should be an error

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

The patch is attached, please review.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41339/Issue25888.patch

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread SilentGhost

Changes by SilentGhost :


--
components: +IDLE, Macintosh, Tkinter
nosy: +gpolo, ned.deily, ronaldoussoren, serhiy.storchaka

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Aho Corasick doesn't seem likely to be useful here; it's good if the haystack 
is huge (or you have many haystacks to search) and you have many needles to 
look for (and the needles never change), but it pays a fairly steep setup cost; 
for a utility that searches for a single subsequence once, with no history, 
Aho-Corasick wouldn't help much.

A variant on Boyer-Moore (which involves less preprocessing work on the needle) 
might help, but I'm not sure the feature is compelling enough to warrant 
acceleration in the first place.

--

___
Python tracker 

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



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-17 Thread Swati Jaiswal

Swati Jaiswal added the comment:

Okay, so should I go for a patch for it? And sorry if it sounds naive, but do 
we provide the work around or the user would implement if they purposely want 
it. If we provide it, then where should it be written?

--

___
Python tracker 

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Serhiy Storchaka

On 18.12.15 08:51, Chris Angelico wrote:

On Fri, Dec 18, 2015 at 5:36 PM, Terry Reedy  wrote:

Last I knew, Guido still wanted stdlib files to be all-ascii, especially
possibly in special cases. There is no good reason I can think of for there
to be an invisible non-ascii space in a comment.  It strikes me as most
likely an accident (typo) that should be fixed.  I suspect the same of most
of the following.  Perhaps you should file an issue (and patch?) on the
tracker.


You're probably right on that one. Here's others - and the script I
used to find them.

import os
for root, dirs, files in os.walk("."):
 if "test" in root: continue
 for fn in files:
 if not fn.endswith(".py"): continue
 if "test" in fn: continue
 with open(os.path.join(root,fn),"rb") as f:
 for l,line in enumerate(f):
 try:
 line.decode("ascii")
 continue # Ignore the ASCII lines
 except UnicodeDecodeError:
 line = line.rstrip(b"\n")
 try: line = line.decode("UTF-8")
 except UnicodeDecodeError: line = repr(line) # If
it's not UTF-8 either, show it as b'...'
 print("%s:%d: %s" % (fn,l,line))


shlex.py:37: self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
shlex.py:38:'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
functools.py:7: # and Łukasz Langa .
heapq.py:34: [explanation by François Pinard]
getopt.py:21: # Peter Åstrand  added gnu_getopt().
sre_compile.py:26: (0x69, 0x131), # iı
sre_compile.py:28: (0x73, 0x17f), # sſ
sre_compile.py:30: (0xb5, 0x3bc), # µμ
sre_compile.py:32: (0x345, 0x3b9, 0x1fbe), # \u0345ιι
sre_compile.py:34: (0x390, 0x1fd3), # ΐΐ
sre_compile.py:36: (0x3b0, 0x1fe3), # ΰΰ
sre_compile.py:38: (0x3b2, 0x3d0), # βϐ
sre_compile.py:40: (0x3b5, 0x3f5), # εϵ
sre_compile.py:42: (0x3b8, 0x3d1), # θϑ
sre_compile.py:44: (0x3ba, 0x3f0), # κϰ
sre_compile.py:46: (0x3c0, 0x3d6), # πϖ
sre_compile.py:48: (0x3c1, 0x3f1), # ρϱ
sre_compile.py:50: (0x3c2, 0x3c3), # ςσ
sre_compile.py:52: (0x3c6, 0x3d5), # φϕ
sre_compile.py:54: (0x1e61, 0x1e9b), # ṡẛ
sre_compile.py:56: (0xfb05, 0xfb06), # ſtst
punycode.py:2: Written by Martin v. Löwis.
koi8_t.py:2: # http://ru.wikipedia.org/wiki/КОИ-8
__init__.py:0: # Copyright (C) 2005 Martin v. Löwis
client.py:737: a Date representing the file’s last-modified time, a
client.py:739: containing a guess at the file’s type. See also the
bdist_msi.py:0: # Copyright (C) 2005, 2006 Martin von Löwis
connection.py:399: # Issue # 20540: concatenate before
sending, to avoid delays due
message.py:531:filename=('utf-8', '', Fußballer.ppt'))
message.py:533:filename='Fußballer.ppt'))
request.py:181: * geturl() — return the URL of the resource
retrieved, commonly used to
request.py:184: * info() — return the meta-information of the
page, such as headers, in the
request.py:188: * getcode() – return the HTTP status code of the
response.  Raises URLError
dbapi2.py:2: # Copyright (C) 2004-2005 Gerhard Häring 
__init__.py:2: # Copyright (C) 2005 Gerhard Häring 

They're nearly all comments. A few string literals.

I would be inclined to ASCIIfy the apostrophes, dashes, and the
connection.py space that started this thread. People's names, URLs,
and demonstrative characters I'm more inclined to leave. Agreed?


Agreed. Please open an issue.

Using non-ASCII apostrophes and like in docstrings may be considered a bug.

--
https://mail.python.org/mailman/listinfo/python-list


[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2015-12-17 Thread Robin Roth

Robin Roth added the comment:

any comments/updates on merging this?

--

___
Python tracker 

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



[issue25893] Second variable DWORD reqdSize in getpythonregpath is initialized but not used

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25892] PyObject *exc in encode_code_page_strict is initialized but not used

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger

___
Python tracker 

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Terry Reedy

On 12/17/2015 6:18 PM, Chris Angelico wrote:

On Fri, Dec 18, 2015 at 10:05 AM, Mark Lawrence  wrote:

The culprit character is hidden between "Issue #" and "20540" at line 400 of
C:\Python35\Lib\multiprocessing\connection.py.
https://bugs.python.org/issue20540 and
https://hg.python.org/cpython/rev/125c24f47f3c refers.

I'm asking as I've just spent 30 minutes tracking down why my debug code
would bomb when running on 3.5, but not 2.7 or 3.2 through 3.4.


I'm curious as to why this character should bomb your code at all -
it's in a comment. Is it that your program was expecting ASCII, or is
it something about that particular character?

Here's a quick listing of the CPython standard library files that aren't ASCII:


Last I knew, Guido still wanted stdlib files to be all-ascii, especially 
possibly in special cases. There is no good reason I can think of for 
there to be an invisible non-ascii space in a comment.  It strikes me as 
most likely an accident (typo) that should be fixed.  I suspect the same 
of most of the following.  Perhaps you should file an issue (and patch?) 
on the tracker.



rosuav@sikorsky:~/cpython/Lib$ find -name \*.py -not -wholename
\*test\* -exec file {} \;|grep UTF-8
./encodings/punycode.py: Python script, UTF-8 Unicode text executable
./encodings/koi8_t.py: Python script, UTF-8 Unicode text executable
./msilib/__init__.py: Python script, UTF-8 Unicode text executable
./shlex.py: Python script, UTF-8 Unicode text executable
./http/client.py: Python script, UTF-8 Unicode text executable
./distutils/command/bdist_msi.py: Python script, UTF-8 Unicode text executable
./multiprocessing/connection.py: Python script, UTF-8 Unicode text executable
./functools.py: Python script, UTF-8 Unicode text executable
./heapq.py: Python script, UTF-8 Unicode text executable
./email/message.py: Python script, UTF-8 Unicode text executable
./getopt.py: Python script, UTF-8 Unicode text executable
./urllib/request.py: Python script, UTF-8 Unicode text executable
./sre_compile.py: Python script, UTF-8 Unicode text executable
./sqlite3/dbapi2.py: Python script, UTF-8 Unicode text executable
./sqlite3/__init__.py: Python script, UTF-8 Unicode text executable

Does your program bomb on any of these?

ChrisA




--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Chris Angelico
On Fri, Dec 18, 2015 at 6:12 PM, Serhiy Storchaka  wrote:
> Agreed. Please open an issue.
>
> Using non-ASCII apostrophes and like in docstrings may be considered a bug.

http://bugs.python.org/issue25899

Also noticed this. Is this a markup error?

Lib/urllib/request.py:190:
Note that *None& may be returned if no handler handles the request (though
the default installed global OpenerDirector uses UnknownHandler to ensure
this never happens).

It looks fine on the web:
https://docs.python.org/3/library/urllib.request.html

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25893] Second variable DWORD reqdSize in getpythonregpath is initialized but not used

2015-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12ca4a3695f9 by Serhiy Storchaka in branch '3.5':
Issue #25893: Removed unused variable reqdSize.
https://hg.python.org/cpython/rev/12ca4a3695f9

New changeset b72736cfc904 by Serhiy Storchaka in branch 'default':
Issue #25893: Removed unused variable reqdSize.
https://hg.python.org/cpython/rev/b72736cfc904

--
nosy: +python-dev

___
Python tracker 

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



[issue19587] Remove empty tests in test_bytes.FixedStringTest

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Currently buffer_tests.py is used only for bytearray, and it looks that it 
duplicates string_tests.py. May be remove all duplicated tests and move the 
rest of tests (if any) just into test_bytes.py?

--

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Josh Rosenberg

Josh Rosenberg added the comment:

A utility like this seems like it would belong in `itertools`, not 
`collections`. It should also ideally avoid fully realizing the sequence so it 
could work with iterators/generators as well; PySequence_Fast will force 
creation of a `list`/`tuple` of the whole sequence when in practice, a `deque` 
with a maxlen could be used to only maintain the necessary window into the 
"haystack".

It would also help to have a pure Python implementation (and until you have 
one, it's probably overkill to write the C accelerator) for other Python 
distributions, and to serve as a baseline for comparison to see if a C 
accelerator is justified.  Something like this might be a decent point of 
comparison:

def has_subsequence(it, searchseq, *, all=all, map=map, eq=operator.eq):
searchseq = tuple(searchseq)
if not searchseq:
return True  # Empty sequence in everything
window = collections.deque(itertools.islice(it, len(searchseq)-1), 
len(searchseq))
for x in it:
window.append(x)
if all(map(eq, window, searchseq)):
return True
return False

--
nosy: +josh.r

___
Python tracker 

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



Re: cannot open file with non-ASCII filename

2015-12-17 Thread Terry Reedy

On 12/18/2015 12:12 AM, bearmingo wrote:

Usually I put
#!-*-coding=utf-8-*-
at each py file.
It's ok to open file in local system.


That declaration only applies to the content of the file, not its name 
on the filesystem.



--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-17 Thread Swati Jaiswal

Swati Jaiswal added the comment:

@Andrew Barnert,
sorry, I didn't get your previous messages so please ignore the last message i 
sent. I got your point i.e. We just need to provide the TypeError in the 
Mapping. And the work around is never implemented.
Should I go for the patch with it?

--

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch LGTM (but I prefer reordering solution).

--
stage: patch review -> commit review
type:  -> behavior
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue25891] Stray variable meth_idx in enable_symlink

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25889] Find_BOM accepts a char*, but is passed an unsigned char*; and related usage

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25890] PyObject *po in _listdir_windows_no_opendir is initialized but not used

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Chris Angelico
On Fri, Dec 18, 2015 at 6:12 PM, Serhiy Storchaka  wrote:
> Agreed. Please open an issue.
>
> Using non-ASCII apostrophes and like in docstrings may be considered a bug.

http://bugs.python.org/issue25899

Also noticed this. Is this a markup error?

Lib/urllib/request.py:190:
Note that *None& may be returned if no handler handles the request (though
the default installed global OpenerDirector uses UnknownHandler to ensure
this never happens).

It looks fine on the web:
https://docs.python.org/3/library/urllib.request.html

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Chris Angelico
On Fri, Dec 18, 2015 at 5:36 PM, Terry Reedy  wrote:
> Last I knew, Guido still wanted stdlib files to be all-ascii, especially
> possibly in special cases. There is no good reason I can think of for there
> to be an invisible non-ascii space in a comment.  It strikes me as most
> likely an accident (typo) that should be fixed.  I suspect the same of most
> of the following.  Perhaps you should file an issue (and patch?) on the
> tracker.

You're probably right on that one. Here's others - and the script I
used to find them.

import os
for root, dirs, files in os.walk("."):
if "test" in root: continue
for fn in files:
if not fn.endswith(".py"): continue
if "test" in fn: continue
with open(os.path.join(root,fn),"rb") as f:
for l,line in enumerate(f):
try:
line.decode("ascii")
continue # Ignore the ASCII lines
except UnicodeDecodeError:
line = line.rstrip(b"\n")
try: line = line.decode("UTF-8")
except UnicodeDecodeError: line = repr(line) # If
it's not UTF-8 either, show it as b'...'
print("%s:%d: %s" % (fn,l,line))


shlex.py:37: self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
shlex.py:38:'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
functools.py:7: # and Łukasz Langa .
heapq.py:34: [explanation by François Pinard]
getopt.py:21: # Peter Åstrand  added gnu_getopt().
sre_compile.py:26: (0x69, 0x131), # iı
sre_compile.py:28: (0x73, 0x17f), # sſ
sre_compile.py:30: (0xb5, 0x3bc), # µμ
sre_compile.py:32: (0x345, 0x3b9, 0x1fbe), # \u0345ιι
sre_compile.py:34: (0x390, 0x1fd3), # ΐΐ
sre_compile.py:36: (0x3b0, 0x1fe3), # ΰΰ
sre_compile.py:38: (0x3b2, 0x3d0), # βϐ
sre_compile.py:40: (0x3b5, 0x3f5), # εϵ
sre_compile.py:42: (0x3b8, 0x3d1), # θϑ
sre_compile.py:44: (0x3ba, 0x3f0), # κϰ
sre_compile.py:46: (0x3c0, 0x3d6), # πϖ
sre_compile.py:48: (0x3c1, 0x3f1), # ρϱ
sre_compile.py:50: (0x3c2, 0x3c3), # ςσ
sre_compile.py:52: (0x3c6, 0x3d5), # φϕ
sre_compile.py:54: (0x1e61, 0x1e9b), # ṡẛ
sre_compile.py:56: (0xfb05, 0xfb06), # ſtst
punycode.py:2: Written by Martin v. Löwis.
koi8_t.py:2: # http://ru.wikipedia.org/wiki/КОИ-8
__init__.py:0: # Copyright (C) 2005 Martin v. Löwis
client.py:737: a Date representing the file’s last-modified time, a
client.py:739: containing a guess at the file’s type. See also the
bdist_msi.py:0: # Copyright (C) 2005, 2006 Martin von Löwis
connection.py:399: # Issue # 20540: concatenate before
sending, to avoid delays due
message.py:531:filename=('utf-8', '', Fußballer.ppt'))
message.py:533:filename='Fußballer.ppt'))
request.py:181: * geturl() — return the URL of the resource
retrieved, commonly used to
request.py:184: * info() — return the meta-information of the
page, such as headers, in the
request.py:188: * getcode() – return the HTTP status code of the
response.  Raises URLError
dbapi2.py:2: # Copyright (C) 2004-2005 Gerhard Häring 
__init__.py:2: # Copyright (C) 2005 Gerhard Häring 

They're nearly all comments. A few string literals.

I would be inclined to ASCIIfy the apostrophes, dashes, and the
connection.py space that started this thread. People's names, URLs,
and demonstrative characters I'm more inclined to leave. Agreed?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25899] Unnecessary non-ASCII characters in standard library

2015-12-17 Thread Chris Angelico

New submission from Chris Angelico:

Discussion on python-list led to searching out unnecessary non-ASCII in the 
stdlib. While there are places where non-ASCII text is good and worthwhile (eg 
in comments identifying people such as Łukasz Langa, Peter Åstrand, Martin v. 
Löwis, and Gerhard Häring, or code specifically demonstrating or implementing 
non-ASCII behaviour), there are some instances which are unnecessary. Attached 
is a patch converting apostrophes, dashes, and one space.

--
components: Library (Lib)
files: asciify.diff
keywords: patch
messages: 256647
nosy: Rosuav
priority: normal
severity: normal
status: open
title: Unnecessary non-ASCII characters in standard library
versions: Python 3.6
Added file: http://bugs.python.org/file41344/asciify.diff

___
Python tracker 

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



[issue25608] ascynio readexactly() should raise ValueError if passed length <= 0 in argument

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

This issue is now resolved (see https://github.com/python/asyncio/pull/298)

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



[issue25683] __context__ for yields inside except clause

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

I now don't think this is a bug.

In the above example, SubError is instantiated outside of `main` generator.  
It's also thrown *into* `main` from the *outside* scope.  And __context__ 
should be set for exceptions that were originated by the code that was handling 
other exceptions.

Closing this issue with 'not a bug'.

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



Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Mark Lawrence
The culprit character is hidden between "Issue #" and "20540" at line 
400 of C:\Python35\Lib\multiprocessing\connection.py. 
https://bugs.python.org/issue20540 and 
https://hg.python.org/cpython/rev/125c24f47f3c refers.


I'm asking as I've just spent 30 minutes tracking down why my debug code 
would bomb when running on 3.5, but not 2.7 or 3.2 through 3.4.


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

> The documentation should probably also be updated. It has a list of supported 
> schemes. 

I agree. Gergely, do you want to update your patch?

> I imagine this would have to be taken as a new feature for 3.6+, rather than 
> a bug fix.

Since urlparse can parse wss:// addresses, *but* urljoin can't work with them, 
I think we can classify this as a bug fix patch.

--

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread G

G added the comment:

Thank you very much

Sent from George Moreno's iPhone

> On Dec 17, 2015, at 14:48, SilentGhost  wrote:
> 
> 
> Changes by SilentGhost :
> 
> 
> --
> components: +IDLE, Macintosh, Tkinter
> nosy: +gpolo, ned.deily, ronaldoussoren, serhiy.storchaka
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Chris Angelico
On Fri, Dec 18, 2015 at 11:02 AM, Mark Lawrence  wrote:
> A lot of it is down to Windows, as the actual complaint is:-
>
> six.print_(source)
>   File "C:\Python35\lib\encodings\cp1252.py", line 19, in encode
> return codecs.charmap_encode(input,self.errors,encoding_table)[0]
> UnicodeEncodeError: 'charmap' codec can't encode character '\u202f' in
> position 407: character maps to 
>
> And as usual I've answered my own question.  The cp1252 shows even if my
> console is set to 65001, *BUT* I'm piping the output to file as it's so much
> faster.  Having taken five minutes to run the code without the pipe
> everything runs to completion.
>
> I suppose the original question still holds, but I for one certainly won't
> be losing any sleep over it.  Talking of which, good night all :)

Oh. Windows.

Suddenly it all makes sense.

Python source code is (as of 3.0) Unicode text, and is assumed to be
stored as UTF-8 if not otherwise specified. If Windows can't handle
that, too bad for Windows.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25612] nested try..excepts don't work correctly for generators

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

I closed issue #25683 as "not a bug".  So it's just this issue that we need to 
fix.

Anyone wants to review the patch? :)  Since the code involved here is quite 
complex, I don't want to commit this patch without a thorough review.

--

___
Python tracker 

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Ian Kelly
On Thu, Dec 17, 2015 at 4:05 PM, Mark Lawrence  wrote:
> The culprit character is hidden between "Issue #" and "20540" at line 400 of
> C:\Python35\Lib\multiprocessing\connection.py.
> https://bugs.python.org/issue20540 and
> https://hg.python.org/cpython/rev/125c24f47f3c refers.
>
> I'm asking as I've just spent 30 minutes tracking down why my debug code
> would bomb when running on 3.5, but not 2.7 or 3.2 through 3.4.

Probably not, but that's inside a comment, so whether the character is
U+202F or U+0020 shouldn't make any difference in how the code runs.
That seems like a Unicode bug if it does.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25580] async and await missing from token list

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Ah, I see that issue25580_2.diff does exactly what I proposed.  I'm committing 
it.

--
keywords: +easy

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread G

G added the comment:

Thank you very much. 

Sent from George Moreno's iPhone

> On Dec 17, 2015, at 15:12, Ned Deily  wrote:
> 
> 
> Ned Deily added the comment:
> 
> Please read the information at the web page linked to in that message you 
> have been seeing:  https://www.python.org/download/mac/tcltk/.  As explained 
> there, the current Pythons downloaded from python.org for OS X dynamically 
> link with Tcl/Tk 8.5.x, not 8.6.x.  You should download and install the 
> latest ActiveTcl 8.5 version for OS X which is currently 8.5.18.0 from 
> http://www.activestate.com/activetcl/downloads. You don't need to uninstall 
> the 8.6.5.1 version that you've already installed; it will be ignored.
> 
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Mark Lawrence

On 17/12/2015 23:18, Chris Angelico wrote:

On Fri, Dec 18, 2015 at 10:05 AM, Mark Lawrence  wrote:

The culprit character is hidden between "Issue #" and "20540" at line 400 of
C:\Python35\Lib\multiprocessing\connection.py.
https://bugs.python.org/issue20540 and
https://hg.python.org/cpython/rev/125c24f47f3c refers.

I'm asking as I've just spent 30 minutes tracking down why my debug code
would bomb when running on 3.5, but not 2.7 or 3.2 through 3.4.


I'm curious as to why this character should bomb your code at all -
it's in a comment. Is it that your program was expecting ASCII, or is
it something about that particular character?



I'm playing with ASTs and using the stdlib as test data.  I was trying 
to avoid going down this particular route, but...


A lot of it is down to Windows, as the actual complaint is:-

six.print_(source)
  File "C:\Python35\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u202f' in 
position 407: character maps to 


And as usual I've answered my own question.  The cp1252 shows even if my 
console is set to 65001, *BUT* I'm piping the output to file as it's so 
much faster.  Having taken five minutes to run the code without the pipe 
everything runs to completion.


I suppose the original question still holds, but I for one certainly 
won't be losing any sleep over it.  Talking of which, good night all :)


--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

A new patch is attached.  Please review.

I decided to remove the fix for recursive __cause__.  Currently, `raise e from 
e` doesn't cause any problem, and if we fix the interpreter to raise an 
RuntimeError in such cases it will be a backwards incompatible change.  I don't 
see any point in introducing such a change in a bugfix Python release.  We can 
open a separate issue for 3.6 though.

Fixing __context__ in 3.5.2 is way more important, since the interpreter can 
actually infinitely loop itself in some places.  And since there is no syntax 
for setting __context__ manually (as opposed to __cause__ via raise .. from), I 
suspect that there will be much less people affected by this fix.

--
stage:  -> patch review
Added file: http://bugs.python.org/file41341/Issue25782_4.patch

___
Python tracker 

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



[issue25272] asyncio tests are getting noisy

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

I think I've fixed all of these:

https://github.com/python/asyncio/commit/cd4fdbb9ccd7c41a4e7c6b416bb2481ab0e21e1c
https://github.com/python/asyncio/commit/1365ac3a37836c6ec50138df8d64a87cdd0ac494
https://github.com/python/asyncio/commit/ae30b2b4244f1526d422500a1313c0c3dfd72dfe
https://github.com/python/asyncio/commit/5672730e26c555485447694e576c98d2a49341b9

I also updated asyncio/runtests.py to print out all warnings:

https://github.com/python/asyncio/commit/f25127c24aa8ca94960b5c012eb72afcef14403a

Closing this issue.

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



Re: Should stdlib files contain 'narrow non breaking space' U+202F?

2015-12-17 Thread Chris Angelico
On Fri, Dec 18, 2015 at 10:05 AM, Mark Lawrence  wrote:
> The culprit character is hidden between "Issue #" and "20540" at line 400 of
> C:\Python35\Lib\multiprocessing\connection.py.
> https://bugs.python.org/issue20540 and
> https://hg.python.org/cpython/rev/125c24f47f3c refers.
>
> I'm asking as I've just spent 30 minutes tracking down why my debug code
> would bomb when running on 3.5, but not 2.7 or 3.2 through 3.4.

I'm curious as to why this character should bomb your code at all -
it's in a comment. Is it that your program was expecting ASCII, or is
it something about that particular character?

Here's a quick listing of the CPython standard library files that aren't ASCII:

rosuav@sikorsky:~/cpython/Lib$ find -name \*.py -not -wholename
\*test\* -exec file {} \;|grep UTF-8
./encodings/punycode.py: Python script, UTF-8 Unicode text executable
./encodings/koi8_t.py: Python script, UTF-8 Unicode text executable
./msilib/__init__.py: Python script, UTF-8 Unicode text executable
./shlex.py: Python script, UTF-8 Unicode text executable
./http/client.py: Python script, UTF-8 Unicode text executable
./distutils/command/bdist_msi.py: Python script, UTF-8 Unicode text executable
./multiprocessing/connection.py: Python script, UTF-8 Unicode text executable
./functools.py: Python script, UTF-8 Unicode text executable
./heapq.py: Python script, UTF-8 Unicode text executable
./email/message.py: Python script, UTF-8 Unicode text executable
./getopt.py: Python script, UTF-8 Unicode text executable
./urllib/request.py: Python script, UTF-8 Unicode text executable
./sre_compile.py: Python script, UTF-8 Unicode text executable
./sqlite3/dbapi2.py: Python script, UTF-8 Unicode text executable
./sqlite3/__init__.py: Python script, UTF-8 Unicode text executable

Does your program bomb on any of these?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25580] async and await missing from token list

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

> My only background here is via the tokenize module, which seems to currently 
> behave as described in 
> : async and await 
> are either NAME tokens (like ordinary identifiers and other reserved 
> keywords) outside a coroutine definition, but they become special ASYNC and 
> AWAIT tokens inside a coroutine.


Exactly.  And in 3.7 they will be NAME tokens in any context.  That's why I'm 
reluctant to document them atm.

--

___
Python tracker 

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



[issue25580] async and await missing from token list

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for the patch!

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

___
Python tracker 

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



[issue25580] async and await missing from token list

2015-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa79b2a5b2e1 by Yury Selivanov in branch '3.5':
docs: Document ASYNC/AWAIT tokens (issue #25580)
https://hg.python.org/cpython/rev/aa79b2a5b2e1

--
nosy: +python-dev

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Martin, could you please rebase your patch on top of recent cpython default 
branch, so that a 'review' link appears?

--

___
Python tracker 

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



[issue21815] imaplib truncates some untagged responses

2015-12-17 Thread Maciej Szulik

Maciej Szulik added the comment:

Lita if you still have problems or want to ask questions reach out to me on 
IRC, I'm soltysh on freenode.

--

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

3.4 buildbot is fixed now

--
status: open -> closed

___
Python tracker 

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



[issue25878] CPython on Windows builds with /W3, not /W4

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Alexander for your work. I agree that we have to use maximal warning 
level available in the compiler, and specially disable those warning categories 
that produces mainly false positives with CPython sources. See also similar 
issue23545 about GCC.

And of course I concur with Martin that we have first fix all non-false 
warnings before increase warning level (as we have done for GCC), and it would 
be better to do this in separate issues.

--
components: +Build
nosy: +serhiy.storchaka
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.6

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Martin.

--

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

The altchars 2 char limit is an assertion.  That's a bug that should be dealt 
with separately.  Either it should be turned into an error, or it should be 
dropped to match the docs.  Probably the latter, since it is documented as OK 
and it might break code that is currently working in -O mode or on python2.

--

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

Fixed the spurious 'u'.

--
Added file: http://bugs.python.org/file41343/issue-01753718.patch

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

"or on python2" should be "or ported from python2".

Also note that Nick's commit message specifically mentions a test for 
multi-dimensional input, so the module does indeed conform to the current 
bytes-like object definition in that regard.

--

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Emanuel Barry

Emanuel Barry added the comment:

Reviewed the Python code (unlike what my email said, it doesn't LGTM; I'm tired 
and just forgot). I checked the C code for the obvious pitfalls (didn't spot 
any), but it will require someone else better than me to look at it.

--
nosy: +ebarry
stage:  -> patch review

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Марк Коренберг

Марк Коренберг added the comment:

Really optimal search algorithm should be something like that:

https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm

--
nosy: +mmarkk

___
Python tracker 

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



Re: How does one distribute Tkinter or Qt GUI apps Developed in Python

2015-12-17 Thread Michiel Overtoom

> On 2015-12-17, at 01:03, Bruce Whealton  
> wrote:
> 
> I would want to package in some way so that when launched, it installs 
> whatever is needed on the end user's computer. How is this done? 

You might want to watch https://www.youtube.com/watch?v=wsczq6j3_bA (Brandon 
Rhodes: The Day of the EXE Is Upon Us - PyCon 2014). 

"It was once quite painful to build your Python app as a single .exe file. 
Support forums filled with lamentations as users struggled with primitive 
tools. But today, two separate tools exist for compiling your Python to real 
machine language! Come learn about how one of the biggest problems in 
commercial and enterprise software has now been solved and how you can benefit 
from this achievement.

Slides can be found at: https://speakerdeck.com/pycon2014 and 
https://github.com/PyCon/2014-slides;

Greetings,


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread Balázs Regényi

Balázs Regényi added the comment:

paul.j3, thx the the patch, it is perfect!!!

--

___
Python tracker 

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



[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread Balázs Regényi

Balázs Regényi added the comment:

Unfortunately the problem consists in case of normal sub-group too :(.

If you complete my previous example code with the next code, then the problem 
can be seen:

sub_group = global_group.add_argument_group()
sub_group.add_argument("--sub-arg1")
sub_group.add_argument("--sub-arg2")

Part of unexpected output:

optional arguments:
  -h, --helpshow this help message and exit
  --sub-arg1 SUB_ARG1
  --sub-arg2 SUB_ARG2
  --child-arg1 CHILD_ARG1
  --child-arg2 CHILD_ARG2



Is there a patch for it too? :)

--

___
Python tracker 

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



Re: Why my image is in bad quality ?

2015-12-17 Thread fsn761304
On Thursday, December 17, 2015 at 5:27:28 AM UTC+4, Nobody wrote:
> On Wed, 16 Dec 2015 06:04:37 -0800, fsn761304 wrote:
> 
> > pixbufObj = Gdk.pixbuf_get_from_window(window, x, y, width, height) ...
> > image = Image.frombuffer("RGB", (width, height),
> >  pixbufObj.get_pixels(), 'raw', 'RGB', 0, 1)
> 
> The second-to-last argument should probably be Gdk.pixbuf_get_rowstride()
> rather than 0.

No, this:
image = Image.frombuffer("RGB", (width, height), 
 pixbufObj.get_pixels(), 'raw', 'RGB', 
Gdk.pixbuf_get_rowstride(), 1)

doesn't work:

AttributeError: 'gi.repository.Gdk' object has no attribute 
'pixbuf_get_rowstride'
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Sebastian Linke

New submission from Sebastian Linke:

With the attached patch I propose to add a new function to the "collections" 
module. It is meant to be used for determining whether a given subsequence is 
part of a particular sequence (with respect to the ordering of the 
subsequence). 

Doing this in pure Python (using the CPython interpreter) is relatively slow. 
So I did the implementation in C.

--
components: Library (Lib)
files: has_subsequence.patch
keywords: patch
messages: 256633
nosy: seblin
priority: normal
severity: normal
status: open
title: Check for subsequence inside a sequence
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41342/has_subsequence.patch

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +rhettinger

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

The intent of the term "bytes-like object" it to make it possible to use it in 
documentation in the way I have used it here.  That the buffer has a len is 
clearly discussed in the Buffer Protocol documentation, but of course that's 
only talking about the C level API.  Perhaps what is needed is an addition to 
the bytes-like object description that clarifies that a bytes-like object is a 
Sequence that supports the buffer protocol?  (So: "A Sequence object that 
supports the Buffer Protocol and...")  Do we also need to clarify that the item 
size must be one byte?  That would seem to me to be implicit in the name.

I don't know if what ctypes produces is a bytes-like object in this sense, 
since I don't understand ctypes very well, but it sounds like it isn't.  Trying 
to wrap it in a memoryview gives an error ('unsupported format 

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



[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

Yes now I understand. If a subtest fails, there is no status update (not even a 
newline in verbose mode), and each subtest skip triggers a separate status 
update.

My gut feeling is that any subtest failure should be counted as the whole test 
failing. I’m not sure how the failure vs error cases should be handled. Maybe 
error should trump failure.

Judging by , Antoine intended for 
SkipTest to skip subtests. But I’m not sure that be reported as the whole test 
being skipped.

--

___
Python tracker 

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



[issue25836] Documentation of MAKE_FUNCTION/MAKE_CLOSURE_EXTENDED_ARG is misleading

2015-12-17 Thread Russell Keith-Magee

Russell Keith-Magee added the comment:

It turns out I wasn't completely correct. As per my second point, the 
interpretation of annotations needs be clarified, but my first point about 
default_args including the annotation count is incorrect. 

My error was made because of the documentation for EXTENDED_ARG. The current 
text implies that you need to combine the argument value of the EXTENDED_ARG 
opcode with the argument value for the previous opcode. However if you're using 
dis.Bytecode() to extract bytecodes, that composition is done for you - you can 
effectively ignore the EXTENDED_ARG opcode.

--
title: Documentation of MAKE_FUNCTION is still incorrect -> Documentation of 
MAKE_FUNCTION/MAKE_CLOSURE_EXTENDED_ARG is misleading

___
Python tracker 

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



cannot open file with non-ASCII filename

2015-12-17 Thread bearmingo
Usually I put 
#!-*-coding=utf-8-*-
at each py file.
It's ok to open file in local system.
-- 
https://mail.python.org/mailman/listinfo/python-list