qutebrowser v0.1 released

2014-12-14 Thread me
Hi, Exactly a year after the first commit[1] I'm proud to announce qutebrowser v0.1 has been released! qutebrowser is a keyboard-driven, vim-like browser based on Python3, PyQt5 and QtWebKit - similiar to projects like Vimperator/Pentadactyl, dwb, luakit, and others. More information about

SQLObject 1.7.2

2014-12-14 Thread Oleg Broytman
Hello! I'm pleased to announce version 1.7.2, a bugfix release of branch 1.7 of SQLObject. What's new in SQLObject === * Fix a bug: zero-pad microseconds on the right, not on the left; 0.0835 seconds means 83500 microseconds. For a more complete list, please see the

which is the right file path format in python3.4 ?

2014-12-14 Thread sir
My system is :win7+python3.4 . I want to write a new file named names.txt in disk f: ff=open(rF:\names.txt,w) Traceback (most recent call last): File stdin, line 1, in module OSError: [Errno 22] Invalid argument: 'F:\\names.txt' ff=open(rF:/names.txt,w) Traceback (most recent call last):

Re: which is the right file path format in python3.4 ?

2014-12-14 Thread Irmen de Jong
On 14-12-2014 10:05, sir wrote: My system is :win7+python3.4 . I want to write a new file named names.txt in disk f: ff=open(rF:\names.txt,w) Traceback (most recent call last): File stdin, line 1, in module OSError: [Errno 22] Invalid argument: 'F:\\names.txt'

Re: which is the right file path format in python3.4 ?

2014-12-14 Thread Steven D'Aprano
sir wrote: My system is :win7+python3.4 . I want to write a new file named names.txt in disk f: ff=open(rF:\names.txt,w) Traceback (most recent call last): File stdin, line 1, in module OSError: [Errno 22] Invalid argument: 'F:\\names.txt' Are you sure that you have an F drive?

Re: which is the right file path format in python3.4 ?

2014-12-14 Thread Chris Angelico
On Sun, Dec 14, 2014 at 10:03 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Run this code and show us what it prints: import os print(os.stat(F:\\) print(os.access(F:\\, os.O_RDWR)) (With an extra close parenthesis on the first print call) I'm suspicious here that drive F

Re: which is the right file path format in python3.4 ?

2014-12-14 Thread Steven D'Aprano
Chris Angelico wrote: On Sun, Dec 14, 2014 at 10:03 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Run this code and show us what it prints: import os print(os.stat(F:\\) print(os.access(F:\\, os.O_RDWR)) (With an extra close parenthesis on the first print call)

Re: which is the right file path format in python3.4 ?

2014-12-14 Thread Chris Angelico
On Sun, Dec 14, 2014 at 10:51 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't have access to a Windows box to check, otherwise I would do it myself. What happens if you specify a non-existent drive letter? open(Q:\\xxx) # Assuming you don't have a drive Q. Hmm. I just

how to delete my file if exits in the remote server with paramiko?

2014-12-14 Thread ????????
I want to delete the file names.txt if it exits in /home/names.txt in my remote vps server. import paramiko host = vps ip port = 22 transport = paramiko.Transport((host, port)) password = key username = root transport.connect(username = username, password = password) sftp =

Re: how to delete my file if exits in the remote server with paramiko?

2014-12-14 Thread Skip Montanaro
On Sun, Dec 14, 2014 at 6:49 AM, 水静流深 1248283...@qq.com wrote: Is there more elegant way to do the same work? Unlikely. You have two fairly simple bits of code in your example, one to connect to the remote server, the other to check for the file's existence and remove it. The only extra elegance

Re: numpy question (fairly basic, I think)

2014-12-14 Thread Albert-Jan Roskam
- Original Message - From: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info To: python-list@python.org Cc: Sent: Sunday, December 14, 2014 12:52 AM Subject: Re: numpy question (fairly basic, I think) Albert-Jan Roskam wrote: Hi, I am new to numpy. I am reading

Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-14 Thread Simon Evans
Thanks Guys This book keeps swapping from the Python console to the Windows - without telling you, but it is the only book out there on 'Beautiful Soup' so I have got to put up with it. There's more problems with it, but I will start a new thread in regard of, I don't know if its related to

SQLObject 1.7.2

2014-12-14 Thread Oleg Broytman
Hello! I'm pleased to announce version 1.7.2, a bugfix release of branch 1.7 of SQLObject. What's new in SQLObject === * Fix a bug: zero-pad microseconds on the right, not on the left; 0.0835 seconds means 83500 microseconds. For a more complete list, please see the

How to import sqlite3 in my python3.4 successfully?

2014-12-14 Thread sir
There are two python version in my debian7, one is python2.7 the system default version, the other is python3.4 which compiled to install this way. | apt-get update apt-get upgrade apt-get install build-essential wget http://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz

Re: how to delete my file if exits in the remote server with paramiko?

2014-12-14 Thread Roy Smith
In article mailman.16944.1418561416.18130.python-l...@python.org, 1248283...@qq.com wrote: I want to delete the file names.txt if it exits in /home/names.txt in my remote vps server. import paramiko host = vps ip port = 22 transport = paramiko.Transport((host, port)) password = key

Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Simon Evans
Dear Python programmers, Having input the line of code in text: cd Soup to the Windows console, and having put the file 'EcologicalPyramid.html' into the Directory 'Soup', on the C drive, in accordance with instructions I input the following code to the Python console, as given on page 30 of

Classes - converting external function to class's method.

2014-12-14 Thread Ivan Evstegneev
Hello Everyone, I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: class rec: pass Step 2 - adding some attributes: rec.name = 'Bob' rec.age = 40 Step 3 - Creating an instance:

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Ned Batchelder
On 12/14/14 11:15 AM, Simon Evans wrote: Dear Python programmers, Having input the line of code in text: cd Soup to the Windows console, and having put the file 'EcologicalPyramid.html' into the Directory 'Soup', on the C drive, in accordance with instructions I input the following code to the

Re: How to import sqlite3 in my python3.4 successfully?

2014-12-14 Thread Albert-Jan Roskam
--- On Sun, Dec 14, 2014 4:06 PM CET sir wrote: There are two python version in my debian7, one is python2.7 the system default version, the other is python3.4 which compiled to install this way. | apt-get update apt-get upgrade apt-get install build-essential

How to use the .isalpha() function correctly

2014-12-14 Thread Luke Tomaneng
Here a very small program that I wrote for Codecademy. When I finished, Codecademy acted like it was correct, but testing of this code revealed otherwise. -- print 'Welcome to the Pig Latin Translator!' # Start coding here! raw_input(Enter a

Re: Run Programming ?????

2014-12-14 Thread Luke Tomaneng
On Friday, December 12, 2014 4:40:01 AM UTC-8, Delgado Motto wrote: I travel alot, if not just interested in things of pocketable portability, and was curious if you can tell me if Python can be LEARNED from beginner on an IOS device ( with interest of being able to test my code, possibly

Re: encoding name mappings in codecs.py with email/charset.py

2014-12-14 Thread gst
Le vendredi 12 décembre 2014 04:21:14 UTC-5, Stefanos Karasavvidis a écrit : I've hit a wall with mailman which seems to be caused by pyhon's character encoding names. I've narrowed the problem down to the email/charset.py file. Basically the following happens: Hi, it's all in the

Re: How to use the .isalpha() function correctly

2014-12-14 Thread Chris Warrick
On Sun, Dec 14, 2014 at 6:16 PM, Luke Tomaneng luketoman...@gmail.com wrote: Here a very small program that I wrote for Codecademy. When I finished, Codecademy acted like it was correct, but testing of this code revealed otherwise. -- print

Re: Run Programming ?????

2014-12-14 Thread Luke Tomaneng
On Sunday, December 14, 2014 9:24:54 AM UTC-8, Luke Tomaneng wrote: On Friday, December 12, 2014 4:40:01 AM UTC-8, Delgado Motto wrote: I travel alot, if not just interested in things of pocketable portability, and was curious if you can tell me if Python can be LEARNED from beginner on

Re: Classes - converting external function to class's method.

2014-12-14 Thread Steven D'Aprano
Ivan Evstegneev wrote: Hello Everyone, I have stuck a bit with this example(took this one from the book). The example you are working on (adding external functions as methods) is actually a bit more complicated than it seems, as you have discovered. You have this: class rec: pass rec.name =

Re: How to use the .isalpha() function correctly

2014-12-14 Thread Luke Tomaneng
On Sunday, December 14, 2014 9:27:14 AM UTC-8, Chris Warrick wrote: On Sun, Dec 14, 2014 at 6:16 PM, Luke Tomaneng luketoman...@gmail.com wrote: Here a very small program that I wrote for Codecademy. When I finished, Codecademy acted like it was correct, but testing of this code revealed

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Simon Evans
I had another attempt at inputting the code perhaps with the right indentation, I still get an error return, but not one that indicates that the code has not been read, as you suggested. re:- Python 2.7.6 (default,

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Jussi Piitulainen
Simon Evans writes: I had another attempt at inputting the code perhaps with the right indentation, I still get an error return, but not one that indicates that the code has not been read, as you suggested. re:- -- Python

Re: encoding name mappings in codecs.py with email/charset.py

2014-12-14 Thread Stefanos Karasavvidis
thanks for replying gst. I've thought already of patching the Charset class, but hoped for a cleaner solution. This ALIASES dict has already all the iso names *with* a dash. So it must get striped somewhere else. sk On Sun, Dec 14, 2014 at 7:21 PM, gst g.sta...@gmail.com wrote: Le vendredi

Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-14 Thread Chris Angelico
On Mon, Dec 15, 2014 at 1:48 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: Thanks Guys This book keeps swapping from the Python console to the Windows - without telling you, but it is the only book out there on 'Beautiful Soup' so I have got to put up with it. There's more problems with

Re: encoding name mappings in codecs.py with email/charset.py

2014-12-14 Thread gst
Le dimanche 14 décembre 2014 14:10:22 UTC-5, Stefanos Karasavvidis a écrit : thanks for replying gst. I've thought already of patching the Charset class, but hoped for a cleaner solution. This ALIASES dict has already all the iso names *with* a dash. So it must get striped somewhere

PySchool.net, kickstarter campaign

2014-12-14 Thread Billy Earney
Greetings! For the past few months, I've been developing a website for educators and students to learn computer programming (ie, Python). My first project has been to create a basic programming environment entirely within a browser. Students can create, edit, load, save, and execute Python

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Billy Earney
It looks like the last line (producer_entries...) is not indented at the same extent as the previous line. Maybe this is causing the issue? On Sun, Dec 14, 2014 at 10:15 AM, Simon Evans musicalhack...@yahoo.co.uk wrote: Dear Python programmers, Having input the line of code in text: cd Soup

problem with six.moves intern importError

2014-12-14 Thread jean-michel richer
Hi, I am new to python and I am trying to use pycuda but get some error on the following script. My environement is : Python 2.7.6 libboost 1.54 gcc/g++ 4.8.2 CUDA 6.5 import pycuda.autoinit import pycuda.driver as drv import numpy from pycuda.compiler import

RE: Classes - converting external function to class's method.

2014-12-14 Thread Ivan Evstegneev
Dear Steven, I very appreciate your answer. You just explained a lot of background things and you did it in more explicit and simple way than it've appeared in the book. I also agree with you about the fact that there are some advanced topics spread within a book's text. It is sometimes hard to

Re: numpy question (fairly basic, I think)

2014-12-14 Thread Gregory Ewing
Albert-Jan Roskam wrote: I was trying to change the one-dim array into a two-dim array so I could easily retrieve columns. I now use a pandas DataFrame to do that. Numpy can do that, if I understand what you want correctly, but it requires an unintuitive trick. The trick is to index the array

Re: Classes - converting external function to class's method.

2014-12-14 Thread Thomas 'PointedEars' Lahn
Ivan Evstegneev wrote: I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: class rec: pass IMHO that is not actually creating a namespace; it is just declaring/defining an

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Simon Evans
Dear Jussi, and Billy I have changed the input in accordance with your advice, re: -- Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more

Re: PySchool.net, kickstarter campaign

2014-12-14 Thread Chris Angelico
On Mon, Dec 15, 2014 at 2:07 AM, Billy Earney billy.ear...@gmail.com wrote: Students can create, edit, load, save, and execute Python scripts directly in the browser. Importantly, these scripts are actually executed in the client - they are NOT being sent to the server for execution. That means

Re: PySchool.net, kickstarter campaign

2014-12-14 Thread Billy Earney
ChrisA, Yes, you are correct. The scripts get compiled to javascript and then executed in the browser. Like you say, there are limitations, but most of these focus around browser security issues, and on the plus side, these scripts do not get executed on the server side, so that helps reduce

Re: PySchool.net, kickstarter campaign

2014-12-14 Thread Chris Angelico
On Mon, Dec 15, 2014 at 10:41 AM, Billy Earney billy.ear...@gmail.com wrote: Yes, you are correct. The scripts get compiled to javascript and then executed in the browser. Like you say, there are limitations, but most of these focus around browser security issues, and on the plus side,

Re: Classes - converting external function to class's method.

2014-12-14 Thread Terry Reedy
On 12/14/2014 6:15 PM, Thomas 'PointedEars' Lahn wrote: Ivan Evstegneev wrote: I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: class rec: pass IMHO that is not actually

Re: Classes - converting external function to class's method.

2014-12-14 Thread Thomas 'PointedEars' Lahn
Terry Reedy wrote: On 12/14/2014 6:15 PM, Thomas 'PointedEars' Lahn wrote: Ivan Evstegneev wrote: I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: class rec: pass IMHO that

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Steven D'Aprano
Simon Evans wrote: Dear Jussi, and Billy I have changed the input in accordance with your advice, re: -- Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright,

Re: PySchool.net, kickstarter campaign

2014-12-14 Thread Billy Earney
Thanks.. I appreciate your contribution! On Sun, Dec 14, 2014 at 5:48 PM, Chris Angelico ros...@gmail.com wrote: On Mon, Dec 15, 2014 at 10:41 AM, Billy Earney billy.ear...@gmail.com wrote: Yes, you are correct. The scripts get compiled to javascript and then executed in the browser.

Re: Classes - converting external function to class's method.

2014-12-14 Thread Steven D'Aprano
Thomas 'PointedEars' Lahn wrote: Ivan Evstegneev wrote: I have stuck a bit with this example(took this one from the book). Here are a description steps of what I've done till now: Step 1 - creating an empty namespace: class rec: pass IMHO that is not actually creating a

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Chris Roy-Smith
On 15/12/14 10:21, Simon Evans wrote: Dear Jussi, and Billy I have changed the input in accordance with your advice, re: -- Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win here the user

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Chris Angelico
On Mon, Dec 15, 2014 at 1:32 PM, Chris Roy-Smith chris_roysm...@internode.on.net wrote: and here he uses a python 3.x print syntax which triggers the following error message On the contrary; parens around a single argument will work just fine in Py2 (they're simply redundant parentheses, in the

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Mark Lawrence
On 15/12/2014 02:32, Chris Roy-Smith wrote: On 15/12/14 10:21, Simon Evans wrote: Dear Jussi, and Billy I have changed the input in accordance with your advice, re: -- Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC

Re: How to import sqlite3 in my python3.4 successfully?

2014-12-14 Thread Thomas 'PointedEars' Lahn
sir wrote: ^^^ Please fix. There are two python version in my debian7, one is python2.7 the system default version, the other is python3.4 which compiled to install this way. | apt-get update apt-get upgrade apt-get install build-essential wget

Re: Python Script to convert firewall rules

2014-12-14 Thread Jason Friedman
Thank you very much. Appreciated ! But the first requirement was to convert format1 to format2 as below: set interface ethernet2/5 ip 10.17.10.1/24 (format 1) set interfaces ge-0/0/0 unit 0 family inet address 10.17.10.1/24 (format 2) (set, interface, ip) = (set, interfaces, family inet

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Michael Torrie
On 12/14/2014 07:47 PM, Mark Lawrence wrote: I didn't realise that Python was so smart. It can indicate a syntax error at the final 't' in print before it gets to the opening bracket that is required for the print function in Python 3 (and Python 2 if you're using from __future__ import

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Chris Angelico
On Mon, Dec 15, 2014 at 4:27 PM, Michael Torrie torr...@gmail.com wrote: On 12/14/2014 07:47 PM, Mark Lawrence wrote: I didn't realise that Python was so smart. It can indicate a syntax error at the final 't' in print before it gets to the opening bracket that is required for the print

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Michael Torrie
On 12/14/2014 10:32 PM, Chris Angelico wrote: Did you actually test that? Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32 Type copyright, credits or license() for more information. print(hello) hello Since print is a keyword when not imported from

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Zachary Ware
On Sun, Dec 14, 2014 at 11:38 PM, Michael Torrie torr...@gmail.com wrote: Guess the future import is only to make not having parens and error. Python 2.7.8+ (default, Nov 2 2014, 00:32:19) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information.

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2014-12-14 Thread Chris Angelico
On Mon, Dec 15, 2014 at 4:38 PM, Michael Torrie torr...@gmail.com wrote: Thought I had indirectly, since I've been using this print technique for the last few days. Good to know it works either way, though. Guess the future import is only to make not having parens and error. Yeah. I usually

Portable code: __import__ demands different string types between 2 and 3

2014-12-14 Thread Ben Finney
Howdy all, What should I do, in a world where all text literals are Unicode by default, to make ‘__import__’ work in both Python 2 and 3? I'm slowly learning about making Python code that will run under both Python 2 (version 2.6 or above) and Python 3 (version 3.2 or above). This entails, I

Re: problem with six.moves intern importError

2014-12-14 Thread dieter
jean-michel richer jean-michel.ric...@univ-angers.fr writes: Hi, I am new to python and I am trying to use pycuda but get some error on the following script. My environement is : Python 2.7.6 libboost 1.54 gcc/g++ 4.8.2 CUDA 6.5 ... from six.moves import range, zip, intern, input

Re: Portable code: __import__ demands different string types between 2 and 3

2014-12-14 Thread Zachary Ware
On Mon, Dec 15, 2014 at 1:29 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: How can I get that ‘__import__’ call, complete with its ‘fromlist’ parameter, working correctly under both Python 2 and Python 3, keeping the ‘unicode_literals’ setting? How about str('bar')? If some kind of kludge

[issue23016] uncaught exception in lib/warnings.py when executed with pythonw

2014-12-14 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: +# sys.stderr is None when ran with pythonw.exe - warnings get lost s/ran/run/ -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23016

[issue23016] uncaught exception in lib/warnings.py when executed with pythonw

2014-12-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 70b6fe58c425 by Serhiy Storchaka in branch '3.4': Fixed a typo in a comment (issue #23016). https://hg.python.org/cpython/rev/70b6fe58c425 New changeset da1ec8e0e068 by Serhiy Storchaka in branch 'default': Fixed a typo in a comment (issue #23016).

[issue23016] uncaught exception in lib/warnings.py when executed with pythonw

2014-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Arfrever. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23016 ___ ___ Python-bugs-list mailing list

[issue23049] Fix functools.reduce code equivalent.

2014-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be good to add Python implementation in functools.py and test they equivalence in tests. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23049

[issue23048] abort when jumping out of a loop

2014-12-14 Thread Xavier de Gaye
Xavier de Gaye added the comment: Building on OS X 10.10 with the head of the code tree (as of today), I cannot reproduce this. Also the disassembly looks fine: I should have mentionned that I am running a debug build of python. -- ___ Python

[issue23030] lru_cache manual get/put

2014-12-14 Thread Constantin
Constantin added the comment: I understand your decision. Even though it makes my life a little bit harder, it is definitely not the end of the world, the end of Python or even the end for my libtco project. -- ___ Python tracker

[issue23004] mock_open() should allow reading binary data

2014-12-14 Thread Aaron Hill
Aaron Hill added the comment: Thanks, I've fixed that. Not sure why I thought decoding and re-encoding would work with any binary data. I've also updated one of the tests to use non-utf8-decodeable binary data, to prevent a future regression. -- Added file:

[issue23050] Add Japanese legacy encodings

2014-12-14 Thread Tetsuya Morimoto
New submission from Tetsuya Morimoto: This patch adds Japanese legacy encodings as below. https://bitbucket.org/t2y/cpython/branches/compare/japanese-legacy-encoding..default * eucjp_ms (euc-jp compatible with cp932) * iso2022_jp_ms (yet another iso-2022-jp compatible with cp932, similar to

[issue23050] Add Japanese legacy encodings

2014-12-14 Thread R. David Murray
R. David Murray added the comment: In emails these are labeled as, say, iso-2022-jp-ms? See also issue 8898 with regards to email encodings. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23050

[issue23050] Add Japanese legacy encodings

2014-12-14 Thread Tetsuya Morimoto
Tetsuya Morimoto added the comment: On Mon, Dec 15, 2014 at 1:04 AM, R. David Murray rep...@bugs.python.org wrote: In emails these are labeled as, say, iso-2022-jp-ms? No. These are labeled just 'iso-2022-jp' and we (japanese) choose proper charset encoding to decode the encoded text. You can

[issue22955] Pickling of methodcaller, attrgetter, and itemgetter

2014-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is revised Josh's patch. Added tests for consistency between both implementations, fixed inconsistencies and bugs. I still hesitate about pickling format of methodcaller. First, there is asymmetry between positional and keyword arguments. Second, for

[issue23050] Add Japanese legacy encodings

2014-12-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +lemburg, loewis, serhiy.storchaka stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23050 ___

[issue23049] Fix functools.reduce code equivalent.

2014-12-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Background: the OP of #19202 proposed equivalent code for all the functool functions, including two versions for reduce. Georg combined the two versions into the one that Raymond pushed. Both agreed that reduce was the only function that really needed this.

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
New submission from Alon Diamant: When imap() or imap_unordered() are called with the iterable parameter set as a generator function, and when that generator function raises an exception, then the _task_handler thread (running the method _handle_tasks) dies immediately, without causing the

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Changes by Alon Diamant diamant.a...@gmail.com: Added file: http://bugs.python.org/file37449/Issue_23051_reproducer_v2_7.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051 ___

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Changes by Alon Diamant diamant.a...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37450/Issue_23051_fix_v2_7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Changes by Alon Diamant diamant.a...@gmail.com: Added file: http://bugs.python.org/file37451/Issue_23051_reproducer_v3_4.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051 ___

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Changes by Alon Diamant diamant.a...@gmail.com: Added file: http://bugs.python.org/file37452/Issue_23051_fix_v3_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051 ___

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Changes by Alon Diamant diamant.a...@gmail.com: Removed file: http://bugs.python.org/file37452/Issue_23051_fix_v3_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051 ___

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Changes by Alon Diamant diamant.a...@gmail.com: Added file: http://bugs.python.org/file37453/Issue_23051_fix_v3_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23051 ___

[issue23051] multiprocessing.pool methods imap() and imap_unordered() cause deadlock

2014-12-14 Thread Alon Diamant
Alon Diamant added the comment: The patches I attached do 2 things: 1. A deadlock is prevented, wherein the main thread waits forever for the Pool thread/s to finish their execution, while they wait for instructions to terminate from the _task_handler thread which has died. Instead, the

[issue23004] mock_open() should allow reading binary data

2014-12-14 Thread Demian Brecht
Demian Brecht added the comment: Thanks again for the update Aaron, I've left a couple small comments in Rietveld. Other than those, the patch looks good to me. Thanks for the contribution! -- ___ Python tracker rep...@bugs.python.org

[issue23049] Fix functools.reduce code equivalent.

2014-12-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: Elsewhere I have used rough equivalent. FWIW, the initializer defaulting to None is also an approximation. It would be more technically correct to have initializer = sentinel where sentinel = object(). But of course this too would obfuscate the

[issue15506] configure should use PKG_PROG_PKG_CONFIG

2014-12-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54939f3c1e17 by Benjamin Peterson in branch '2.7': use autoconf macro to check for pkg-config (closes #15506) https://hg.python.org/cpython/rev/54939f3c1e17 New changeset 76df5870757a by Benjamin Peterson in branch '3.4': use autoconf macro to

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-14 Thread Demian Brecht
Demian Brecht added the comment: I'm a -1 to adding the timeout parameter to the ServerProxy implementation for pretty much the same reasons Jeff mentioned, but mainly because of the ambiguity that is introduced between the timeout and transport parameters (who should win in the case that

[issue23052] python2.7.9 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

2014-12-14 Thread binbjz
New submission from binbjz: It will prompt ssl certificate_vefify_failed(_ssl.c:581) when I used pysphere with python 2.7.9 to connect server. But I switched python 2.7.8 it works well. 2014-12-15 13:22:53,187 [DEBUG] Can not connect to xxx.xxx.xxx.108: [SSL: CERTIFICATE_VERIFY_FAILED]

[issue22928] HTTP header injection in urrlib2/urllib/httplib/http.client

2014-12-14 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22928 ___ ___

[issue23052] python2.7.9 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

2014-12-14 Thread Alex Gaynor
Alex Gaynor added the comment: Python 2.7.9 enabled certificate validation by default for HTTP connections, see PEP476. The server you're connecting to does not have a certificate that is trusted by your client. pysphere should configure SSL appropriately for this use case. -- nosy:

[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-14 Thread Andrej A Antonov
Andrej A Antonov added the comment: @demian.brecht , your example code-fragment is too big. :-) too many lines -- just only for adding timeout. it is uncomfortably. most people will not using that: most likely they just will forget about timeout (but in *MOST* situations not using timeout --

[issue23052] python2.7.9 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

2014-12-14 Thread binbjz
binbjz added the comment: alex, thank you for quick reponse. I will check http://www.python.org/dev/peps/pep-0476/ -- resolution: not a bug - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23052

[issue23052] python2.7.9 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

2014-12-14 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - not a bug status: open - closed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23052 ___