[issue26081] Implement asyncio Future in C to improve performance

2016-10-08 Thread INADA Naoki
INADA Naoki added the comment: I've committed the patch with trivial fixes (adding curly braces to if statements). And I'm sorry, I committed with wrong issue number. https://hg.python.org/cpython/rev/678424183b38 (3.6) https://hg.python.org/cpython/rev/f8815001a390 (default) I fixed NEWS

[issue26801] Fix shutil.get_terminal_size() to catch AttributeError

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 678424183b38 by INADA Naoki in branch '3.6': Issue #26801: Added C implementation of asyncio.Future. https://hg.python.org/cpython/rev/678424183b38 New changeset f8815001a390 by INADA Naoki in branch 'default': Issue #26801: Added C implementation

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file45024/webbrowser.py-2.7-newfox.patch ___ Python tracker ___

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Terry Reedy
On 10/8/2016 11:51 PM, Cai Gengyang wrote: pygame = True while not done: for event in pygame.event.get(): Traceback (most recent call last): File "", line 2, in for event in pygame.event.get(): AttributeError: 'bool' object has no attribute 'event' pygame ==

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Oleg Broytman added the comment: Remove empty args (backported from 3.4). -- Added file: http://bugs.python.org/file45027/webbrowser.py-2.7-newfox.patch ___ Python tracker

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-08 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: All tests from test_functools.py now pass. test.test_collections.TestCollectionABCs.test_ByteString() from test_collections.py still fails (as reported in msg277953). LD_LIBRARY_PATH="$(pwd)" ./python -c 'import runpy, typing;

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-08 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- Removed message: http://bugs.python.org/msg278344 ___ Python tracker ___

Re: PyQt5, OpenGL, where to start, minimal example code?

2016-10-08 Thread John Ladasky
Well, I've made some progress. My program doesn't draw any 3D objects yet, but it creates an OpenGL rendering window, binds the OpenGL functions, and generates no errors. Here's the corrected initializeGL method: def initializeGL(self): c = self.context() f =

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-08 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: All tests from test_functools.py now pass. test.test_collections.TestCollectionABCs.test_ByteString() from test_functools.py still fails (as reported in msg277953). LD_LIBRARY_PATH="$(pwd)" ./python -c 'import runpy, typing;

[issue28391] Multiple occurances of: Closing quotes separate words

2016-10-08 Thread R. David Murray
R. David Murray added the comment: Case 2 (the actual behavior) is correct. Quotes *within* words are ignored, only a leading quoted string will result in a separate word. (That's recursive: try '"Do""This""Separate). That said, we don't really care about non-posix mode, it's just there for

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-08 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks Serhiy! But sorry I think I have made a mistake. In unicode_copycharacters we don't need PyUnicode_READY since it has been done in argument parse. Could you remove it? -- stage: resolved -> patch review status: closed -> open Added file:

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Oleg Broytman added the comment: Add NewFox class to webbrowser for Py 3.4 (added raise_opts — Mozilla no longer supports autoraise). -- Added file: http://bugs.python.org/file45025/webbrowser.py-3.4-newfox.patch ___ Python tracker

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Oleg Broytman added the comment: Add NewFox class to webbrowser for Py 2.7 (added raise_opts — Mozilla no longer supports autoraise). -- Added file: http://bugs.python.org/file45024/webbrowser.py-2.7-newfox.patch ___ Python tracker

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43752/webbrowser.py-3.4-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43751/webbrowser.py-2.7-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43749/webbrowser.py-3.4-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file43748/webbrowser.py-2.7-newfox.patch ___ Python tracker ___

[issue23262] webbrowser module broken with Firefox 36+

2016-10-08 Thread Oleg Broytman
Changes by Oleg Broytman : Removed file: http://bugs.python.org/file38227/new_firefox.py ___ Python tracker ___

[issue24398] Update test_capi to use test.support.script_helper

2016-10-08 Thread Aidin Gharibnavaz
Aidin Gharibnavaz added the comment: I am working on this issue. -- nosy: +aidin36 ___ Python tracker ___ ___

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
I defined both done and pygame in this piece of code, but now i get a new error that i have never seen before, an AttributeError >>> rect_x = 50 >>> rect_y = 50 >>> done = False >>> pygame = True >>> while not done: for event in pygame.event.get(): if event.type ==

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Steve D'Aprano
On Sun, 9 Oct 2016 01:51 pm, Cai Gengyang wrote: > This is my latest result : I copy and pasted one line at a time into the > IDLE and used ONLY the "enter-return" button to move on to the next line > and this time I didnt get an indentation error but instead a traceback > error: > Traceback

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: Making it a deferred release blocker so we're reminded to do the more thorough fix before 3.6.0 rc1. -- priority: release blocker -> deferred blocker ___ Python tracker

[issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented

2016-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed by the changes for issue #28388. -- nosy: +gvanrossum resolution: -> fixed status: open -> closed ___ Python tracker

[issue28388] Update documentation for typing module

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7f2b0332343 by Guido van Rossum in branch '3.5': Adjust ClassVar example to use pre-PEP-526 syntax. (Issue #28388) https://hg.python.org/cpython/rev/d7f2b0332343 -- ___ Python tracker

[issue28388] Update documentation for typing module

2016-10-08 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28388] Update documentation for typing module

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9953efbb4974 by Guido van Rossum in branch '3.5': Issue #28388: update typing module documentation. https://hg.python.org/cpython/rev/9953efbb4974 New changeset 589e11c3489e by Guido van Rossum in branch '3.6': Issue #28388: update typing module

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-08 Thread Nick Coghlan
Nick Coghlan added the comment: Fixing the proposed format string accordingly, and also including the underlying exception type as I did in the examples: f"Error calling __set_name__ on {type(the_attr).__name__!r} instance {the_attr_name!r} in {class_being_defined.__name__!r}:

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-08 Thread Nick Coghlan
Nick Coghlan added the comment: Slight change, as it makes sense to reference the special method name explicitly: TypeError: Error calling __set_name__ on 'BadIdea' instance 'attr' in 'NotGoingToWork': 'NoneType' object is not callable TypeError: Error calling __set_name__ on

[issue28388] Update documentation for typing module

2016-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM. I have a small number of nits that I will apply when merging this. -- ___ Python tracker ___

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-08 Thread Nick Coghlan
Nick Coghlan added the comment: The following seem like a reasonable starting point to me: TypeError: Failed to set name on 'BadIdea' instance 'attr' in 'NotGoingToWork': 'NoneType' object is not callable TypeError: Failed to set name on 'FaultyImplementation' instance 'attr' in

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
This is my latest result : I copy and pasted one line at a time into the IDLE and used ONLY the "enter-return" button to move on to the next line and this time I didnt get an indentation error but instead a traceback error >>> rect_x = 50 >>> rect_y = 50 >>> while not done: for event

[issue21720] "TypeError: Item in ``from list'' not a string" message

2016-10-08 Thread Nick Coghlan
Nick Coghlan added the comment: Berker's fix for Python 2.7 looks good to me. However, Python 3 has a comparably vague error message, it's just inverted to complain about bytes rather than unicode due to the change in the native str type: >>> __import__('encodings', fromlist=[b'aliases'])

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Steve D'Aprano
On Sun, 9 Oct 2016 12:53 pm, Chris Angelico wrote: >> They're caught by identity, though - "except 'type error'" fails to >> catch TypeError, and vice versa. > > Fascinating! What about: except sys.intern('type error') ? Or does > interning of strings not exist yet :) >>> intern Unhandled

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Steve D'Aprano
On Sun, 9 Oct 2016 05:45 am, Random832 wrote: > On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote: >> The oldest version I have access to is the *extremely* primitive 0.9. Not >> surprisingly, it doesn't have xrange -- but it lacks a lot of things, >> including globals(), map(), named

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Chris Angelico
On Sun, Oct 9, 2016 at 5:45 AM, Random832 wrote: > On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote: >> The oldest version I have access to is the *extremely* primitive 0.9. Not >> surprisingly, it doesn't have xrange -- but it lacks a lot of things, >> including

[issue28391] Multiple occurances of: Closing quotes separate words

2016-10-08 Thread Arno-Can Uestuensoez
New submission from Arno-Can Uestuensoez: I am currently writing an extended options scanner including shlex-compatibility mode. So including numerous extended unittests for compatibility verification. I am not sure whether the following behaviour of shlex.split() is correct: Quote from

[issue26081] Implement asyncio Future in C to improve performance

2016-10-08 Thread Yury Selivanov
Yury Selivanov added the comment: I quickly looked over the patch and I think it's good. If anything we still have time to hunt down any bugs or even revert this before 3.6 final. INADA, feel free to commit it before Monday to 3.6 and default branches. --

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Gregory Ewing
Cai Gengyang wrote: Somehow it still doesnt work --- it keeps giving the syntaxerror, inconsistent use of tabs and indentation message EVEN though i use only the enter and space buttons and never touched the tab button a single time. There was another thread about this a short time ago. It

delete pixel from the raster image with specific range value

2016-10-08 Thread chrischris201444
any idea how to delete pixel from the raster image with specific range value using numpy/scipy or gdal? for example i have a raster image with the 5 class : 1. 0-100 2. 100-200 3. 200-300 4. 300-500 5. 500-1000 and i want to delete class 1 range value or maybe class 1,2,4,5 --

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Terry Reedy
On 10/8/2016 2:56 AM, Steve D'Aprano wrote: Just copy and paste it into your Python IDLE and let me know what you get I don't normally use IDLE, and you shouldn't assume that everyone does. *That* is the extra information we need to solve the problem: The IDLE interactive interpreter in

[issue27170] IDLE: remove Toggle Auto Coloring or add to edit menu & doc

2016-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Toggling syntax highlighting is part of #6858. Adding it to menu and doc is part of #28097 -- assignee: -> terry.reedy components: +IDLE -2to3 (2.x to 3.x conversion tool) resolution: -> duplicate stage: test needed -> resolved status: open ->

[issue28097] IDLE: document all key bindings, add menu items for more.

2016-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The toggle highlighting issue is #27170 (not 27120) -- ___ Python tracker ___

[issue26081] Implement asyncio Future in C to improve performance

2016-10-08 Thread INADA Naoki
INADA Naoki added the comment: Now I understand tp_dealloc, tp_finalize and subtype_dealloc. Attached patch passes tests. -- Added file: http://bugs.python.org/file45023/fastfuture4.patch ___ Python tracker

[issue26171] heap overflow in zipimporter module

2016-10-08 Thread Ned Deily
Changes by Ned Deily : -- priority: release blocker -> versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue26171] heap overflow in zipimporter module

2016-10-08 Thread Ned Deily
Ned Deily added the comment: Parvesh, we only maintain the latest micro release of a release cycle; for 2.7, that is currently 2.7.12. In other words, once 2.7.9 was released, 2.7.8 was no longer supported by us (although, of course, downstream distributors of Cpython can choose to backport

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13addd71b751 by Serhiy Storchaka in branch '3.5': Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). https://hg.python.org/cpython/rev/13addd71b751 -- nosy: +python-dev ___

[issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z

2016-10-08 Thread Steve Dower
Steve Dower added the comment: I didn't see your patch, but I made basically the same fix and added a test. -- status: open -> closed ___ Python tracker

[issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d4aefa52f49 by Steve Dower in branch '3.6': Issue #28162: Fixes Ctrl+Z handling in console readall() https://hg.python.org/cpython/rev/4d4aefa52f49 New changeset 947fa496ca6f by Steve Dower in branch 'default': Issue #28162: Fixes Ctrl+Z handling

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-08 Thread Steve Dower
Steve Dower added the comment: I made some minor tweaks to the patch (no need for strlen() - passing -1 works equivalently), but otherwise it's exactly what I would have done so I committed it. We currently have no tests to check which characters are written to a console output buffer.

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63ceadf8410f by Steve Dower in branch '3.6': Issue #28333: Remove unnecessary increment. https://hg.python.org/cpython/rev/63ceadf8410f New changeset d76c8f9ea787 by Steve Dower in branch 'default': Issue #28333: Remove unnecessary increment.

[issue23578] struct.pack error messages do not indicate which argument was invalid

2016-10-08 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy (C) stage: -> needs patch versions: +Python 3.7 -Python 2.7, Python 3.4 ___ Python tracker

[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset faf5493e6f61 by Steve Dower in branch '3.6': Issue #28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk Sun) https://hg.python.org/cpython/rev/faf5493e6f61 New changeset cb62e921bd06 by Steve Dower in branch 'default': Issue

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset ee049edc3fff by Serhiy Storchaka in branch '3.5': Issue #28376: Fixed typos. https://hg.python.org/cpython/rev/ee049edc3fff New changeset e486f3d30e0e by Serhiy Storchaka in branch '3.5': Issue #28376: The constructor of range_iterator now checks

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Oren. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Random832
On Sat, Oct 8, 2016, at 07:29, Steve D'Aprano wrote: > The oldest version I have access to is the *extremely* primitive 0.9. Not > surprisingly, it doesn't have xrange -- but it lacks a lot of things, > including globals(), map(), named exceptions, "" strings ('' is okay), > exponentiation, and

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Random832
On Sat, Oct 8, 2016, at 06:12, BartC wrote: > The OP's code however is a good demonstration of how crazy Python's > original for-range loop was: you need to construct a list of N elements > just to be able to count to N. How many years was it until xrange was > introduced? Python 1.4 had it,

[issue15332] 2to3 should fix bad indentation (or warn about it)

2016-10-08 Thread R. David Murray
R. David Murray added the comment: Agreed. -tt is designed for this job; there's no need for 2to3 to duplicate the functionality given that reindent.py exists and can be (and "should" be) applied to the python2 source even if you aren't doing single-source. -- nosy: +r.david.murray

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Oren Milman added the comment: Alright, just added 'with test.support.check_warnings(('', DeprecationWarning)):'. *ver4.diff is attached. I ran the tests again (this time using 'python_d.exe -We -m test -j3'), and they were successful :) That was totally my bad, of course, but anyway, ISTM

[issue27998] Bytes paths now are supported in os.scandir() on Windows

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now it is documentation issue again. -- keywords: -patch priority: release blocker -> normal stage: patch review -> needs patch ___ Python tracker

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread breamoreboy
On Saturday, October 8, 2016 at 12:07:47 PM UTC+1, Rustom Mody wrote: > On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote: > > This is the result when I copy and paste it one line at a time : > > > > >>> rect_x = 50 > > >>> rect_y = 50 > > >>> while not done:

[issue27998] Bytes paths now are supported in os.scandir() on Windows

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ed634870a9a by Serhiy Storchaka in branch '3.6': Issue #27998: Fixed bytes path support in os.scandir() on Windows. https://hg.python.org/cpython/rev/4ed634870a9a New changeset 837114dea493 by Serhiy Storchaka in branch 'default': Issue #27998:

Re: define variables in the txt file using python

2016-10-08 Thread Peter Otten
Xristos Xristoou wrote: > Τη Σάββατο, 8 Οκτωβρίου 2016 - 12:25:28 π.μ. UTC+3, ο χρήστης Xristos > Xristoou έγραψε: >> hello >> >> >> i have one .txt file and i want to create python script with sys.argv or >> argparse or other package to define some variables in the txt file and i >> take some

[issue27998] Bytes paths now are supported in os.scandir() on Windows

2016-10-08 Thread Eryk Sun
Eryk Sun added the comment: With the patch I uploaded, test_glob and test_os BytesWalkTests both pass, in both Windows 10 and Linux. Without it those tests fail for me in Windows 10. -- ___ Python tracker

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Oren. Patches for 3.5 and 3.7 LGTM, the patch for 3.6 should be fixed. Tests should pass with -Wa and -We. No need to attach test output. Just check that your patch doesn't add a regression. -- ___ Python

[issue27998] Bytes paths now are supported in os.scandir() on Windows

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Eryk. The patch LGTM. Did you tested that it fixes tests? -- ___ Python tracker ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45021/patchedCPython37TestOutput_ver3.txt ___ Python tracker ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45019/issue28376_CPython37_ver3.diff ___ Python tracker ___

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Oren Milman added the comment: The diff files for 3.6 and 3.7 are attached (named '*ver3.diff'). Changes: - in 3.6, added: * raising a DeprecationWarning in rangeiter_new * a test to verify the DeprecationWarning is raised - in 3.7: * changed the tests so they

[issue28376] rangeiter_new fails when creating a range of step 0

2016-10-08 Thread Oren Milman
Changes by Oren Milman : Added file: http://bugs.python.org/file45020/patchedCPython36TestOutput_ver3.txt ___ Python tracker ___

[issue27998] Bytes paths now are supported in os.scandir() on Windows

2016-10-08 Thread Eryk Sun
Eryk Sun added the comment: Here's an alternative patch, using PyUnicode_FSDecoder. It also adds path_object_error and path_object_error2 helper functions. -- Added file: http://bugs.python.org/file45017/issue_27998_01.patch ___ Python tracker

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Berker Peksag
Changes by Berker Peksag : -- type: crash -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker ___

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Attila Vangel
Attila Vangel added the comment: It's my pleasure. It was somewhat similar: - the set_proxy() is the same - for the make_connection() I gave the necessary clues, so one can create the code and you can use that in a way that I don't have to spend time on the PSF Contributor Agreement -

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks. I guess your solution was similar to the attached patch? -- keywords: +patch stage: -> patch review type: crash -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 Added file: http://bugs.python.org/file45016/issue28389.diff

[ANN] aioxmpp 0.7.1 (sic!) released

2016-10-08 Thread Jonas Wielicki
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Dear subscribers, I am pleased to announce the release of aioxmpp 0.7.1 (footnote 1). The current release can be obtained from GitHub [1] (check out the v0.6.0 tag or the master branch) or PyPI [2]. The HTML documentation can be found at [3].

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
Somehow it still doesnt work --- it keeps giving the syntaxerror, inconsistent use of tabs and indentation message EVEN though i use only the enter and space buttons and never touched the tab button a single time. Im pretty sure there is something wrong with the program itself. Gonna download

[issue26906] Special method lookup fails on uninitialized types

2016-10-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: Special method lookup fails on unitialized types -> Special method lookup fails on uninitialized types ___ Python tracker

[issue25720] Fix curses module compilation with ncurses6

2016-10-08 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Added comment in review. Yen, I tried to build without curses.h file (overwrite to ncurses.h). It was failed on checking header. Hence, I confirmed curses headers on Cygwin and Ubuntu. I found out that curses.h includes the directive "#include ". And

Re: define variables in the txt file using python

2016-10-08 Thread Xristos Xristoou
Τη Σάββατο, 8 Οκτωβρίου 2016 - 12:25:28 π.μ. UTC+3, ο χρήστης Xristos Xristoou έγραψε: > hello > > > i have one .txt file and i want to create python script with sys.argv or > argparse or other package to define some variables in the txt file and i take > some result. > > > > txt file

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, but it looks to me that issue28385.diff solves wrong issue. The issue is not in bytes, but in default __format__. object.__format__ should raise an error message that contains the name of the actual type. There are other issues with

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: I left a comment on Rietveld, but repeating it here because for me those messages often go to spam: I think you want to make this more general, by modifying the message for the TypeError that follows. Any type that doesn't provide it's own __format__ should

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Attila Vangel
Attila Vangel added the comment: Hi, thx for the quick turnaround. I tried the proxy.py (on python 3.5) of course replacing 'YOUR_PROXY' with '10.144.1.11:8080' according to my environment. python3 proxy.py Traceback (most recent call last): File "proxy.py", line 27, in

[issue28390] Wrong heading levels in whatsnew/3.6

2016-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3ee15bd35902 by Berker Peksag in branch '3.6': Issue #28390: Fix header levels in whatsnew/3.6.rst https://hg.python.org/cpython/rev/3ee15bd35902 New changeset 43b1b3c883ff by Berker Peksag in branch 'default': Issue #28390: Merge from 3.6

[issue28390] Wrong heading levels in whatsnew/3.6

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

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. Can you try the attached script? -- nosy: +berker.peksag Added file: http://bugs.python.org/file45014/proxy.py ___ Python tracker

[issue28390] Wrong heading levels in whatsnew/3.6

2016-10-08 Thread SilentGhost
New submission from SilentGhost: Couple of headings in whatsnew/3.6.rst have wrong level. The patch fixes this. -- assignee: docs@python components: Documentation files: headings.diff keywords: patch messages: 278296 nosy: SilentGhost, docs@python priority: normal severity: normal

[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-10-08 Thread INADA Naoki
INADA Naoki added the comment: Could someone review this before 3.6b2? Without this patch, python-gdb.py causes many RuntimeError. -- keywords: +needs review stage: -> patch review ___ Python tracker

[issue26081] Implement asyncio Future in C to improve performance

2016-10-08 Thread INADA Naoki
INADA Naoki added the comment: Fixed overriding Future._repr_info(). But I failed to implement overridable Future.__del__ in C yet. (FYI, fastfuture2.patch passes tests by mix-in __del__ and __repr__) -- Added file: http://bugs.python.org/file45012/fastfuture3.patch

[issue28385] Bytes objects should reject all formatting codes with an error message

2016-10-08 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch. Changes in test_builtin might be redundant, but I added them anyway. -- keywords: +patch nosy: +berker.peksag stage: needs patch -> patch review Added file: http://bugs.python.org/file45011/issue28385.diff

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Attila Vangel
Attila Vangel added the comment: I tested it also on Python 3.4.3. I got the same error. -- ___ Python tracker ___

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Attila Vangel
Changes by Attila Vangel : -- versions: +Python 3.4 ___ Python tracker ___ ___

[issue28389] xmlrpc.client HTTP proxy example code does not work

2016-10-08 Thread Attila Vangel
New submission from Attila Vangel: Go to https://docs.python.org/3/library/xmlrpc.client.html Under '21.26.8. Example of Client Usage' -> 'To access an XML-RPC server through a HTTP proxy, you need to define a custom transport. The following example shows how:' copy the example code to a .py

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Alain Ketterlin
meInvent bbird writes: > how to refactor nested for loop into smaller for loop assume each of them > independent? > > because memory is not enough > > for ii in range(1,2000): > for jj in range(1,2000): > for kk in range(1,2000): > print run(ii,jj,kk) n = 0 while n

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Steve D'Aprano
On Sat, 8 Oct 2016 09:12 pm, BartC wrote: > The OP's code however is a good demonstration of how crazy Python's > original for-range loop was: you need to construct a list of N elements > just to be able to count to N. How many years was it until xrange was > introduced? Python 1.4 (that's 1996)

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread BartC
On 08/10/2016 11:54, Chris Angelico wrote: On Sat, Oct 8, 2016 at 9:12 PM, BartC wrote: On 08/10/2016 11:03, Chris Angelico wrote: On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird wrote: how to refactor nested for loop into smaller for loop assume each

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Rustom Mody
On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote: > This is the result when I copy and paste it one line at a time : > > >>> rect_x = 50 > >>> rect_y = 50 > >>> while not done: > >>> > for event in ...

[issue26906] Special method lookup fails on unitialized types

2016-10-08 Thread Oren Milman
Oren Milman added the comment: (Just to save time for anyone interested) The last demonstration of the bug Serhiy mentioned is caused by the following (this was right only until Serhiy's patch earlier today): - before importing collections.abc, str_iterator is not initialized, which means:

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread Chris Angelico
On Sat, Oct 8, 2016 at 9:12 PM, BartC wrote: > On 08/10/2016 11:03, Chris Angelico wrote: >> >> On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird >> wrote: >>> >>> how to refactor nested for loop into smaller for loop assume each of them >>> independent? >>>

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What error messages you want for these cases? -- ___ Python tracker ___

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-08 Thread BartC
On 08/10/2016 11:03, Chris Angelico wrote: On Sat, Oct 8, 2016 at 8:58 PM, meInvent bbird wrote: how to refactor nested for loop into smaller for loop assume each of them independent? because memory is not enough for ii in range(1,2000): for jj in range(1,2000): for

  1   2   >