[issue25509] PyImport_ImportModule inaccurately described

2015-10-31 Thread Memeplex
Memeplex added the comment: Well it's like that since 2.1 so I guess the doc is wrong indeee. -- ___ Python tracker ___

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: WTF? Where is my patch? -- ___ Python tracker ___ ___ Python-bugs-list

[issue25526] (python2.7.10)ImportError: No module named _ssl

2015-10-31 Thread Zachary Ware
Zachary Ware added the comment: Do "yum install openssl-devel", then rebuild Python. There are probably other modules that also didn't build, setup.py will report them at its end. -- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, the Lib/test/decimaltestdata files do come from an external source. I don't see the harm in including them in the changes, but those changes will be overwritten when the files are next updated. -- ___ Python

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Mark Dickinson
Mark Dickinson added the comment: I should have said what that source is: it's http://speleotrove.com/decimal/ -- ___ Python tracker ___

Re: Nearest neighbours of points

2015-10-31 Thread Terry Reedy
On 10/31/2015 5:28 PM, Tom P wrote: On 10/24/2015 10:05 PM, Poul Riis wrote: I have N points in 3D, organized in a list. I want to to point out the numbers of the two that have the smallest distance. With scipy.spatial.distance.pdist I can make a list of all the distances, and I can point out

Re: UNABLE TO GET IDLE TO RUN

2015-10-31 Thread Terry Reedy
On 10/30/2015 9:15 PM, Terry Reedy wrote: On 10/30/2015 12:29 PM, Laura Creighton wrote: In a message of Fri, 30 Oct 2015 16:21:30 +0100, Michiel Overtoom writes: Hi, Laura wrote: I think that it would be useful if IDLE spit out a warning An ounce of prevention is worth a pound of cure.

[issue17214] http.client.HTTPConnection.putrequest encode error

2015-10-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___

Re: Unittests and serial workflows

2015-10-31 Thread Laura Creighton
In a message of Sat, 31 Oct 2015 12:46:53 +1100, Chris Angelico writes: >If the order of test execution affects the overall pass/fail of the >test set, then yes, that's a problem. But if, as in the OP's example, >some tests assume the correct operation of features tested >individually elsewhere,

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-31 Thread Martin Panter
Martin Panter added the comment: Also, man pages for Free BSD and OS X (where writing to a disk file is not supported) say it raises: * ENOTSUP if “the ‘fd’ argument does not refer to a regular file” * EBADF if “the ‘s’ argument is not a valid socket descriptor” * ENOTSOCK if “the ‘s’ argument

[issue25415] I can create instances of io.IOBase

2015-10-31 Thread Martin Panter
Martin Panter added the comment: If existing subclasses like FileIO call the base, that is an implementation detail. But custom subclasses of the Raw, Buffered, and Text base classes should not be prohibited from chain calling the base’s __init__() method, nor should they have to override

[issue25521] optparse module does not emit DeprecationWarning

2015-10-31 Thread Martin Panter
Martin Panter added the comment: Under it says “Importing optparse will issue a PendingDeprecationWarning” (not DeprecationWarning!), however even this does not appear to be the case. Maybe somebody forgot to do this, or

[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-10-31 Thread Aymeric Augustin
Aymeric Augustin added the comment: This change appears to have caused a non-obvious regression in `websockets`: https://github.com/aaugustin/websockets/issues/76 Perhaps I was relying on an implementation detail but that's annoying nonetheless. -- nosy: +aymeric.augustin

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-31 Thread Martin Panter
Martin Panter added the comment: I left a few comments. But it might be good if someone more familiar with the APIs could review this. Have you seen the socket.sendfile() implementation? It’s a bit of a mess, and the circumstances are slightly different, but it may offer partial inspiration.

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Martin Panter
New submission from Martin Panter: This patch generally changes “a” to “an” where appropriate in the main documentation, doc strings, source code comments, and a couple error messages in the test suite. Since it touches so many files, I thought it would be good to get a quick review.

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file40909/a-an.patch ___ Python tracker ___

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Martin Panter
Martin Panter added the comment: Rebased so it should be reviewable -- Added file: http://bugs.python.org/file40910/a-an.patch ___ Python tracker ___

Re: GoPiGo script

2015-10-31 Thread input/ldompeling
I intended the rules under while True: The script is working now only the wheels go's only forward "(fwd)",so the sensor not detect any obstacles.(sensor=us_dist(15). --- from gopigo import * import time

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I rather inclined to commit eryksun's patch. -- ___ Python tracker ___

Re: GoPiGo script

2015-10-31 Thread MRAB
On 2015-10-31 10:28, input/ldompel...@casema.nl wrote: I intended the rules under while True: The script is working now only the wheels go's only forward "(fwd)",so the sensor not detect any obstacles.(sensor=us_dist(15).

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose that changes was generated by a script. But some changes looks not satisfying a simple rule. In Doc/library/multiprocessing.rst, Doc/library/socket.rst, Doc/whatsnew/3.2.rst, Misc/HISTORY, Modules/_hashopenssl.c "a" is just deleted. Is it

[issue25524] Add PyMemoryView_FromObjectWithFlags()

2015-10-31 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: -> skrah ___ Python tracker ___ ___

[issue25524] Add PyMemoryView_FromObjectWithFlags()

2015-10-31 Thread Stefan Krah
New submission from Stefan Krah: See for example #25498. -- messages: 253787 nosy: skrah priority: normal severity: normal status: open title: Add PyMemoryView_FromObjectWithFlags() versions: Python 3.6 ___ Python tracker

[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-31 Thread Stefan Krah
Stefan Krah added the comment: Florin, thanks for the explanation. I'd suggest to wait until the mpx support is stable in gcc. Some security features in gcc never take off (-ftrapv is broken, libmudflap is deprecated, ...) so it would be nice to have some reassurance. --

Re: [ANN] Python 3 Cheat Sheet v2.0

2015-10-31 Thread Laurent Pointal
Le Sat, 31 Oct 2015 12:16:08 +1100, Steven D'Aprano a écrit : > On Sat, 31 Oct 2015 06:56 am, Laurent Pointal wrote: >> https://perso.limsi.fr/pointal/python:memento > > > Very nice! Thank you! > > > Some small typos in the English version: Thanks for your comments. Q? Did you read

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-10-31 Thread Cyd Haselton
Cyd Haselton added the comment: UPDATE: Finslly rebuilding Python from github clone after having to factory reset my tablet for reasons (root access). Hopefully build and tests will benefit from paving and starting over. -- ___ Python tracker

[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-31 Thread Nick Coghlan
Nick Coghlan added the comment: New patch attached that revises the preamble to include an explicit goals section that links out to the issue tracker stats page that demonstrates that we have a problem with a lack of core reviewer time. Much of the rest of that section has been moved up from

Re: GoPiGo script

2015-10-31 Thread input/ldompeling
> The body of the 'while' loop extends from the line: > > enable_servo() > > to the line: > > print ("forward1x") > > Would that explain it? When i run this scipt its only print a lot off print1x. Do you mean that ? Thanks In reply to "MRAB" who wrote the following: > On

[issue25439] Add type checks to urllib.request.Request

2015-10-31 Thread Nan Wu
Nan Wu added the comment: Martin: Sorry for missing that line. Under https, byte iterable seems has not been supported: >>> r = Request('https://www.python.org', {b'post': 'data'}, >>> {'Content-Length':10}) >>> urlopen(r) ... hanging here... Meanwhile, I assumed bytearray works as expected.

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Deallocation scheme for memoryview is complex and unsafe. It crashes with chained memoryviews (issue25498), but I suppose deallocating unchained memoryview can crash too if the memoryview itself had exported buffers (self->exports != 0). Both memoryview

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset df12c29882b1 by Steve Dower in branch '3.5': Issue #25450: Updates shortcuts to start Python in installation directory. https://hg.python.org/cpython/rev/df12c29882b1 -- nosy: +python-dev ___ Python

Re: Nearest neighbours of points

2015-10-31 Thread Tom P
On 10/24/2015 10:05 PM, Poul Riis wrote: I have N points in 3D, organized in a list. I want to to point out the numbers of the two that have the smallest distance. With scipy.spatial.distance.pdist I can make a list of all the distances, and I can point out the number of the minimum value of

[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-31 Thread Nick Coghlan
Nick Coghlan added the comment: One other note: I've only linked to OpenHub, and not GitHub, as I don't know how to get a "last 12 months" statistics link for GitHub, instead of either a fixed date range or the entire commit history. -- ___ Python

Re: GoPiGo script

2015-10-31 Thread MRAB
On 2015-10-31 18:59, input/ldompel...@casema.nl wrote: The body of the 'while' loop extends from the line: enable_servo() to the line: print ("forward1x") Would that explain it? When i run this scipt its only print a lot off print1x. Do you mean that ? It does not only print;

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-31 Thread Steve Dower
Steve Dower added the comment: I've fixed the shortcuts. Let me know if you add any extra command line options to Idle for setting a more useful start directory and I can add those to the shortcuts as well. -- resolution: -> fixed ___ Python

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-31 Thread Steve Dower
Changes by Steve Dower : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

Re: GoPiGo script

2015-10-31 Thread input/ldompeling
> It does not only print; it also calls enable_servo, servo and fwd > repeatedly. > Then I am misinformed, because someone told me in this group to use while True: Is there another function that I can use for to restart this script? Thanks In reply to "MRAB" who wrote the following: >

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Stefan Krah
Stefan Krah added the comment: The "chained memoryviews" you refer to are a hack and simply aren't supported. Please stop spreading FUD. -- ___ Python tracker

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Martin Panter
Martin Panter added the comment: Did you forget your patch? :) -- nosy: +martin.panter ___ Python tracker ___

[issue25521] optparse module does not emit DeprecationWarning

2015-10-31 Thread John Hagen
John Hagen added the comment: First time trying to contribute to the Python standard library. I attached a patch that is modeled off the deprecated imp module. The DeprecationWarning message is taken from the Python docs: https://docs.python.org/3/library/optparse.html -- keywords:

Re: GoPiGo script

2015-10-31 Thread MRAB
On 2015-10-31 20:18, input/ldompel...@casema.nl wrote: It does not only print; it also calls enable_servo, servo and fwd repeatedly. Then I am misinformed, because someone told me in this group to use while True: Is there another function that I can use for to restart this script? The lines

[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-10-31 Thread STINNER Victor
STINNER Victor added the comment: "Victor, is there a reason this issue is still open? Is it because of the warnings question? Maybe that should be a new issue?" I just merged from Github to CPython. I don't know if something remains to do in this issue. --

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread R. David Murray
Changes by R. David Murray : -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread R. David Murray
R. David Murray added the comment: Yes, those deletions are intentional, they make the English read better (to me as a native speaker, at least :) As Emanuel said, the SMTP thing comes from reading it as an acronym, which is how I generally do it, and I suppose most people do. Given how

[issue13828] Further improve casefold documentation

2015-10-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: > In addition to lowercasing, this function also expands ligatures, for > example, "fi" becomes "fi". +1 I would have found that sentence to be helpful. -- nosy: +rhettinger ___ Python tracker

[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-10-31 Thread R. David Murray
R. David Murray added the comment: Well, asyncio was still provisional, so annoyances like this were bound to happen occasionally. Victor, is there a reason this issue is still open? Is it because of the warnings question? Maybe that should be a new issue? -- nosy: +r.david.murray

[issue25523] Correct "a" article to "an" article

2015-10-31 Thread Emanuel Barry
Emanuel Barry added the comment: > In Doc/library/smtplib.rst "a" is replaced to "an" before a word starting > with consonant: SMTP. Is it correct? One of the peculiriarities of the English language is that, in front of acronyms, you have two different ways to decided which to use between "a"

[issue15994] memoryview to freed memory can cause segfault

2015-10-31 Thread Stefan Krah
Stefan Krah added the comment: > But I think there should be some way of guaranteeing that a memoryview will > not try to access memory which has already been freed. Unless the "buffered *self" parameter in _buffered_raw_read() is made a full PEP-3118 exporter, I'm not sure how it would be

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-31 Thread desbma
desbma added the comment: Here is an updated patch that takes into account Martin's suggestions, both here and in the code review. -- Added file: http://bugs.python.org/file40911/issue25156_v3.patch ___ Python tracker

[issue25521] optparse module does not emit DeprecationWarning

2015-10-31 Thread R. David Murray
R. David Murray added the comment: Whether someone decided not to do it originally or not, it is probably a good idea to do it (as a DeprecationWarning, IMO), if someone wants to propose a patch. The module isn't receiving maintenance any longer. (Not that it couldn't, but no one is

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-10-31 Thread R. David Murray
R. David Murray added the comment: I'm not at all sure this is worth the maintenance burden at this point in time. So let's say I'm -0.5. I agree that a review and opinion by someone more familiar with the API would be best. I'm adding gps as nosy since this feels like the kind of

[issue25498] Python 3.4.3 core dump with simple sample code

2015-10-31 Thread Stefan Krah
Stefan Krah added the comment: The current hack isn't necessary. I didn't review eryksun's patch in depth, but on the surface it looks good. I don't think the other issues you mentioned are closely related: The cause here is that the obj fields of both the second memoryview and the second mbuf

[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-10-31 Thread Guido van Rossum
Guido van Rossum added the comment: Well, the warning points to a deeper issue -- the fix doesn't work for TLS connections. Also, the upstream issue ( https://github.com/python/asyncio/issues/251) is still open because there's no test for this behavior. --

[issue24539] StreamReaderProtocol.eof_received() should return True to keep the transport open

2015-10-31 Thread R. David Murray
R. David Murray added the comment: Ah, I thought Victor was saying he'd done the unit test; I guess he just meant he'd done the merge. -- stage: -> needs patch ___ Python tracker

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the "chained memoryviews" in ctypes are a hack and it will be eliminated. But this hack exposed possible weak point in memoryview. -- ___ Python tracker

[issue22450] urllib doesn't put Accept: */* in the headers

2015-10-31 Thread Martin Panter
Martin Panter added the comment: I propose rejecting this one, in favour of the caller adding their own “Accept: */*” (or more preferably, “Accept: application/json”) header. What do you think, Raymond or Senthil? -- ___ Python tracker

[issue25439] Add type checks to urllib.request.Request

2015-10-31 Thread Martin Panter
Martin Panter added the comment: This illustrates my concern with the dict-of-bytes check: >>> headers = {"Content-Length": "3"} >>> byteslike_iterable = {memoryview(b"123"): None} >>> urlopen(Request("http://python.org/;, headers=headers, >>> data=byteslike_iterable)) With the current patch

[issue25439] Add type checks to urllib.request.Request

2015-10-31 Thread Martin Panter
Martin Panter added the comment: The bytes-like thing applies equally well to both the direct and iterable cases. Your first attempt hangs because the client only sends the four bytes in b"post", but the server is waiting for a total of 10 bytes. The SSL problem doesn’t show up unless you use

[issue23496] Steps for Android Native Build of Python 3.4.2

2015-10-31 Thread Cyd Haselton
Cyd Haselton added the comment: Unfortunately, in spite of the other minor issues that resolved,I am still getting a bus error when the hash test runs. Before I dive back into trying to get gdb working to debug this, is there any way to skip this test to see of the others run? --

[issue25450] Python 3.5 starts in C:\Windows\system32 as current directory

2015-10-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Steve, I am adding you as nosy on #22121, which is now about adding a new startup option. -- ___ Python tracker ___

Re: UNABLE TO GET IDLE TO RUN

2015-10-31 Thread Michiel Overtoom
> On 31 Oct 2015, at 06:59, Terry Reedy wrote: > This is a different issue than IDLE avoiding clashes. I opened > https://bugs.python.org/issue25522 Terry, thanks for recording this into the issue tracker. I'd go even a step further. I think IDLE should not only warn, but

[issue25509] PyImport_ImportModule inaccurately described

2015-10-31 Thread Memeplex
Memeplex added the comment: Brett, I'm not sure about that, notice that the "import hook" as is mentioned in the docs is just the current __import__ in the builtins module (which could have been replaced and in this sense would be a "hook") but not proper import hooks. I think the original

Re: UNABLE TO GET IDLE TO RUN

2015-10-31 Thread Chris Angelico
On Sun, Nov 1, 2015 at 12:45 PM, Michiel Overtoom wrote: > I'd go even a step further. I think IDLE should not only warn, but completely > prevent saving a file which shadows a stdlib module, which will effectively > render Python unusable. I remember from a few weeks back, a

[issue22121] IDLE should start with HOME as the initial working directory

2015-10-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: I retract my previous statement "Splattering .py files in ~HOME is not tremendously better than doing the same in the executable directory." and agree that when started with the default Windows icon, IDLE should start in %USERPROFILE%. Discussion for #25450

[issue25526] (python2.7.10)ImportError: No module named _ssl

2015-10-31 Thread nanxiu
New submission from nanxiu: After I install python2.7.10 I run:import ssl,then I find this error: Python 2.7.10 (default, Oct 29 2015, 04:13:03) [GCC 3.4.5 20051201 (Red Hat 3.4.5-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback

Re: UNABLE TO GET IDLE TO RUN

2015-10-31 Thread Terry Reedy
On 10/31/2015 9:45 PM, Michiel Overtoom wrote: On 31 Oct 2015, at 06:59, Terry Reedy wrote: This is a different issue than IDLE avoiding clashes. I opened https://bugs.python.org/issue25522 Terry, thanks for recording this into the issue tracker. I'd go even a step