[issue13952] mimetypes doesn't recognize .csv

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Geoff. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue16329] mimetypes does not support webm type

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6 ___ Python tracker

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thanks for this work Martin. -- assignee: -> martin.panter stage: patch review -> commit review ___ Python tracker

[issue19377] Backport SVG mime type to Python 2

2016-04-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag resolution: -> fixed status: open -> closed versions: -Python 2.6 ___ Python tracker

[issue19377] Backport SVG mime type to Python 2

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 43a6e7104b78 by Berker Peksag in branch '2.7': Issue #19377: Add .svg to mimetypes.types_map https://hg.python.org/cpython/rev/43a6e7104b78 -- nosy: +python-dev ___ Python tracker

Re: (Python 3.5) Asyncio and an attempt to run loop.run_until_complete() from within a running loop

2016-04-08 Thread Frank Millman
"Alexander Myodov" wrote in message news:33e44698-2625-47c4-9595-00a8c79f2...@googlegroups.com... Hello. TLDR: how can I use something like loop.run_until_complete(coro), to execute a coroutine synchronously, while the loop is already running? I am no expert, but does this help? "If

[issue13952] mimetypes doesn't recognize .csv

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset e704e0786332 by Berker Peksag in branch '2.7': Issue #13952: Add .csv to mimetypes.types_map https://hg.python.org/cpython/rev/e704e0786332 -- ___ Python tracker

[issue16329] mimetypes does not support webm type

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ed3cb699be6 by Berker Peksag in branch '2.7': Issue #16329: Add .webm to mimetypes.types_map https://hg.python.org/cpython/rev/6ed3cb699be6 -- ___ Python tracker

[issue16329] mimetypes does not support webm type

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0327a5a11108 by Berker Peksag in branch '3.5': Issue #16329: Add .webm to mimetypes.types_map https://hg.python.org/cpython/rev/0327a5a11108 New changeset f92e6785b9f0 by Berker Peksag in branch 'default': Issue #16329: Add .webm to

[issue13952] mimetypes doesn't recognize .csv

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 711672506b40 by Berker Peksag in branch '3.5': Issue #13952: Add .csv to mimetypes.types_map https://hg.python.org/cpython/rev/711672506b40 New changeset 5143f86ffe57 by Berker Peksag in branch 'default': Issue #13952: Add .csv to

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks Victor and Serhiy. Сoccinelle looks like a useful tool, but I'm not planning to touch modules that I don't know well enough. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue26687] Use Py_RETURN_NONE in sqlite3 module

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset b72f2d699563 by Berker Peksag in branch 'default': Issue #26687: Use Py_RETURN_NONE macro in sqlite3 module https://hg.python.org/cpython/rev/b72f2d699563 -- nosy: +python-dev ___ Python tracker

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file42408/store_const.v2.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file42407/store_const.v2.patch ___ Python tracker ___

[issue25314] Documentation: argparse's actions store_{true, false} default to False/True (undocumented)

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Patch with the outstanding change for const, plus an extra fix under the main description. -- Added file: http://bugs.python.org/file42407/store_const.v2.patch ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-04-08 Thread Martin Panter
Martin Panter added the comment: The docs buildbot is complaining: http://buildbot.python.org/all/builders/Docs%203.x/builds/1156/steps/lint/logs/stdio [2] whatsnew/3.6.rst:199: default role used I guess this is complaining about the `__enter__()` syntax with back-ticks. Maybe it should be

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-08 Thread SilentGhost
Changes by SilentGhost : -- nosy: +brett.cannon type: -> behavior versions: +Python 3.5 ___ Python tracker ___

Re: QWERTY was not designed to intentionally slow typists down (was: Unicode normalisation [was Re: [beginner] What's wrong?])

2016-04-08 Thread Steven D'Aprano
On Sat, 9 Apr 2016 10:43 am, Ben Finney wrote: > Dennis Lee Bieber writes: > >> [The QWERTY keyboard layout] was a sane design -- for early mechanical >> typewrites. It fulfills its goal of slowing down a typist to reduce >> jamming print-heads at the platen. > > This is

[issue23397] PEP 431 implementation

2016-04-08 Thread Berker Peksag
Berker Peksag added the comment: Closing this since the PEP has been withdrawn. See https://www.python.org/dev/peps/pep-0431/#withdrawal for details. -- resolution: -> postponed stage: needs patch -> resolved status: open -> closed ___ Python

Re: test post please ignore

2016-04-08 Thread Ethan Furman
On 04/08/2016 06:32 PM, Random832 wrote: Testing posting from an email address other than the one I'm subscribed in, to determine whether it's possible to post to the list without being subscribed. Kinda. :) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

[issue26712] Unify (r)split(), (l/r)strip() method tests

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks for your comments Serhiy; here is an update -- Added file: http://bugs.python.org/file42406/split-strip.v2.patch ___ Python tracker

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Forgot to remove the pyver code (leaning a bit too much on pre-commit) -- Added file: http://bugs.python.org/file42405/patch ___ Python tracker

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks, this version looks pretty good to me. -- ___ Python tracker ___ ___

Re: Repair??

2016-04-08 Thread Random832
I suspect that the reason that a lot of people who report issues like this don't seem to follow up is that they may not be subscribed to the list, and replies are sent to the list exclusively. Quoting the entire reply so they see it. On Fri, Apr 8, 2016, at 21:24, Ben Finney wrote: > Amaya

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Updates after review. -- Added file: http://bugs.python.org/file42404/patch ___ Python tracker ___

test post please ignore

2016-04-08 Thread Random832
Testing posting from an email address other than the one I'm subscribed in, to determine whether it's possible to post to the list without being subscribed. -- https://mail.python.org/mailman/listinfo/python-list

Re: Repair??

2016-04-08 Thread Ben Finney
Amaya McLean writes: > After I install Python How, specifically, are you installing Python? There are many ways, and we can't guess which you use. Which particular Python installation have you obtained? From what specific URL? Python is available from many sources and

Repair??

2016-04-08 Thread Amaya McLean
After I install Python, I try to run it, and it always says it needs to be repaired, and when I do, it still doesn't fix the problem. If you could help me out, that would be great! Thanks, Amaya -- https://mail.python.org/mailman/listinfo/python-list

[issue26718] super.__init__ leaks memory if called multiple times

2016-04-08 Thread Kevin Modzelewski
New submission from Kevin Modzelewski: The super() __init__ function fills in the fields of a super object without checking if they were already set. If someone happens to call __init__ again, the previously-set references will end up getting forgotten and leak memory. For example: import

[issue13207] os.path.expanduser breaks when using unicode character in the username

2016-04-08 Thread Arkady “KindDragon” Shapkin
Arkady “KindDragon” Shapkin added the comment: At least Python 2.7 should return in locale.getpreferredencoding() encoding -- nosy: +Arkady “KindDragon” Shapkin ___ Python tracker

QWERTY was not designed to intentionally slow typists down (was: Unicode normalisation [was Re: [beginner] What's wrong?])

2016-04-08 Thread Ben Finney
Dennis Lee Bieber writes: > [The QWERTY keyboard layout] was a sane design -- for early mechanical > typewrites. It fulfills its goal of slowing down a typist to reduce > jamming print-heads at the platen. This is an often-repeated myth, with citations back as far as the

[issue26257] Eliminate buffer_tests.py

2016-04-08 Thread Martin Panter
Martin Panter added the comment: Thanks for you help with this Serhiy. Instead of your fixfillchartype(), I went with special “if self.type2test is bytearray” checks in the common tests. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed

(Python 3.5) Asyncio and an attempt to run loop.run_until_complete() from within a running loop

2016-04-08 Thread Alexander Myodov
Hello. TLDR: how can I use something like loop.run_until_complete(coro), to execute a coroutine synchronously, while the loop is already running? More on this: I was trying to create an aio_map(coro, iterable) function (which would asynchronously launch a coroutine for each iteration over

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Martin Panter
Martin Panter added the comment: I was going to say your original fix was the reverse of a change in r86146. But you seem to be fixing the problems before I express them :) For the fix I would suggest something like unquote(path, "latin-1") would be simpler. I left some other review comments

Re: [beginner] What's wrong?

2016-04-08 Thread Mark Lawrence via Python-list
On 08/04/2016 23:59, sohcahto...@gmail.com wrote: On Friday, April 1, 2016 at 3:57:40 PM UTC-7, Mark Lawrence wrote: On 01/04/2016 23:44, sohcahto...@gmail.com wrote: On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: Nevermind. for j in range(1,8) should be for j in

[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2016-04-08 Thread Dan Mick
Dan Mick added the comment: So the original author of the code says it's "likely no longer relevant", and it's clearly wrong, but no one has touched this in six years? Even moving the "linker[i] = self.compiler_cxx[i]" inside the if that checks for "env" would *still* limit the exposure of

Re: [beginner] What's wrong?

2016-04-08 Thread sohcahtoa82
On Friday, April 1, 2016 at 3:57:40 PM UTC-7, Mark Lawrence wrote: > On 01/04/2016 23:44, sohcahto...@gmail.com wrote: > > On Friday, April 1, 2016 at 3:10:51 PM UTC-7, Michael Okuntsov wrote: > >> Nevermind. for j in range(1,8) should be for j in range(8). > > > > I can't tell you how many times

[issue1103213] Adding a recvexactly() to socket.socket: receive exactly n bytes

2016-04-08 Thread Paul Sokolovsky
Changes by Paul Sokolovsky : -- nosy: +pfalcon ___ Python tracker ___ ___

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: Oops, broke b'/%80'. Here's a better fix that now takes: (on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode utf-8)-> b'\xc2\x80' -(decode latin1)-> u'\xc2\x80' to: (on the wire) b'\x80' -(decode latin1)-> u'\x80' -(encode latin1) -> b'\x80'

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-04-08 Thread Brett Cannon
Brett Cannon added the comment: I simplified Wolfgang's patch by simply using os.path.exists(). That eliminated the one place where os.path.isdir() was in use that was too specific to directories where files were reasonable to expect. I also quickly tweaked the docs for the site module in

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 09dc97edf454 by Brett Cannon in branch '3.5': Issue #26587: Remove an incorrect statement from the docs https://hg.python.org/cpython/rev/09dc97edf454 New changeset 94d5c57ee835 by Brett Cannon in branch 'default': Merge w/ 3.5 for issue #26587

[issue26587] Possible duplicate entries in sys.path if .pth files are used with zip's

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd1af1a97c2e by Brett Cannon in branch 'default': Issue #26587: Allow .pth files to specify file paths as well as https://hg.python.org/cpython/rev/bd1af1a97c2e -- nosy: +python-dev ___ Python tracker

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
Anthony Sottile added the comment: A few typos in my previous comment, pressed enter too quickly, here's an updated comment: Patch attached with test. In summary: A request to the url b'/\x80' appears to the application as a request to b'/\xc2\x80' -- The issue being the latin1 decoded

[issue26717] wsgiref.simple_server: mojibake with cp1252 bytes in PATH_INFO

2016-04-08 Thread Anthony Sottile
New submission from Anthony Sottile: Patch attached with test. In summary: A request to the url b'/\x80' appears to the application as a request to b'\xc2\x80' -- The issue being the latin1 decoded PATH_INFO is re-encoded as UTF-8 and then decoded as latin1 (on the wire) b'\x80' -(decode

[issue26716] EINTR handling in fcntl

2016-04-08 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules nosy: +haypo, neologix, twouters versions: +Python 3.6 ___ Python tracker

[issue26716] EINTR handling in fcntl

2016-04-08 Thread Jack Zhou
New submission from Jack Zhou: According to PEP 475, standard library modules should handle EINTR, but this appears to not be the case for the fcntl module. Test script: import fcntl import signal import os def handle_alarm(signum, frame): print("Received alarm in process

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-08 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26668] Remove Lib/test/test_importlib/regrtest.py?

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d214b30e8ef0 by Brett Cannon in branch 'default': Issue #26668: Remove the redundant Lib/test/test_importlib/regrtest.py https://hg.python.org/cpython/rev/d214b30e8ef0 -- nosy: +python-dev ___ Python

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread Gregory P. Smith
Gregory P. Smith added the comment: hah, i should've tested this in an up to date client. :) -- ___ Python tracker ___

[issue26715] can not deactivate venv (deactivate.bat) if the venv was activated by activate.ps1.

2016-04-08 Thread Zachary Ware
Zachary Ware added the comment: Activate.ps1 creates a 'deactivate' function, just like activate.*sh on UNIX. deactivate.bat is an implementation detail, because Windows cmd does not support functions. In any activated venv on any platform, simply doing `deactivate` should work to

[issue25609] Add a ContextManager ABC and type

2016-04-08 Thread Brett Cannon
Brett Cannon added the comment: Thanks to everyone for the feedback! I will now go backport this to python/typing on GitHub. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25609] Add a ContextManager ABC and type

2016-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 841a263c0c56 by Brett Cannon in branch 'default': Issue #25609: Introduce contextlib.AbstractContextManager and https://hg.python.org/cpython/rev/841a263c0c56 -- nosy: +python-dev ___ Python tracker

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Marko Rauhamaa
Steven D'Aprano : > But when you get down to fundamentals, character sets and alphabets have > always blurred the line between presentation and meaning. W ("double-u") > was, once upon a time, UU But as every Finnish-speaker now knows, "w" is only an old-fashioned

[issue26715] can not deactivate venv (deactivate.bat) if the venv was activated by activate.ps1.

2016-04-08 Thread Giga Image
New submission from Giga Image: Win10/Python 3.5.1 If virtual environment was activated using powershell script, it can not deactivate the environment using only provided deactivate.bat. Pre-condition : Virtual environment already in place. 1. Open elevated Powershell (Administrator access).

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Steven D'Aprano
On Sat, 9 Apr 2016 03:21 am, Peter Pearson wrote: > On Fri, 08 Apr 2016 16:00:10 +1000, Steven D'Aprano > wrote: >> On Fri, 8 Apr 2016 02:51 am, Peter Pearson wrote: >>> >>> The Unicode consortium was certifiably insane when it went into the >>> typesetting business. >> >>

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread SilentGhost
SilentGhost added the comment: issue25485 seem to have addressed this. -- nosy: +SilentGhost resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

Re: Python programs and relative imports

2016-04-08 Thread Ian Kelly
On Fri, Apr 8, 2016 at 11:50 AM, Rob Gaddi wrote: > Sort of. If I've got a directory full of files (in a package) > that I'm working on, the relative import semantics change based on > whether I'm one directory up and importing the package or in the same >

[issue21048] Index 'as' in import and with statements

2016-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Three -- ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Python 3.4 problem with requests module

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 4:24 AM, Lee Fig <1lee...@gmail.com> wrote: > print(socket.__file__) > > seems to confirm that all is well. It refers to my Lib folder: > C:\work\tools\WinPython-64bit-3.4.4.1\python-3.4.4.amd64\Lib\socket.py > > How frustrating. I will Google shadow importing as thats a new

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Rustom Mody
Adding link On Friday, April 8, 2016 at 11:48:07 PM UTC+5:30, Rustom Mody wrote: > 5.12 Deprecation > > In the Unicode Standard, the term deprecation is used somewhat differently > than it is in some other standards. Deprecation is used to mean that a > character or other feature is strongly

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Rustom Mody
On Friday, April 8, 2016 at 11:33:38 PM UTC+5:30, Peter Pearson wrote: > On Sat, 9 Apr 2016 03:50:16 +1000, Chris Angelico wrote: > > On Sat, Apr 9, 2016 at 3:44 AM, Marko Rauhamaa wrote: > [snip] > >> (As for ligatures, I understand that there might be quite a bit of > >> legacy software that

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Rustom Mody
On Friday, April 8, 2016 at 11:14:21 PM UTC+5:30, Marko Rauhamaa wrote: > Peter Pearson : > > > On Fri, 08 Apr 2016 16:00:10 +1000, Steven D'Aprano wrote: > >> They are not, and never have been, in the typesetting business. > >> Perhaps characters are not the only things easily confused *wink* >

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Peter Pearson
On Sat, 9 Apr 2016 03:50:16 +1000, Chris Angelico wrote: > On Sat, Apr 9, 2016 at 3:44 AM, Marko Rauhamaa wrote: [snip] >> (As for ligatures, I understand that there might be quite a bit of >> legacy software that dedicated code points and code pages for

Re: Python programs and relative imports

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 3:50 AM, Rob Gaddi wrote: > Sort of. If I've got a directory full of files (in a package) > that I'm working on, the relative import semantics change based on > whether I'm one directory up and importing the package or in the same >

Re: Python programs and relative imports

2016-04-08 Thread Rob Gaddi
Chris Angelico wrote: > On Sat, Apr 9, 2016 at 2:59 AM, Rob Gaddi > wrote: >> Rob Gaddi wrote: >> >>> Does anyone know the history of why relative imports are only available >>> for packages and not for "programs"? It certainly complicates life. >>> >> >>

[issue25544] cleanup temporary files in distutils.has_function

2016-04-08 Thread SilentGhost
SilentGhost added the comment: Here is the review-able patch. -- Added file: http://bugs.python.org/file42400/minrk_issue25544.diff ___ Python tracker

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Rustom Mody
On Friday, April 8, 2016 at 10:24:17 AM UTC+5:30, Chris Angelico wrote: > On Fri, Apr 8, 2016 at 2:43 PM, Rustom Mody wrote: > > No I am not clever/criminal enough to know how to write a text that is > > visually > > close to > > print "Hello World" > > but is internally closer to > > rm -rf / >

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 3:44 AM, Marko Rauhamaa wrote: > Unicode heroically and definitively solved the problems ASCII had posed > but introduced a bag of new, trickier problems. > > (As for ligatures, I understand that there might be quite a bit of > legacy software that

[issue25544] cleanup temporary files in distutils.has_function

2016-04-08 Thread Min RK
Min RK added the comment: update patch to use file context manager on temporary source file it should apply cleanly on current default (778ccbe3cf74) -- Added file: http://bugs.python.org/file42399/0001-cleanup-tempfiles-in-has_function.patch ___

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Marko Rauhamaa
Peter Pearson : > On Fri, 08 Apr 2016 16:00:10 +1000, Steven D'Aprano > wrote: >> They are not, and never have been, in the typesetting business. >> Perhaps characters are not the only things easily confused *wink* > > Defining codepoints that

[issue26714] telnetlib.Telnet should act as a context manager

2016-04-08 Thread Gregory P. Smith
New submission from Gregory P. Smith: Telnet instances should support the context manager protocol so they can be used in with statements. >>> import telnetlib >>> with telnetlib.Telnet('192.168.86.7') as tn: ... pass ... Traceback (most recent call last): File "", line 1, in

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread R. David Murray
R. David Murray added the comment: If it turns out it is just a doc issue we can reopen this to address that. -- ___ Python tracker ___

Re: Unicode normalisation [was Re: [beginner] What's wrong?]

2016-04-08 Thread Peter Pearson
On Fri, 08 Apr 2016 16:00:10 +1000, Steven D'Aprano wrote: > On Fri, 8 Apr 2016 02:51 am, Peter Pearson wrote: >> >> The Unicode consortium was certifiably insane when it went into the >> typesetting business. > > They are not, and never have been, in the typesetting

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with David here, this isn't a bug tracker level issue. But, to the specifics of your example, it already works: Python 3.6.0a0 (default:9095a5787a82+, Feb 5 2016, 18:24:55) [GCC 5.2.1 20151010] on linux Type "help", "copyright", "credits" or "license"

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Marko Rauhamaa
Ian Kelly : > On Fri, Apr 8, 2016 at 10:33 AM, Marko Rauhamaa wrote: >> Ian Kelly : >> >>> That's fine for those operations and probably insert, but how do you >>> search an AVL tree for a specific key without also using __eq__? >>

Re: Python programs and relative imports

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 2:59 AM, Rob Gaddi wrote: > Rob Gaddi wrote: > >> Does anyone know the history of why relative imports are only available >> for packages and not for "programs"? It certainly complicates life. >> > > Really, no one? It seems like a

[issue18461] X Error in tkinter

2016-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Opened Tk ticket: http://core.tcl.tk/tk/tktview/bffa794b1b50745e0cf81c860b0bcbf36ccfb21a . -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Ian Kelly
On Fri, Apr 8, 2016 at 10:33 AM, Marko Rauhamaa wrote: > Ian Kelly : > >> That's fine for those operations and probably insert, but how do you >> search an AVL tree for a specific key without also using __eq__? > > Not needed: > >

Re: Python programs and relative imports

2016-04-08 Thread Rob Gaddi
Rob Gaddi wrote: > Does anyone know the history of why relative imports are only available > for packages and not for "programs"? It certainly complicates life. > Really, no one? It seems like a fairly obvious thing to have included; all of the reasons that you want to be explicit in saying:

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Marko Rauhamaa
Ian Kelly : > That's fine for those operations and probably insert, but how do you > search an AVL tree for a specific key without also using __eq__? Not needed: if key < node.key: look_right()

Re: Python 3.4 problem with requests module

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 2:00 AM, <1lee...@gmail.com> wrote: > from socket import _fileobject, timeout, error as SocketError > > But I get a python exception on this last line: > > ImportError was unhandled by user code > Message: cannot import name '_fileobject' > > > I am running Python 3.4 and

Re: Python 3.4 problem with requests module

2016-04-08 Thread Steven D'Aprano
On Sat, 9 Apr 2016 02:00 am, 1lee...@gmail.com wrote: > import OpenSSL.SSL > from pyasn1.codec.der import decoder as der_decoder > from pyasn1.type import univ, constraint > from socket import _fileobject, timeout, error as SocketError > > But I get a python exception on this last line: > >

Python 3.4 problem with requests module

2016-04-08 Thread 1leefig
Hi all, I would appreciate any thoughts that you may have regarding a troublesome build error. I am at my wits end. For some strange reason a get a single error on importing. It's to do with the requests module and pyopenssl.py The comment block indicates: This needs the following packages

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread R. David Murray
R. David Murray added the comment: This is not a topic appropriate for the bug tracker. Please bring it up on python-ideas, after reviewing the PEP (which probably addresses the reason the design is the way it is, but there may be additional concerns that arise from practical experience with

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +eric.smith ___ Python tracker ___ ___

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread flying sheep
Changes by flying sheep : -- type: -> behavior versions: +Python 3.6 ___ Python tracker ___

[issue26713] Change f-literal grammar so that escaping isn’t possible or necessary

2016-04-08 Thread flying sheep
New submission from flying sheep: code inside of the braces of an f-literal should have the exact same lexing rules than outside *except* for an otherwise unparsable !, :, or } signifying the end of the replacement field 1. every other language with template literals has it that way 2. it

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 12:22 AM, Ian Kelly wrote: >> seq1 == seq2 >> seq1 < seq2 >> >> You only need ONE comparison, and the other is presumed to be its >> opposite. When, in the Python 3 version, would you need to compare >> twice? > > When there are three possible code

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Random832
On Fri, Apr 8, 2016, at 10:08, Chris Angelico wrote: > seq1 == seq2 > seq1 < seq2 > > You only need ONE comparison, and the other is presumed to be its > opposite. When, in the Python 3 version, would you need to compare > twice? == might be just as expensive as the others, particularly if the

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Chris Angelico
On Sat, Apr 9, 2016 at 12:20 AM, Antoon Pardon wrote: >> You only need ONE comparison, and the other is presumed to be its >> opposite. When, in the Python 3 version, would you need to compare >> twice? > > About 50% of the time. When I traverse the tree I go left

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Ian Kelly
On Fri, Apr 8, 2016 at 8:08 AM, Chris Angelico wrote: > On Fri, Apr 8, 2016 at 11:31 PM, Antoon Pardon > wrote: >> Doing it as follows: >> seq1 < seq2 >> seq2 < seq1 >> >> takes about 110 seconds. >> >> >> Doing it like this: >> delta =

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Antoon Pardon
Op 08-04-16 om 15:52 schreef Marko Rauhamaa: > Antoon Pardon : > >> Well having a list of 1000 Sequence like object. Each sequence >> containing between 1 and 100 numbers. Comparing each sequence >> to each other a 100 times. I get the following results. >> >> Doing

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Antoon Pardon
Op 08-04-16 om 16:08 schreef Chris Angelico: > On Fri, Apr 8, 2016 at 11:31 PM, Antoon Pardon > wrote: >> Doing it as follows: >> seq1 < seq2 >> seq2 < seq1 >> >> takes about 110 seconds. >> >> >> Doing it like this: >> delta = cmp(seq1, seq2) >>

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Ian Kelly
On Fri, Apr 8, 2016 at 3:23 AM, Steven D'Aprano wrote: > On Fri, 8 Apr 2016 06:34 pm, Marko Rauhamaa wrote: > >> Antoon Pardon : >> >>> In python2 descending the tree would only involve at most one >>> expensive comparison, because using cmp

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Chris Angelico
On Fri, Apr 8, 2016 at 11:31 PM, Antoon Pardon wrote: > Doing it as follows: > seq1 < seq2 > seq2 < seq1 > > takes about 110 seconds. > > > Doing it like this: > delta = cmp(seq1, seq2) > delta < 0 > delta > 0 > > takes about 50 seconds. Why are

[issue26693] Exception ignored in: in _shutdown, assert tlock.locked()

2016-04-08 Thread skydoom
Changes by skydoom : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Marko Rauhamaa
Antoon Pardon : > Well having a list of 1000 Sequence like object. Each sequence > containing between 1 and 100 numbers. Comparing each sequence > to each other a 100 times. I get the following results. > > Doing it as follows: > seq1 < seq2 > seq2 < seq1 > >

Re: I'd like to add -march=native to my pip builds

2016-04-08 Thread Neal Becker
Stefan Behnel wrote: > CFLAGS="-O3 -march=native" pip install --no-use-wheel Thanks, not bad. But no way to put this in a config file so I don't have to remember it, I guess? -- https://mail.python.org/mailman/listinfo/python-list

Re: I'd like to add -march=native to my pip builds

2016-04-08 Thread Stefan Behnel
Neal Becker schrieb am 08.04.2016 um 15:27: > I'd like to add -march=native to my pip builds. How can I do this? First of all, make sure you don't install binary packages and wheels. Changing the C compiler flags will require source builds. Then, it should be enough to set the CFLAGS

Re: how to convert code that uses cmp to python3

2016-04-08 Thread Antoon Pardon
Op 08-04-16 om 09:47 schreef Ben Finney: > Antoon Pardon writes: > >> But it was already working and optimized. The python3 approach forces >> me to make changes to working code and make the performance worse. > Yes, changing from Python 2 to Python 3 entails

  1   2   >