[issue28340] TextIOWrapper.tell extremely slow

2016-10-02 Thread Rob Malouf
New submission from Rob Malouf: io.TextIOWrapper.tell() is unusably slow in Python 2.7. This same problem was introduced in Python 3 and fixed in Python 3.3 (see Issue # 4). Any chance of getting the fix backported into the Python 2.7 library? It would make it much easier to modernize

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

2016-10-02 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry about that. I haven't looked into this but I suspect this is due to some manipulation of the ABC registry by typing.py that exceed their intended scope. I'll ask Ivan to fix it; if he's not available before b2 goes out I'll roll this back. --

[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: Uploaded refleak_5.patch with a simpler test case. With the patch applied, './python -m test -R 3:3 test_pdb' runs with success. The '_previous_sigint_handler' is reset at the Pdb prompt - instead of when the signal is triggered - to handle the case where pdb

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Michael Felt
On 02/10/2016 19:01, Ned Batchelder wrote: On Saturday, October 1, 2016 at 9:25:57 PM UTC-4, Michael Felt wrote: Finally, I got to where I understood what needed to be done to get both Mercurial built - and the the new SSL requirements met. So, running: # hg clone

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Additional tests are always nice. Thank you for your report and your patch Xiang. -- ___ Python tracker ___

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

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

2016-10-02 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis: Commits 09cc43df4509 (3.5), 81f27d3ab214 (3.6), 8f0df4db2b06 (3.7) cause "TypeError: Parameterized generics cannot be used with class or instance checks" errors in 4 tests in Lib/test/test_functools.py file in situation when typing

[issue28225] bz2 does not support pathlib

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Michael Felt
On 02/10/2016 08:34, Terry Reedy wrote: No. By default, the working directory for a clone is for the default branch. Any clone can be 'updated' to any branch. I have each share clone updated to a different branch, so I never update to a different branch. -- This answers my underlying

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Ned Batchelder
On Saturday, October 1, 2016 at 9:25:57 PM UTC-4, Michael Felt wrote: > Finally, I got to where I understood what needed to be done to get both > Mercurial built - and the the new SSL requirements met. > > So, running: > > # hg clone https://hg.python.org/cpython > > works. What is the next

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac838bf5499d by Serhiy Storchaka in branch '3.5': Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4(). https://hg.python.org/cpython/rev/ac838bf5499d New changeset 3efeafc6517a by Serhiy Storchaka in branch '3.6': Issue

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The remaining question is what should be the type of the exception. ValueError is documented exception, but SystemError is actually raised exception (and it always was raised). PyUnicode_AsUCS4() is used 6 times in 3 files in CPython code, and it should

working with ctypes and complex data structures

2016-10-02 Thread Michael Felt
I am trying to understand the documentation re: ctypes and interfacing with existing libraries. I am reading the documentation, and also other sites that have largely just copied the documentation - as well as the "free chapter" at O'Reilly (Python Cookbook). I am missing anything on

Re: Need help for the print() function with a better order

2016-10-02 Thread Peter Pearson
On Sat, 1 Oct 2016 18:12:29 -0700 (PDT), 38016226...@gmail.com wrote: > I am trying to print a simple decision tree for my homework. > The answer must keep in this format: > > Top 7,4,0.95 > career gain = 100 > 1.Management 2, 3, 0.9709505944546686 > 2.Service 5, 1, 0.6500224216483541

[issue28229] lzma does not support pathlib

2016-10-02 Thread Berker Peksag
New submission from Berker Peksag: Here's an updated patch that adds more tests and documentation changes. -- components: +Library (Lib) nosy: +berker.peksag Added file: http://bugs.python.org/file44938/issue28229_v2.diff ___ Python tracker

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang
Xiang Zhang added the comment: Yes. Changing the implementation or the doc is still in question so in the title I just use conflicts. Scanning unicodeobject.c there seems no general rules about which to use. But actually I'm in favour of ValueError. From the description in

[issue28286] gzip guessing of mode is ambiguilous

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Or maybe FutureWarning is better than DeprecationWarning. -- Added file: http://bugs.python.org/file44939/gzip_deprecate_implicit_write2.patch ___ Python tracker

[issue26906] format(object.__reduce__) fails intermittently

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one similar bug: issue11702. -- ___ Python tracker ___ ___

Re: announcing fython

2016-10-02 Thread nicolasessisbreton
>One problem with using very similar syntax for distinct languages is that it >can get confusing. The first inspiration for Fython was to be close to Fortran, while improving the syntax. The project is in the early days, so all suggestions are welcome. Some difference to the Python language are

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang
Xiang Zhang added the comment: Serhiy, in 05788a9a0b88, test_invalid_sequences seems don't have to stay in CAPITest. -- ___ Python tracker ___

Re: Need help for the print() function with a better order

2016-10-02 Thread 380162267qq
在 2016年10月2日星期日 UTC-4下午1:05:58,Peter Pearson写道: > On Sat, 1 Oct 2016 18:12:29 -0700 (PDT), 38016226...@gmail.com wrote: > > I am trying to print a simple decision tree for my homework. > > The answer must keep in this format: > > > > Top 7,4,0.95 > > career gain = 100 > > 1.Management 2, 3,

[issue16399] argparse: append action with default list adds to list instead of overriding

2016-10-02 Thread Michał Klich
Michał Klich added the comment: The documentation for argparse still does not mention this behaviour. I decided to make a patch based no the optparse issue. Hopefully it is good enough to be merged. -- keywords: +patch nosy: +michal.klich Added file:

[issue28335] Exception reporting in `logging.config`

2016-10-02 Thread sreyas
Changes by sreyas : -- keywords: +patch Added file: http://bugs.python.org/file44935/raisefrom.patch ___ Python tracker

[issue28335] Exception reporting in `logging.config`

2016-10-02 Thread Ram Rachum
Ram Rachum added the comment: Thanks for the patch sreyas! Maybe we should also take this opportunity to remove the string formatting from the exception that shows the name of the original exception? Because when you think about it, it's just a poor man's `raise from`. --

[issue28225] bz2 does not support pathlib

2016-10-02 Thread Berker Peksag
Berker Peksag added the comment: Here's an updated patch. -- Added file: http://bugs.python.org/file44937/issue28225_v2.diff ___ Python tracker ___

[issue28128] Improve the warning message for invalid escape sequences

2016-10-02 Thread Emanuel Barry
Emanuel Barry added the comment: Ping. I'd like for this to get merged in beta 2; should I (or Eric if he wants to) get to work on this? Is the DeprecatedSyntaxWarning subclass route still desired? -- ___ Python tracker

[issue25699] Easier way to specify reduced globals for doctest

2016-10-02 Thread John Mark Vandenberg
John Mark Vandenberg added the comment: pyflakes does assume doctest run with a copy of the module scope. However when there is an __all__, the module scope as seen by other modules 'should' be only items in __all__. If a doctest is included in documentation, it 'should' only use names that

Re: SOAP XML webserver in Python/Django

2016-10-02 Thread ivan77
Thank you for the info dieter. I'll take a look at your suggestions. -- https://mail.python.org/mailman/listinfo/python-list

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

2016-10-02 Thread blue
You have here a PyQt5 Reference Guide http://pyqt.sourceforge.net/Docs/PyQt5/index.html Some example can be found here 4 and 5 http://codeprogress.com/python/libraries/pyqt/ Support for OpenGL http://pyqt.sourceforge.net/Docs/PyQt5/opengl.html told us: When compiled against Qt v5.1 or later,

Re: Learning python data types

2016-10-02 Thread Rustom Mody
On Monday, October 3, 2016 at 3:38:24 AM UTC+5:30, Crane Ugly wrote: > I am not new in scripting in general. > And about a year I create scripts in python, but my approach was always based > on my habits from UNIX shell, where data types are not obvious. > Going deeper with python I see necessity

Re: working with ctypes and complex data structures

2016-10-02 Thread eryk sun
On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt wrote: > > a) where is documentation on "CField"'s? It's undocumented. A CField is a data descriptor that accesses a struct field with the given type, size, and offset. Like most descriptors, it's meant to be accessed as an

[issue16399] argparse: append action with default list adds to list instead of overriding

2016-10-02 Thread paul j3
paul j3 added the comment: One thing that this default behavior does is allow us to append values to any object, just so long as it has the `append` method. The default does not have to be a standard list. For example, in another bug/issue someone asked for an `extend` action. I could

[issue28225] bz2 does not support pathlib

2016-10-02 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28225] bz2 does not support pathlib

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset fc0c244c6e79 by Berker Peksag in branch '3.6': Issue #28225: bz2 module now supports pathlib https://hg.python.org/cpython/rev/fc0c244c6e79 New changeset 0e9b77424d10 by Berker Peksag in branch 'default': Issue #28225: Merge from 3.6

Re: inplace text filter - without writing file

2016-10-02 Thread MRAB
On 2016-10-02 06:33, Sayth Renshaw wrote: On Sunday, 2 October 2016 16:19:14 UTC+11, Sayth Renshaw wrote: On Sunday, 2 October 2016 12:14:43 UTC+11, MRAB wrote: > On 2016-10-02 01:21, Sayth Renshaw wrote: > > Hi > > > > I have a fileobject which was fine however now I want to delete a line

[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Thanks Xiang. -- ___ Python tracker ___ ___ Python-bugs-list

scipy tutorial question

2016-10-02 Thread Xristos Xristoou
hello i want to follow this scipy tutorial http://www2.geog.ucl.ac.uk/~plewis/geogg122-2011-12/dem2.html to calculate slope/aspect and more. first question,this is a good way to calculate slope/aspect with scipy ? can i find more easy way for this calculate ? second question and most

[issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0

2016-10-02 Thread Skip Montanaro
Changes by Skip Montanaro : -- title: cpython tip fails to build on Mac OS X -> cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0 ___ Python tracker

[issue10716] Modernize pydoc to use better HTML and separate CSS

2016-10-02 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 7:56 PM, Chris Angelico wrote: > On Sun, Oct 2, 2016 at 10:47 AM, Cem Karan wrote: >> Cool, thank you! Quick experimentation suggests that I don't need to worry >> about marking anything for garbage collection, correct? The next

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 7:34 PM, breamore...@gmail.com wrote: > On Saturday, October 1, 2016 at 11:57:17 PM UTC+1, Cem Karan wrote: >> Hi all, I've all of a sudden gotten interested in the CPython interpreter, >> and started trying to understand how it ingests and runs byte code. I found >>

[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Ned Deily
Ned Deily added the comment: This is likely a duplicate of issues like #27126 and #13829. In #24273 there is a suggested workaround: set environment variable "no_proxy" to "*". http://bugs.python.org/issue24273#msg243963 -- nosy: +ned.deily resolution: -> duplicate superseder: ->

[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2016-10-02 Thread Rogério Nunes Wolff
Rogério Nunes Wolff added the comment: I find this bug recently in my IDLE. Ubuntu 14.04, Python 3.4.3, Tk 8.6.1. How can I fix this? -- nosy: +rogeriowolff ___ Python tracker

[issue26906] format(object.__reduce__) fails intermittently

2016-10-02 Thread Guido van Rossum
Guido van Rossum added the comment: Serhiy -- please do what do you think we should do. At this point I'm open to just about anything, but I don't feel comfortable creating or reviewing patches any more. -- assignee: gvanrossum -> serhiy.storchaka

[issue8145] Documentation about sqlite3 isolation_level

2016-10-02 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28341] cpython tip fails to build on Mac OS X

2016-10-02 Thread Skip Montanaro
New submission from Skip Montanaro: Just trying an infrequent update of tip (last time seems to have been early July), I get a link error on my Mac: % make ./Programs/_freeze_importlib \ ./Lib/importlib/_bootstrap.py Python/importlib.h dyld: lazy symbol binding failed: Symbol not

[issue16399] argparse: append action with default list adds to list instead of overriding

2016-10-02 Thread paul j3
paul j3 added the comment: It may help to know something about how defaults are handled - in general. `add_argument` and `set_defaults` set the `default` attribute of the Action (the object created by `add_argument` to hold all of its information). The default `default` is `None`. At the

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
On Oct 1, 2016, at 8:30 PM, Ned Batchelder wrote: > On Saturday, October 1, 2016 at 7:48:09 PM UTC-4, Cem Karan wrote: >> Cool, thank you! Quick experimentation suggests that I don't need to worry >> about marking anything for garbage collection, correct? The next

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

2016-10-02 Thread John Ladasky
Hi there, I am making my first attempt at 3D rendering. My system configuration: OS : Ubuntu 16.04 64-bit Python : 3.5.1 Qt : 5.5.1 PyQt : 5.5.1 OpenGL : 4.5.0 (I have a modern GPU) All software was installed from the Canonical repository. I didn't build any binaries myself. >From

Re: unintuitive for-loop behavior

2016-10-02 Thread Steve D'Aprano
On Sun, 2 Oct 2016 05:35 pm, Jussi Piitulainen wrote: [...] >> I'm sorry, I don't understand what you mean by "Python semantics" versus >> "a translation". A translation of what? In what way is it "magical >> semantics"? I see nothing magical in your code: it is Python code. > > "Python

Re: unintuitive for-loop behavior

2016-10-02 Thread Steve D'Aprano
On Sun, 2 Oct 2016 09:41 pm, Chris Angelico wrote: > The only way to prove that something is a new binding is to > demonstrate that, when this binding is removed, a previous one becomes > visible. In Python, that only ever happens across namespaces, and in > CPython, the only way I can make it

[issue11702] dir on return value of msilib.OpenDatabase() crashes python

2016-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is a generic issue as there are multiple unready types that can raise (or in this case crash) with code that should work. #26906 gives other examples and discussion of possible generic solutions that would make this issue obsolete. -- nosy:

[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Alexander Mohr
Alexander Mohr added the comment: interestingly I haven't been able to get this to crash in a separate test app. There must be either timing related to some interaction with another module. let me know how you guys would like to proceed. I can definitely reproduce it consistently in our

[issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0

2016-10-02 Thread Ned Deily
Ned Deily added the comment: There are various reports about Xcode 8.0 providing a 10.12 SDK which will include refs to symbols not available yet on 10.11. Try installing the command line tools via: $ xcode-select --install and doing a "make distclean" and then a complete configure and

Learning python data types

2016-10-02 Thread Crane Ugly
I am not new in scripting in general. And about a year I create scripts in python, but my approach was always based on my habits from UNIX shell, where data types are not obvious. Going deeper with python I see necessity to know better data types, differences between them and most importantly

Re: Byte code descriptions somewhere?

2016-10-02 Thread Cem Karan
I kind of got the feeling that was so from reading the docs in the source code. Too bad! :( Cem On Oct 1, 2016, at 7:53 PM, Paul Rubin wrote: > Cem Karan writes: >> how do I create a stream of byte codes that can be interpreted by >> CPython

[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Alexander Mohr
New submission from Alexander Mohr: I have a unittest which spawns several processes repeatedly. One of these subprocesses uses botocore, which itself uses the above two methods through the calls proxy_bypass and getproxies. It seems after re-spawning the methods a few times the titled

Re: Byte code descriptions somewhere?

2016-10-02 Thread Chris Angelico
On Mon, Oct 3, 2016 at 9:58 AM, Cem Karan wrote: >> To execute your own code, look at types.FunctionType and >> types.CodeType, particularly the latter's 'codestring' argument >> (stored as the co_code attribute). Be careful: you can easily crash >> CPython if you mess this

[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Ned Deily
Changes by Ned Deily : -- status: open -> pending ___ Python tracker ___ ___

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-10-02 Thread Mingye Wang (Arthur2e5)
New submission from Mingye Wang (Arthur2e5): Microsoft's cp936 defines a euro sign at 0x80, but Python would kick the bucket when asked to do something like `u'\u20ac'.encode('cp936')`. This may break things for zh-hans-cn windows users who wants to put a euro sign in their file name (if they

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

2016-10-02 Thread John Ladasky
On Sunday, October 2, 2016 at 7:21:15 PM UTC-7, blue wrote: > You have here a PyQt5 Reference Guide > http://pyqt.sourceforge.net/Docs/PyQt5/index.html > Some example can be found here 4 and 5 > http://codeprogress.com/python/libraries/pyqt/ That's a nice page of examples, but there are no

[issue24036] GB2312 codec is using a wrong covert table

2016-10-02 Thread Mingye Wang
Mingye Wang added the comment: > Advice for final user: This seems something worthy of adding to the codecs doc as a footnote. Perhaps something like "(deprecated) ... gb2312 is an obsolete encoding from the 1980s. Use gbk or gb18030 instead." will do. > libiconv-1.14 is also using the wrong

Re: announcing fython

2016-10-02 Thread Denis Akhiyarov
On Sunday, October 2, 2016 at 10:57:57 AM UTC-5, nicolases...@gmail.com wrote: > >One problem with using very similar syntax for distinct languages is that it > >can get confusing. > > The first inspiration for Fython was to be close to Fortran, while improving > the syntax. The project is in

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

2016-10-02 Thread Guido van Rossum
Guido van Rossum added the comment: Offline, Ivan and I have discussed a solution. We can make a small incision in typing.py that will fix this, at the cost of still allowing isinstance()/issubclass()). We also have a slightly better quick fix in mind. Ultimately we will have a more complex

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

2016-10-02 Thread John Ladasky
On Sunday, October 2, 2016 at 7:45:50 PM UTC-7, Lawrence D’Oliveiro wrote: > On Monday, October 3, 2016 at 2:14:13 PM UTC+13, John Ladasky wrote: > > > > I am making my first attempt at 3D rendering. > > Bear in mind there are two kinds of 3D rendering: realtime (with OpenGL) and >

[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2016-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I ran into this again. Raising priority. -- priority: normal -> high title: IDLE not displaying RecursionError tracebacks -> IDLE not displaying RecursionError tracebacks and hangs versions: +Python 3.7 ___ Python

Locals [was Re: unintuitive for-loop behavior]

2016-10-02 Thread Steven D'Aprano
On Monday 03 October 2016 12:42, Steve D'Aprano wrote: > Yes the local would have been created, but you wouldn't see it from an > ordinary lookup of name x. You would need to use > > locals()['x'] > > to see that it exists. For x to return it, you have to convince the compiler > to use

Re: Locals [was Re: unintuitive for-loop behavior]

2016-10-02 Thread Chris Angelico
On Mon, Oct 3, 2016 at 3:09 PM, Steven D'Aprano wrote: > But if it did, then just as in the similar situation in IronPython and Jython, > you would still need to convince the compiler to use LOAD_FAST or equivalent > in > order to see it. Hence: > > > x = y

Re: unintuitive for-loop behavior

2016-10-02 Thread Jussi Piitulainen
Steve D'Aprano writes: > On Sun, 2 Oct 2016 05:35 pm, Jussi Piitulainen wrote: > > [...] >>> I'm sorry, I don't understand what you mean by "Python semantics" versus >>> "a translation". A translation of what? In what way is it "magical >>> semantics"? I see nothing magical in your code: it is

[issue28264] Turtle.onclick events blocked by Turtle.stamp

2016-10-02 Thread George Fagin
George Fagin added the comment: When you say "left click always moves the turtle" I fear my explanation was not clear enough. A left click always moves the turtle in my version as well. What changes when stamp is activated is that OnClick events are not issued when you click on the turtle.

[issue28322] chain.__setstate__ Type Confusion

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 258ebc539b2e by Serhiy Storchaka in branch '3.5': Issue #28322: Fixed possible crashes when unpickle itertools objects from https://hg.python.org/cpython/rev/258ebc539b2e New changeset c4937d066a8e by Serhiy Storchaka in branch '3.6': Issue #28322:

[issue20254] Duplicate bytearray test on test_socket.py

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6406322f4749 by Berker Peksag in branch '3.5': Issue #20254: Fix duplicate tests in test_socket https://hg.python.org/cpython/rev/6406322f4749 New changeset ac9734540eb7 by Berker Peksag in branch '3.6': Issue #20254: Merge from 3.5

[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: unintuitive for-loop behavior

2016-10-02 Thread Jussi Piitulainen
Steve D'Aprano writes: > On Sun, 2 Oct 2016 11:44 am, Gregory Ewing wrote: > >> Steve D'Aprano wrote: >> >>> Certainly when you call a function, the local bindings need to be >>> created. Obviously they didn't exist prior to calling the function! >>> I didn't think that was the difference you

[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: The problem may still be reproduced by running the attached pdb_refleak.py script. Enter three times 'c' (short for the pdb 'continue' command) and the following line is printed: pdb 3 -> pdb 2 -> pdb 1 This shows that the third pdb instance 'pdb 3',

[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag
Berker Peksag added the comment: I've addressed all of Serhiy's review comments. Thanks! -- Added file: http://bugs.python.org/file44926/issue28227_v2.diff ___ Python tracker

[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: Oh, test_pdb does not fail anymore in refleak mode as expected (see msg212510 for the change to apply to test_pdb.py in order to reproduce that). 'hg bisect' says that this is happening since: The first bad revision is: changeset:

[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: > And indeed, this changeset has removed entirely the doctests from the test > suite :( Entered new issue 28338. -- ___ Python tracker

[issue28338] test_pdb doctests have been removed from its test suite

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7fe1f23ec60a by Xavier de Gaye in branch '3.6': Issue #28338: Restore test_pdb doctests. https://hg.python.org/cpython/rev/7fe1f23ec60a New changeset d23ac799fe83 by Xavier de Gaye in branch 'default': Issue #28338: Merge from 3.6.

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyType_Ready() should be called for unpackiter_type. See also issue26906. -- nosy: +serhiy.storchaka resolution: fixed -> stage: resolved -> status: closed -> open ___ Python tracker

[issue26906] format(object.__reduce__) fails intermittently

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Similar bug just was introduced in issue21124. -- priority: normal -> high versions: +Python 3.7 ___ Python tracker

[issue28227] gzip does not support pathlib

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You missed one my comment. GzipFile.name is not converted in write mode. -- ___ Python tracker ___

[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset e2d4e077cfb2 by Berker Peksag in branch '3.6': Issue #27358: Fix typo in error message https://hg.python.org/cpython/rev/e2d4e077cfb2 New changeset 9abb316f1593 by Berker Peksag in branch 'default': Issue #27358: Merge from 3.6

Re: unintuitive for-loop behavior

2016-10-02 Thread Marko Rauhamaa
Jussi Piitulainen : > I could have just posted that yes, it *could* be done, there's nothing > so special about variables and scope in Python. But I pretty much know > that the response to *that* would have been yet another round of "You > don't understand that

[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 148172f75d43 by Serhiy Storchaka in branch '3.6': Issue #27358: Optimized merging var-keyword arguments and improved error https://hg.python.org/cpython/rev/148172f75d43 New changeset 489ad68b35c0 by Serhiy Storchaka in branch 'default': Issue

[issue28257] Regression for star argument parameter error messages

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with smaller (in comparison with issue27358) change for 3.5 that improves error message when pass a non-mapping as second var-keyword argument. Unpatched: >>> f(**{'a': 1}, **[]) Traceback (most recent call last): File "", line 1, in

[issue20254] Duplicate bytearray test on test_socket.py

2016-10-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 -Python 3.4 ___ Python tracker

Re: inplace text filter - without writing file

2016-10-02 Thread breamoreboy
On Sunday, October 2, 2016 at 6:19:14 AM UTC+1, Sayth Renshaw wrote: > > I just can't quite get it. > > def return_files(file_list): > for filename in sorted(file_list): > file = os.path.join(dir_path, filename) > print(file) > with open(file) as fd: >

Re: unintuitive for-loop behavior

2016-10-02 Thread Jussi Piitulainen
Marko Rauhamaa writes: > Jussi Piitulainen wrote: >> I could have just posted that yes, it *could* be done, there's >> nothing so special about variables and scope in Python. But I pretty >> much know that the response to *that* would have been yet another >> round of "You don't understand that

[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Berker Peksag
Berker Peksag added the comment: test_unpack_ex fails on several buildbots: http://buildbot.python.org/all/builders/x86-64%20Ubuntu%2015.10%20Skylake%20CPU%203.6/builds/120/steps/test/logs/stdio test test_unpack_ex failed **

[issue28337] Segfault in _struct.unpack_iterator

2016-10-02 Thread Masayuki Yamamoto
New submission from Masayuki Yamamoto: After #21224 was applied into default branch, the _struct.unpack_iterator has crashed by segfault. reproduce segfault: $ uname -a Linux masayuki-P35-DS3 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:41:41 UTC 2016 i686 i686 i686 GNU/Linux $ hg update -C

[issue28338] test_pdb doctests have been removed from its test suite

2016-10-02 Thread Xavier de Gaye
New submission from Xavier de Gaye: Changeset ee0bbfd972de in issue 18401 has removed the doctests from the pdb test suite as can be seen by running test_pdb in verbose mode. See also msg277864 that triggered the creation of this issue. Nosying members of the issue 18401 nosy list.

[issue28337] Segfault in _struct.unpack_iterator

2016-10-02 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I made a mistake that is issue number. The correct issue number is #21124. -- ___ Python tracker ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3da460ca854b by Serhiy Storchaka in branch 'default': Issue #28332: Deprecated silent truncations in socket.htons and socket.ntohs. https://hg.python.org/cpython/rev/3da460ca854b -- nosy: +python-dev ___

[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for you contribution Oren. Rules for promotion unsinged integers to signed integers are not simple. I changed PyLong_FromLong() to PyLong_FromUnsignedLong() for the clarity. -- resolution: -> fixed stage: patch review -> resolved status:

[issue28338] test_pdb doctests have been removed from its test suite

2016-10-02 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Berker! This was temporary change for debugging. I forgot to remove it. -- ___ Python tracker ___

[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag
Berker Peksag added the comment: You're right. I definitely missed that one. Here is an updated patch. Thanks again! -- Added file: http://bugs.python.org/file44927/issue28227_v3.diff ___ Python tracker

[issue15727] PyType_FromSpecWithBases tp_new bugfix

2016-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Affected modules were tkinter and curses (see issue23815). This was fixed by explicit nullifying tp_new after calling PyType_FromSpec(). Issue26979 was open for documenting this danger effect. -- nosy: +serhiy.storchaka

[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag
Berker Peksag added the comment: By the way, for some reason it doesn't show up at https://bugs.python.org/review/28227/patch/18629/74286 -- ___ Python tracker

  1   2   >