[issue26382] List object memory allocator

2016-02-22 Thread Catalin Gabriel Manciu
Catalin Gabriel Manciu added the comment: Our Haswell-EP OpenStack Swift setup shows a 1% improvement in throughput rate using CPython 2.7 (5715a6d9ff12) with this patch. -- ___ Python tracker

[issue26408] pep-8 requires a few corrections

2016-02-22 Thread thefourtheye
Changes by thefourtheye : -- title: pep-8 requires few corrections -> pep-8 requires a few corrections ___ Python tracker

Re: avoid for loop calling Generator function

2016-02-22 Thread Peter Otten
Arshpreet Singh wrote: > Hi, I am converting PDF into text file, I am using following code. > > from pypdf2 import PdfFileReader > > def read_pdf(pdfFileName): > > pdf = PdfFileReader(pdfFileName) > > yield from (pg.extractText() for pg in pdf.pages) > > for i in

[issue26409] Support latest Tcl/Tk on future versions of Mac installer

2016-02-22 Thread Aivar Annamaa
New submission from Aivar Annamaa: Currently Mac installer can create only Tk 8.5 compatible Tkinter, even if Tcl/Tk 8.6 is installed. Unofficial distributions doesn't seem to have problems with Tk 8.6 on Mac. I think official installer should be upgraded as well. Best option for users would

[issue26408] pep-8 requires few corrections

2016-02-22 Thread thefourtheye
New submission from thefourtheye: 1. It doesn't have the Reference 4 used anywhere in the doc. 2. The `if` condition is not properly ended in the Programming Recommendation section. 3. Apart from that few grammatical changes are necessary I believe. -- assignee: docs@python

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread Chris Angelico
On Mon, Feb 22, 2016 at 11:51 PM, BartC wrote: > Yes, I mentioned that point. In the OP's language, the variables can be > declared as a particular type; in Python they could perhaps be 'declared' by > first assigning with 0, 0.0 or "" for example. But that would need reference >

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-22 Thread STINNER Victor
STINNER Victor added the comment: > Compared to my proposition in issue #26382, this patch yields slightly better > results for CPython 3.6, gaining an average of +0.36% on GUPB, and similar results for CPython 2.7. IMHO this change is too young to be backported to Python 2.7. I wrote it for

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread BartC
On 22/02/2016 11:16, Steven D'Aprano wrote: On Mon, 22 Feb 2016 12:16 am, BartC wrote: [...] No need for anyone to re-invent the wheel! ;-) I keep seeing this in the thread. Python has all this capability, yet it still requires a lot of fiddly code to be added to get anywhere near as simple

[issue26249] Change PyMem_Malloc to use PyObject_Malloc allocator?

2016-02-22 Thread Catalin Gabriel Manciu
Catalin Gabriel Manciu added the comment: Hi all, Please find below the results from a complete GUPB run on a patched CPython 3.6. In average, an improvement of about 2.1% can be observed. I'm also attaching an implementation of the patch for CPython 2.7 and its benchmark results. On GUPB

EuroPython 2016: Early bird ticket sales

2016-02-22 Thread M.-A. Lemburg
After the Call for Proposals for EuroPython 2016 last week, we are now calling out to everyone interested in signing up as EuroPython attendee early. You will be able to benefit from reduced ticket prices for a short period of time. Our early bird ticket sales are limited to 300 tickets. Regular

[issue26407] csv.writer.writerows masks exceptions from __iter__

2016-02-22 Thread Ilja Everilä
New submission from Ilja Everilä: When passing a class implementing the dunder __iter__ that raises to csv.writer.writerows it hides the original exception and raises a TypeError instead. In the raised TypeError the __context__ and __cause__ both are None. For example: >>> class X: ... def

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread BartC
On 22/02/2016 08:50, Jussi Piitulainen wrote: BartC writes: Reading stuff from an interactive console or terminal, is such an important part of the history of computing, still being used now, that you'd think a language would provide simple, ready-to-use methods ways to do it. I think it

Re: Setting up/authenticating Google API?

2016-02-22 Thread Arshpreet Singh
On Sunday, 21 February 2016 21:21:54 UTC+5:30, Skip Montanaro wrote: > This isn't strictly a Python question, however... Once I get myself > authenticated, I intend to use the Python Google API to pump archived > mail messages from a few defunct mailing lists into Google Groups. I > thought it

[issue21042] ctypes.util.find_library() should return full pathname instead of filename in linux

2016-02-22 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: Updated the patch to remove the code duplication, now it stores the values that are calculated in the setUpClass method. It was a good and simple idea, I should have come up with it... :) I'm pretty sure I got the errors during configuration because of the

[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2016-02-22 Thread Antti Haapala
Antti Haapala added the comment: I believe `urlparse` should throw a `TypeError` if not isinstance(url, (str, bytes)) -- ___ Python tracker ___

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread Jussi Piitulainen
Steven D'Aprano writes: > On Mon, 22 Feb 2016 08:52 am, Jussi Piitulainen wrote: > >> BartC writes: > >>> IIRC, the first programming exercise I ever did (in 1976 using Algol >>> 60) involved reading 3 numbers from the teletype and working out if >>> those could form sides of a triangle. >> >>

avoid for loop calling Generator function

2016-02-22 Thread Arshpreet Singh
Hi, I am converting PDF into text file, I am using following code. from pypdf2 import PdfFileReader def read_pdf(pdfFileName): pdf = PdfFileReader(pdfFileName) yield from (pg.extractText() for pg in pdf.pages) for i in read_pdf('book.pdf'): print(i) I want to avoid for

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread Steven D'Aprano
On Mon, 22 Feb 2016 12:16 am, BartC wrote: [...] >> No need for anyone to re-invent the >> wheel! ;-) > > I keep seeing this in the thread. Python has all this capability, yet it > still requires a lot of fiddly code to be added to get anywhere near as > simple as this: > >read f, a, b, c

[issue26404] socketserver context manager

2016-02-22 Thread Martin Panter
Martin Panter added the comment: I would support this change, as long as we aren’t supporting using server_close() to stop the server loop at the same time. It might be worth updating other example code that uses server_close(), in particular in the xmlrpc.server documentation. --

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-22 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26392] socketserver.BaseServer.close_server should stop serve_forever

2016-02-22 Thread Martin Panter
Martin Panter added the comment: I suggest to reject this. Checking a flag before using a shared file descriptor is a recipe for a race condition, and in this case, unspecified behaviour: (applies to select and poll). --

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread Steven D'Aprano
On Mon, 22 Feb 2016 08:52 am, Jussi Piitulainen wrote: > BartC writes: >> IIRC, the first programming exercise I ever did (in 1976 using Algol >> 60) involved reading 3 numbers from the teletype and working out if >> those could form sides of a triangle. > > That was a lousy user interface even

Re: can try expect have if else.

2016-02-22 Thread Steven D'Aprano
On Mon, 22 Feb 2016 03:12 am, Ganesh Pal wrote: > Hi Team, > > Iam on python 2.6 , need input on the below piece of code. > > > EXIT_STATUS_ERROR=1 > > def create_dataset(): > """ > """ > logging.info("Dataset create.Started !!!") > try: > if

[issue26268] Update python.org installers to use OpenSSL 1.0.2f

2016-02-22 Thread Zachary Ware
Zachary Ware added the comment: OpenSSL seems to have FUBARed their release process, such that the include/ directory no longer includes anything. As such I had to update prepare_ssl.py to handle creating include directories for 32 and 64 bit. This is somewhat wasteful since the only thing

[issue26268] Update python.org installers to use OpenSSL 1.0.2f

2016-02-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3be29e684ccf by Zachary Ware in branch '2.7': Issue #26268: Update Windows builds to use OpenSSL 1.0.2f https://hg.python.org/cpython/rev/3be29e684ccf New changeset e1187d3204e9 by Zachary Ware in branch '3.5': Issue #26268: Update the

[issue26261] NamedTemporaryFile documentation is vague about the `name` attribute

2016-02-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset f1982e1426ce by Martin Panter in branch '3.5': Issue #26261: Clarify NamedTemporaryFile name attribute vs file.name https://hg.python.org/cpython/rev/f1982e1426ce New changeset 837bae8c8ae7 by Martin Panter in branch 'default': Issue #26261: Merge

[issue26403] Don't call sendto in socketserver.DatagramRequestHandler if there is nothing to send

2016-02-22 Thread Martin Panter
Martin Panter added the comment: Actually there is precedent for some asynchronous errors due to the client to be ignored: * Revision 87d3f91e44d4: Catch socket.error (now OSError) from accept() * r73819: Catch socket.error (OSError) to handle ENOTCONN from shutdown() * Revision 7e5d7ef4634d:

[issue26390] hashlib's pbkdf2_hmac documentation "rounds" does not match source

2016-02-22 Thread Martin Panter
Martin Panter added the comment: Here is an updated patch. I also fixed the hash_name parameter, some more minor offences in the documentation, and added a test case. -- Added file: http://bugs.python.org/file42002/pbkdf2_6.patch ___ Python tracker

Scipy2016: call for proposals

2016-02-22 Thread Nelle Varoquaux
Dear all, SciPy 2016, the Fifteenth Annual Conference on Python in Science, takes place in Austin, TX on July, 11th to 17th. The conference features two days of tutorials by followed by three days of presentations, and concludes with two days of developer sprints on projects of interest to

[issue23430] socketserver.BaseServer.handle_error() should not catch exiting exceptions

2016-02-22 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

Re: SQLite

2016-02-22 Thread Chris Angelico
On Mon, Feb 22, 2016 at 7:40 PM, Klaus Jantzen wrote: >That did not work because I did not install Python 3.5. with apt-get >but downloaded the source and compiled myself. >Thus apt-get does not have any information about the Python 3.5 >installation. It

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread Jussi Piitulainen
BartC writes: > On 21/02/2016 21:52, Jussi Piitulainen wrote: [...] > def istriangle(*threeintegers): >> a,b,c = sorted(threeintegers) >> return a*a + b*b == c*c > > (That detects right-angled triangles. I think 'return a+b>c' is the > correct test for any triangle. It

Re: SQLite

2016-02-22 Thread Klaus Jantzen
On 02/22/2016 02:44 AM, Chris Angelico wrote: On Mon, Feb 22, 2016 at 8:37 AM, Albert-Jan Roskam [1] wrote: IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python That may well work, but it's probably easier to work this

Re: SQLite

2016-02-22 Thread Klaus Jantzen
On 02/21/2016 10:37 PM, Albert-Jan Roskam wrote: (Sorry for top posting) IIRC, you have to do sudo apt-get install build-essential python-dev ... then re-compile python > To: [1]python-list@python.org > From: [2]k.d.jant...@mailbox.org > Subject: SQLite

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: The PSF also has a Contributor Licensing Agreement in place for contributions to CPython, so if you could sign that, that would be great: https://www.python.org/psf/contrib/contrib-form/ Highlights from a contributor point of view: - the CLA explicitly licenses

[issue9325] Add an option to pdb/trace/profile to run library module as a script

2016-02-22 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___

[issue26388] Disabling changing sys.argv[0] with runpy.run_module(...alter_sys=True)

2016-02-22 Thread Nick Coghlan
Nick Coghlan added the comment: This seems like a reasonable enhancement to me, but I'd appreciate your thoughts on how it might relate to a couple of other proposed ideas: * Supporting execution-by-module-name in pdb et al: https://bugs.python.org/issue9325 * Supporting configurable target

[issue26402] Regression in Python 3.5 xmlrpc.client, raises RemoteDisconnected seemingly randomly.

2016-02-22 Thread Martin Panter
Martin Panter added the comment: Here is patch with a test case. I kept Jelte’s original fix as it is, because I want to be conservative in the code changes. Xmlrpc.server only uses HTTP 1.0, without any support of keep-alive connections, so I used http.server instead. -- stage: test

Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-22 Thread Denis Akhiyarov
Note that you can continue using your existing vb6 code from python through COM using pywin32 or pythonnet, until you decide to rewrite it. -- https://mail.python.org/mailman/listinfo/python-list

<    1   2