Re: How to debug an unfired tkinter event?

2017-10-19 Thread Terry Reedy
On 10/19/2017 11:28 PM, jf...@ms4.hinet.net wrote: Terry Reedy於 2017年10月20日星期五 UTC+8上午7時37分59秒寫道: On 10/19/2017 5:07 AM, jf...@ms4.hinet.net wrote: I got some info below each time when I squeeze the table: . .5006 .5006.50712528 .5006.50712496 .5006.50712464 .5006.50712144

Re: How to debug an unfired tkinter event?

2017-10-19 Thread jfong
Terry Reedy於 2017年10月20日星期五 UTC+8上午7時37分59秒寫道: > On 10/19/2017 5:07 AM, jf...@ms4.hinet.net wrote: > > > I got some info below each time when I squeeze the table: > > . > > .5006 > > .5006.50712528 > > .5006.50712496 > > .5006.50712464 > > .5006.50712144 > >

Re: How to debug an unfired tkinter event?

2017-10-19 Thread jfong
Peter Otten於 2017年10月20日星期五 UTC+8上午4時37分10秒寫道: > jf...@ms4.hinet.net wrote: > > > Peter Otten於 2017年10月19日星期四 UTC+8下午6時04分39秒寫道: > >> jf...@ms4.hinet.net wrote: > >> > >> > Peter Otten at 2017-10-19 UTC+8 PM 3:24:30 wrote: > >> >> It's not clear to me what you mean with this. Did you place the

Re: Efficient counting of results

2017-10-19 Thread MRAB
On 2017-10-20 03:32, Chris Angelico wrote: On Fri, Oct 20, 2017 at 12:18 PM, Steve D'Aprano wrote: On Fri, 20 Oct 2017 05:28 am, Israel Brewster wrote: So if the date of the first record was today, t1 was on-time, and t2 was 5 minutes late, then I would need to

Re: Efficient counting of results

2017-10-19 Thread Chris Angelico
On Fri, Oct 20, 2017 at 12:18 PM, Steve D'Aprano wrote: > On Fri, 20 Oct 2017 05:28 am, Israel Brewster wrote: >> So if the date of >> the first record was today, t1 was on-time, and t2 was 5 minutes late, then >> I would need to increment ALL of the following (using

[issue31761] Failures and crashes when running tests by import.

2017-10-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am re-opening because there is a bug, a conflict between doc and code comment and actual behavior, and one which has nothing to do with IDLE. The question is whether to fix it or to delete the invitation to invoke the bug. The reason the

Re: Efficient counting of results

2017-10-19 Thread Steve D'Aprano
On Fri, 20 Oct 2017 05:28 am, Israel Brewster wrote: > If it helps, my data would look something like this: > > [ (date, key, t1, t2), > (date, key, t1, t2) > . > . > ] > > Where the date and the key are what is used to determine what "on-time" is > for the record, and thus which "late" bin to

Re: Application and package of the same name

2017-10-19 Thread Skip Montanaro
Have you toyed with "from __future__ import absolute_import" ? Not sure if it'd help or not, but worth a try. Yeah, I did, but it didn't change anything as far as I could tell. S -- https://mail.python.org/mailman/listinfo/python-list

[issue31163] Return destination path in Path.rename and Path.replace

2017-10-19 Thread Janko Krstic
Change by Janko Krstic : -- keywords: +patch pull_requests: +4024 stage: -> patch review ___ Python tracker ___

Re: Application and package of the same name

2017-10-19 Thread Chris Angelico
On Fri, Oct 20, 2017 at 7:09 AM, Skip Montanaro wrote: >> My immediate reaction is "you shouldn't name your main program and >> your package the same". It's not a pattern I've seen commonly used. >> >> However, the approaches I've seen used (a __main__.py inside the >>

Re: How to debug an unfired tkinter event?

2017-10-19 Thread Terry Reedy
On 10/19/2017 5:07 AM, jf...@ms4.hinet.net wrote: I got some info below each time when I squeeze the table: . .5006 .5006.50712528 .5006.50712496 .5006.50712464 .5006.50712144 .5006.50712528.50712560.50782256 .5006.50712528.50712560.50782256.50783024

Re: Problem with StreamReaderWriter on 3.6.3?

2017-10-19 Thread MRAB
On 2017-10-19 22:46, Peter via Python-list wrote: I came across this code in Google cpplint.py, a Python script for linting C++ code. I was getting funny results with Python 3.6.3, but it worked fine under 2.7.13 I've tracked the problem to an issue with StreamReaderWriter; the traceback and

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-10-19 Thread Peter Lovett
New submission from Peter Lovett : Documentation of StreamReaderWriter at https://docs.python.org/3/library/codecs.html#codecs.StreamReaderWriter section 7.2.1.4.3 is missing the default value on the errors argument. Should change from: class

Problem with StreamReaderWriter on 3.6.3?

2017-10-19 Thread Peter via Python-list
I came across this code in Google cpplint.py, a Python script for linting C++ code. I was getting funny results with Python 3.6.3, but it worked fine under 2.7.13 I've tracked the problem to an issue with StreamReaderWriter; the traceback and error never shows under 3. The _cause_ of the

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-19 Thread Mario Corchero
Mario Corchero added the comment: I have a patch to add 'Z' support as well if we are interested in making it the same as it glibc does. (as it supports it as well) -- ___ Python tracker

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-19 Thread Mario Corchero
Mario Corchero added the comment: As a note Seems support for the ":" was added in 2015 for glibc: http://code.metager.de/source/xref/gnu/glibc/time/strptime_l.c#765 Commit e952e1df Before that, it basically just ignores the minutes. --

[issue31820] Calling email.message.set_payload twice produces an invalid eml

2017-10-19 Thread Zirak
Zirak added the comment: On irc, bitmancer suggested that this problem is already solved by the email.message.EmailMessage class, as it is: In [119]: m = email.message.EmailMessage() In [120]: m.set_content('abc', 'utf8', cte='base64') In [121]: m.get_payload()

Re: How to debug an unfired tkinter event?

2017-10-19 Thread Peter Otten
jf...@ms4.hinet.net wrote: > Peter Otten於 2017年10月19日星期四 UTC+8下午6時04分39秒寫道: >> jf...@ms4.hinet.net wrote: >> >> > Peter Otten at 2017-10-19 UTC+8 PM 3:24:30 wrote: >> >> It's not clear to me what you mean with this. Did you place the table >> >> from the recipe elsewhere inside a window that you

[issue31823] Opaque default value for close_fds argument in Popen.__init__

2017-10-19 Thread Алексей Аверченко
New submission from Алексей Аверченко : [11:30:03 ~]$ python Python 3.6.1 |Anaconda 4.4.0 (x86_64)| (default, May 11 2017, 13:04:09) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>

Re: Application and package of the same name

2017-10-19 Thread Skip Montanaro
> My immediate reaction is "you shouldn't name your main program and > your package the same". It's not a pattern I've seen commonly used. > > However, the approaches I've seen used (a __main__.py inside the > package, so you can execute it via `python -m fribble`, or a setup.py > entry point to

[issue31819] Add sock_recv_into to AbstractEventLoop

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: Merged. Thank you, Antoine! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31819] Add sock_recv_into to AbstractEventLoop

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 525f40d231aba2c004619fc7a5207171ed65b0cb by Yury Selivanov (Antoine Pitrou) in branch 'master': bpo-31819: Add AbstractEventLoop.sock_recv_into() (#4051)

[issue31819] Add sock_recv_into to AbstractEventLoop

2017-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: SGTM. On Oct 19, 2017 11:05 AM, "Yury Selivanov" wrote: > > Yury Selivanov added the comment: > > I'm going to approve this unless there are any objections. > > -- > nosy: +gvanrossum

Re: Efficient counting of results

2017-10-19 Thread Thomas Jollans
On 19/10/17 20:04, Israel Brewster wrote: >> then loop through the records, find the schedule for that record (if any, if >> not move on as mentioned earlier), compare t1 and t2 against the schedule, >> and increment the appropriate bin counts using a bunch of if statements. >> Functional, if

Re: Efficient counting of results

2017-10-19 Thread Peter Otten
Israel Brewster wrote: > >> On Oct 19, 2017, at 10:02 AM, Stefan Ram wrote: >> >> Israel Brewster writes: >>> t10 = {'daily': 0, 'WTD': 0, 'MTD': 0, 'YTD': 0,} >>> increment the appropriate bin counts using a bunch of if statements. >> >> I

[issue31822] Document that urllib.parse.{Defrag, Split, Parse}Result are namedtuples

2017-10-19 Thread Mike Frysinger
Mike Frysinger added the comment: specifically, the docs for these classes: https://docs.python.org/2/library/urlparse.html#results-of-urlparse-and-urlsplit https://docs.python.org/3/library/urllib.parse.html#urlparse-result-object > The result objects from the

[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-19 Thread Sanyam Khurana
Change by Sanyam Khurana : -- keywords: +patch pull_requests: +4023 stage: -> patch review ___ Python tracker ___

[issue31822] Document that urllib.parse.{Defrag, Split, Parse}Result are namedtuples

2017-10-19 Thread Allen Li
New submission from Allen Li : It would be useful to document that urllib.parse.{Defrag,Split,Parse}Result are namedtuples, and make that API officially public if it was not otherwise. These classes are implemented as namedtuples in Python 2 and 3, and I am not aware

[issue31821] pause_reading() doesn't work from connection_made()

2017-10-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4022 stage: needs patch -> patch review ___ Python tracker ___

[issue31821] pause_reading() doesn't work from connection_made()

2017-10-19 Thread Antoine Pitrou
New submission from Antoine Pitrou : At least in SelectorEventLoop, as add_reader() is called inconditionally after connection_made() returns. -- components: Library (Lib), asyncio messages: 304636 nosy: giampaolo.rodola, haypo, pitrou, yselivanov priority: normal

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-19 Thread STINNER Victor
STINNER Victor added the comment: Another workaround is to call get_proxies() in a fresh subprocess, and use a pipe to retrieve the result. -- ___ Python tracker

Re: Application and package of the same name

2017-10-19 Thread Paul Moore
On 19 October 2017 at 19:18, Skip Montanaro wrote: > I'm not understanding something fundamental about absolute/relative > imports. Suppose I have an application, fribble.py, and it has a > corresponding package full of goodies it relies on, also named fribble. > From

[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-19 Thread STINNER Victor
STINNER Victor added the comment: Sanyam: please first try to write a change for Travis CI: modify .travis.yml, create a PR and check if it works. -- ___ Python tracker

[issue31815] Make itertools iterators interruptible

2017-10-19 Thread Tim Peters
Tim Peters added the comment: Segfaults are different: they usually expose an error in CPython's implementation. We don't prioritize them because the user may have to restart their program (who cares? <0.5 wink>), but because they demonstrate the language implementation is

Re: Efficient counting of results

2017-10-19 Thread Israel Brewster
> On Oct 19, 2017, at 10:02 AM, Stefan Ram wrote: > > Israel Brewster writes: >> t10 = {'daily': 0, 'WTD': 0, 'MTD': 0, 'YTD': 0,} >> increment the appropriate bin counts using a bunch of if statements. > > I can't really completely comprehend

[issue31810] Travis CI, buildbots: run "make smelly" to check if CPython leaks symbols

2017-10-19 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hi Haypo, I'd like to work on a patch for this issue. Can you please guide me how the tests are configured for buildbots? -- nosy: +CuriousLearner ___ Python tracker

Vim, ctags jump to python standard library source

2017-10-19 Thread Matt Schepers
I prefer to use vim and ctags when developing python, but I'm having trouble getting ctags to index the standard library. Sometimes I would like to see an object's constructor etc... Does anyone know how to do this? Thanks -- https://mail.python.org/mailman/listinfo/python-list

make test on Centos 7.4 fails

2017-10-19 Thread Decker, Ryan C.
Hey Python guys, test_socket doesn't seem to be passing on a clean CentOS 7.4 install. strace -s 128 -e trace=%network -o trace ./python -m test -v test_socket -m test_sha256 == CPython 3.6.3 (default, Oct 19 2017, 14:12:01) [GCC 7.1.1 20170526 (Red Hat 7.1.1-2)] ==

Application and package of the same name

2017-10-19 Thread Skip Montanaro
I'm not understanding something fundamental about absolute/relative imports. Suppose I have an application, fribble.py, and it has a corresponding package full of goodies it relies on, also named fribble. >From the fribble package, the application wants to import the sandwich function from the

[issue31632] Asyncio: SSL transport does not support set_protocol()

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 9c23b173b823b5e6da01d85c570c7ae2ab07b38b by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-31632: fix set_protocol() in _SSLProtocolTransport (GH-3817) (GH-3817) (#4052)

[issue31457] LoggerAdapter objects cannot be nested

2017-10-19 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 4d9a8f22999de489ede9216ff983d4359d837760 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (GH-4044) (GH-4050)

[issue31819] Add sock_recv_into to AbstractEventLoop

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: I'm going to approve this unless there are any objections. -- nosy: +gvanrossum ___ Python tracker

Re: Efficient counting of results

2017-10-19 Thread Israel Brewster
> On Oct 19, 2017, at 9:40 AM, Israel Brewster wrote: > > I am working on developing a report that groups data into a two-dimensional > array based on date and time. More specifically, date is grouped into > categories: > > day, week-to-date, month-to-date, and

[issue31820] Calling email.message.set_payload twice produces an invalid eml

2017-10-19 Thread Zirak
New submission from Zirak : Example: In [52]: import email.message In [53]: m = email.message.Message() In [54]: m.set_payload('abc', 'utf8') In [55]: m.get_payload() # correctly encoded Out[55]: 'YWJj\n' In [56]: m.set_payload('abc', 'utf8') In [57]: m.get_payload()

[issue31632] Asyncio: SSL transport does not support set_protocol()

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: Loïc, thank you for the contribution! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue31632] Asyncio: SSL transport does not support set_protocol()

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset ea2ef5d0ca869d4550820ed53bdf56013dbb9546 by Yury Selivanov (jlacoline) in branch 'master': bpo-31632: fix set_protocol() in _SSLProtocolTransport (#3817) (#3817)

Re: right list for SIGABRT python binary question ?

2017-10-19 Thread Karsten Hilbert
On Thu, Oct 19, 2017 at 07:27:45PM +0200, Karsten Hilbert wrote: > I am currently running the bootstrapper with mxdatetime as a > dbg build to see what gives. The only other C extension I am > aware of that is in use is psycopg2. So here's the final console output of that: ==>

[issue31632] Asyncio: SSL transport does not support set_protocol()

2017-10-19 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4021 ___ Python tracker ___

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: I'm going to reject this issue as it's not backwards compatible. I'll work on adding a new TaskGroup primitive in the next couple of days that would address this problem. -- resolution: -> rejected stage: patch review ->

Efficient counting of results

2017-10-19 Thread Israel Brewster
I am working on developing a report that groups data into a two-dimensional array based on date and time. More specifically, date is grouped into categories: day, week-to-date, month-to-date, and year-to-date Then, for each of those categories, I need to get a count of records that fall into

[issue30457] Allow retrieve the number of waiters pending for most of the asyncio lock primitives

2017-10-19 Thread Yury Selivanov
Yury Selivanov added the comment: > The nature of the `pending` method is to give to the developer a way to check > how many waiters are still pending. This not only helps to make this code > more explicit also other pieces of code that might need access to the length >

Re: efficient way to get a sufficient set of identifying attributes

2017-10-19 Thread Chris Angelico
On Fri, Oct 20, 2017 at 4:21 AM, Stefan Ram wrote: > Dennis Lee Bieber writes: >>Interesting -- that is coming out to be 2^size - 1, which will sure speed >>up calculation for larger sets rather than doing all the factorial stuff. > > A set of

[issue31819] Add sock_recv_into to AbstractEventLoop

2017-10-19 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4020 stage: -> patch review ___ Python tracker ___

[issue31819] Add sock_recv_into to AbstractEventLoop

2017-10-19 Thread Antoine Pitrou
New submission from Antoine Pitrou : As sock_recv() is already exposed, it is a no-brainer to add sock_recv_into(), allowing finer buffer management when people are willing to handle a socket object. -- components: Library (Lib), asyncio messages: 304623 nosy:

[issue31457] LoggerAdapter objects cannot be nested

2017-10-19 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4019 ___ Python tracker ___

Re: right list for SIGABRT python binary question ?

2017-10-19 Thread Karsten Hilbert
On Wed, Oct 18, 2017 at 02:07:46PM +0200, Thomas Jollans wrote: > > When run under a debug build it sayeth right away (simulated > > as a minimal working example): > > > > root@hermes:~/bin# python2.7-dbg > > Python 2.7.14 (default, Sep 17 2017, 18:50:44) > > [GCC 7.2.0]

[issue31457] LoggerAdapter objects cannot be nested

2017-10-19 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset ce9e62544571e7ade7186697d5dd065fb4c5243f by Łukasz Langa in branch 'master': bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (#4044)

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-19 Thread Ned Deily
Ned Deily added the comment: Ronald is the expert on this but, from what I understand, I don't think there is any reason to spend time on trying to further analyze this. This issue has been around since day one of _scproxy and affects all versions of Python on macOS. There

Re: Is there a function of ipaddress to get the subnet only from input like 192.168.1.129/25

2017-10-19 Thread Daniel Flick
The problem was with the validation code. Within the python section of the template, the class IPv4Interface will throw an exception due to the invalid value during the validation process. Therefore, the server rejects the form data and the template is not created. Solution: It would work if

Re: efficient way to get a sufficient set of identifying attributes

2017-10-19 Thread Robin Becker
On 19/10/2017 16:42, Stefan Ram wrote: Robin Becker writes: Presumably the information in any attribute is highest if the number of distinct occurrences is the the same as the list length and pairs of attributes are more likely to be unique, but is

Re: What happens when a __call__ function is defined in both class and object ?

2017-10-19 Thread Thomas Jollans
On 2017-10-19 10:11, ast wrote: > Surprisingly, __call__ from the class is called, not the > one defined in the object. Why ? That's just how dunder methods like __call__ work. See https://docs.python.org/3/reference/datamodel.html#special-method-names To quote the docs: > For instance, if a

efficient way to get a sufficient set of identifying attributes

2017-10-19 Thread Robin Becker
Given a list of objects with attributes a0, a1, a2,an-1 is there an efficient way to find sets of attributes which can be used to distinguish members of the list? As example a list of people might have firstName, lastName, nationality, postcode, phonenumber, as attributes. The probe

[issue31800] datetime.strptime: Support for parsing offsets with a colon

2017-10-19 Thread Paul G
Paul G added the comment: This seems very useful to me. I very frequently advise people *against* using dateutil.parser (despite my conflict of interest as maintainer of dateutil) for well-known formats, but the problem frequently comes up of, "what should I do when I

[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-10-19 Thread STINNER Victor
STINNER Victor added the comment: The current code leaks memory since it never clears threads which completed. We need a cleanup function similar to ForkingMixIn.collect_children() which is called by handle_timeout() and service_actions(). We can check if a thread

[issue31811] async and await missing from keyword list in lexical analysis doc

2017-10-19 Thread F. Lamar
F. Lamar added the comment: I a new contributor. This seems like a simple fix. I'd be happy to work on it. I will submit ar PR on or before 10-22-17 -- nosy: +F. Lamar ___ Python tracker

Re: How to debug an unfired tkinter event?

2017-10-19 Thread jfong
Peter Otten於 2017年10月19日星期四 UTC+8下午6時04分39秒寫道: > jf...@ms4.hinet.net wrote: > > > Peter Otten at 2017-10-19 UTC+8 PM 3:24:30 wrote: > >> It's not clear to me what you mean with this. Did you place the table > >> from the recipe elsewhere inside a window that you created or did you > >> make

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-19 Thread STINNER Victor
STINNER Victor added the comment: @Mirko: You can please try to get the Python traceback of the Ansible crash? You may want to try faulthandler: enable it and write its output into a file. https://faulthandler.readthedocs.io/ --

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-19 Thread STINNER Victor
STINNER Victor added the comment: Confirmation from Apple: https://developer.apple.com/library/content/technotes/tn2083/_index.html#//apple_ref/doc/uid/DTS10003794-CH1-SUBSECTION52 """ Many Mac OS X frameworks do not work reliably if you call fork but do not call

[issue31818] [macOS] _scproxy.get_proxies() crash -- get_proxies() is not fork-safe?

2017-10-19 Thread STINNER Victor
STINNER Victor added the comment: Hi, can you please explain how to reproduce your issue? According to the crash report, it seems like you are running Ansible on macOS and that the Python function _scproxy.get_proxies() was called. get_proxies() calls

[issue31756] subprocess.run should alias universal_newlines to text

2017-10-19 Thread Andrew Clegg
Change by Andrew Clegg : -- keywords: +patch pull_requests: +4018 stage: -> patch review ___ Python tracker ___

[issue31818] macOS HighSierra final - Python Crash because of _scproxy

2017-10-19 Thread Mirko Friedenhagen
New submission from Mirko Friedenhagen : The same bug which shows up in https://bugs.python.org/issue30837 is in both the System python provided by Apple (2.7.10) as well as the one coming via Homebrew (2.7.14) (See

[issue31814] subprocess_fork_exec more stable with vfork

2017-10-19 Thread Albert Zeyer
Albert Zeyer added the comment: This is a related issue, although with different argumentation: https://bugs.python.org/issue20104 -- ___ Python tracker

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-10-19 Thread Josh Cullum
New submission from Josh Cullum : Hi Guys, I'm trying to build Python 3.6.1 and 3.6.3, with both, .configure / make / make install work correctly as they should, however, trying to import _tkinter doesn't work. Going back to the compilation, I get the following error

Re: How to debug an unfired tkinter event?

2017-10-19 Thread Peter Otten
jf...@ms4.hinet.net wrote: > Peter Otten at 2017-10-19 UTC+8 PM 3:24:30 wrote: >> It's not clear to me what you mean with this. Did you place the table >> from the recipe elsewhere inside a window that you created or did you >> make changes in the recipe's code? > > Thank you, Peter. I am using

[issue14912] Pdb does not stop at a breakpoint after a restart command and source changes

2017-10-19 Thread Wipolun
Wipolun added the comment: Worked for me on https://www.cheshiremouldings.co.uk/stair-parts/ -- nosy: +wipolun ___ Python tracker

[issue17799] settrace docs are wrong about "c_call" events

2017-10-19 Thread raylu
Change by raylu : -- nosy: +raylu ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: How to debug an unfired tkinter event?

2017-10-19 Thread jfong
Peter Otten at 2017-10-19 UTC+8 PM 3:24:30 wrote: > It's not clear to me what you mean with this. Did you place the table from > the recipe elsewhere inside a window that you created or did you make > changes in the recipe's code? Thank you, Peter. I am using Python 3.4.4 under WinXP. When

[issue31816] Unexpected behaviour of `dir()` after implementation of __dir__

2017-10-19 Thread Christian Heimes
Christian Heimes added the comment: https://docs.python.org/3/library/functions.html#dir also states that "The resulting list is sorted alphabetically." The section has an example where __dir__ returns an unsorted list but dir() returns a sorted list: >>> class Shape: ...

[issue31816] Unexpected behaviour of `dir()` after implementation of __dir__

2017-10-19 Thread Nils Diefenbach
Nils Diefenbach <23okrs20+pyt...@mykolab.com> added the comment: Alright. Are there any other magic methods that do some post-processing on a custom implementation of them ? I couldn't think of one, which is why this behaviour appeared odd to me. -- status: pending -> open

Re: What happens when a __call__ function is defined in both class and object ?

2017-10-19 Thread Chris Angelico
On Thu, Oct 19, 2017 at 7:24 PM, Chris Angelico wrote: > On Thu, Oct 19, 2017 at 7:11 PM, ast wrote: >> Hello, please have a look at following code snippet >> (python 3.4.4) >> >> class Test: >> >>a = 1 >> >>def __init__(self): >>self.a = 2

Re: What happens when a __call__ function is defined in both class and object ?

2017-10-19 Thread Chris Angelico
On Thu, Oct 19, 2017 at 7:11 PM, ast wrote: > Hello, please have a look at following code snippet > (python 3.4.4) > > class Test: > >a = 1 > >def __init__(self): >self.a = 2 >self.f = lambda : print("f from object") >self.__call__ = lambda :

What happens when a __call__ function is defined in both class and object ?

2017-10-19 Thread ast
Hello, please have a look at following code snippet (python 3.4.4) class Test: a = 1 def __init__(self): self.a = 2 self.f = lambda : print("f from object") self.__call__ = lambda : print("__call__ from object") def __call__(self): print("__call__ from

[issue31816] Unexpected behaviour of `dir()` after implementation of __dir__

2017-10-19 Thread Christian Heimes
Christian Heimes added the comment: dir() and __dir__ work as designed and documented: https://docs.python.org/3/reference/datamodel.html?highlight=__dir__#object.__dir__ Called when dir() is called on the object. A sequence must be returned. dir() converts the returned

[issue31815] Make itertools iterators interruptible

2017-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: I'd personally be happy enough if the infinite iterators implemented __length_hint__() as always raising TypeError so the machine-breaking cases of incremental consumption of ever-increasing amounts of memory were blocked - I was suggesting

[issue31816] Unexpected behaviour of `dir()` after implementation of __dir__

2017-10-19 Thread Nils Diefenbach
New submission from Nils Diefenbach <23okrs20+pyt...@mykolab.com>: When defining a custom __dir__ method in a class, calling dir() on said class still sorts the output. This is, imo, unexpected behaviour, especially if the order of output was specified in __dir__ and is somehow relevant.

[issue31618] Change sys.settrace opcode tracing to occur after frame line number update

2017-10-19 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31785] Move instruction code from ceval.c to a separate file

2017-10-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: No one has spoken up for this feature request, so I'm marking it as closed. Thank you for the suggestion, but I think it is prudent to decline. -- resolution: -> rejected stage: -> resolved status: open -> closed

[issue31618] Change sys.settrace opcode tracing to occur after frame line number update

2017-10-19 Thread George King
Change by George King : -- keywords: +patch pull_requests: +4017 stage: -> patch review ___ Python tracker ___

[issue31681] pkgutil.get_data() leaks open files in Python 2.7

2017-10-19 Thread George King
Change by George King : -- pull_requests: +4016 ___ Python tracker ___ ___

Re: How to debug an unfired tkinter event?

2017-10-19 Thread Peter Otten
jf...@ms4.hinet.net wrote: > In last few days, I tried to experiment with the scrolling table > implemented in canvas, started from this example: > http://code.activestate.com/recipes/580793-tkinter-table-with-scrollbars/. > Everything works fine until I moved the scrolling_area instance (which

Re: right list for SIGABRT python binary question ?

2017-10-19 Thread dieter
Karsten Hilbert writes: > ... > When run under "normal" py2.7 it runs all the way through but > upon shutdown (*after* sys.exit(0)) faulthandler shows a > problem (and returns 134 which made me think of SIGABRT): > > *** Error in `python': free(): invalid pointer:

[issue31813] python -m enshure pip stucks

2017-10-19 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Might be caused by this bug: https://github.com/pypa/pip/issues/3532 pip uses lockfile, and lockfile uses hard links, which are prohibited on newer Android versions unless you're root. A workaround is configuring python with |./configure