From zouyuheng1998 at gmail.com Sat Apr 1 05:20:51 2017 From: zouyuheng1998 at gmail.com (Yuheng Zou) Date: Sat, 1 Apr 2017 17:20:51 +0800 Subject: [Python-Dev] [Python-compilers] Developing a Python JIT and have troubld In-Reply-To: References: Message-ID: Thank you for your reply and your patience! I compiled your code and get the same output as yours. However my implementation is different from yours. While we both have an EvalFrame function, your implementation built an module in Python, but I prefer to modify Python source and compile a full distribution. To be more specific, I first implement an EvalFrame function, which is a simple call of _PyEval_EvalFrameDefault. I compile this function into a .so file. Then in Python/pylifecycle.c, I use dlsym to get the EvalFrame function to replace the function interp->eval_frame. So each time when interp->eval_frame(default as _PyEval_EvalFrameDefault) is called, what is really called is my EvalFrame function. This seems should be fine, but it doesn't work. My code is here: https://github.com/KuribohG/Python-JIT-problem To compile it, get a Python-3.6.1.tgz source from Python official website. Replace Python/pylifecycle.c with the one on github. Then use CMake to compile the libPubbon.so, and get into Python directory to make Python. It will give an error message, and the python.exe target cannot run. 2017-03-31 23:15 GMT+08:00 Siu Kwan Lam : > I have never tried PEP0523 before so I have just did a quick look and > pushed what I got to https://github.com/sklam/etude_py36_custom_jit. > > If you run https://github.com/sklam/etude_py36_custom_jit/blob/ > master/test.py, you should get the following printouts: > > Hello > Hey > Yes > ** myjit is evaluating frame=0x10c623048 lasti=-1 lineno=10 > Enter apple() > ** myjit is evaluating frame=0x7f9a74e02178 lasti=-1 lineno=16 > Enter orange() > Exit orange() > Exit apple() > ** myjit is evaluating frame=0x10c460d48 lasti=-1 lineno=27 > > The frame is different for each method. > > Can you try your implementation with my test so we can compare? > > On Thu, Mar 30, 2017 at 11:46 PM Yuheng Zou > wrote: > > I am building a Python JIT, so I want to change the interp->eval_frame to > my own function. > > I built a C++ library which contains EvalFrame function, and then use > dlopen and dlsym to use it. It looks like this: > > extern "C" PyObject *EvalFrame(PyFrameObject *f, int throwflag) { > return _PyEval_EvalFrameDefault(f, throwflag);} > > I added following code to Python/pylifecycle.c at function > _Py_InitializeEx_Private(Python version is 3.6.1): > > void *pyjit = NULL; > pyjit = dlopen("../cmake-build-debug/libPubbon.dylib", 0);if (pyjit != NULL) { > interp->eval_frame = (_PyFrameEvalFunction)dlsym(pyjit, "EvalFrame"); > //interp->eval_frame = _PyEval_EvalFrameDefault;} > > Then something strange happened. I used LLDB to trace the variables. When > it ran at EvalFrame, the address of f pointer didn't change, but > f->f_lineno changed. > > Why the address of the pointer didn't change, but the context change? > > I am working on Mac OS X and Python 3.6.1. I want to know how to replace > _PyEval_EvalFrameDefault in interp->eval_frame with my own function. > _______________________________________________ > Python-compilers mailing list > Python-compilers at python.org > https://mail.python.org/mailman/listinfo/python-compilers > > -- > Siu Kwan Lam > Software Engineer > Continuum Analytics > -------------- next part -------------- An HTML attachment was scrubbed... URL: From armin.rigo at gmail.com Sun Apr 2 04:20:36 2017 From: armin.rigo at gmail.com (Armin Rigo) Date: Sun, 2 Apr 2017 10:20:36 +0200 Subject: [Python-Dev] __del__ is not called after creating a new reference In-Reply-To: References: <20170320172829.GA28448@redhat.com> <20170320212359.64c7e112@fsol> Message-ID: Hi all, On 20 March 2017 at 22:28, Nathaniel Smith wrote: > Modern CPython, and all extant versions of PyPy and Jython, guarantee that > __del__ is called at most once. Just a note, if someone actually depends on this: it is not true in all cases. For example, in CPython 3.5.3: >>> class X: ... __slots__=() # <= note this! ... def __del__(self): ... print("DEL") ... global resurrect ... resurrect = self ... >>> print(X()) <__main__.X object at 0x7f5d1ad600d0> DEL >>> resurrect=None DEL >>> resurrect=None DEL >>> resurrect=None DEL A bient?t, Armin. From oleg at redhat.com Sun Apr 2 13:20:14 2017 From: oleg at redhat.com (Oleg Nesterov) Date: Sun, 2 Apr 2017 19:20:14 +0200 Subject: [Python-Dev] __del__ is not called after creating a new reference In-Reply-To: References: <20170320172829.GA28448@redhat.com> <20170320212359.64c7e112@fsol> Message-ID: <20170402172014.GA27898@redhat.com> On 04/02, Armin Rigo wrote: > > Hi all, > > On 20 March 2017 at 22:28, Nathaniel Smith wrote: > > Modern CPython, and all extant versions of PyPy and Jython, guarantee that > > __del__ is called at most once. > > Just a note, if someone actually depends on this: it is not true in > all cases. For example, in CPython 3.5.3: > > >>> class X: > ... __slots__=() # <= note this! > ... def __del__(self): > ... print("DEL") > ... global resurrect > ... resurrect = self > ... > >>> print(X()) > <__main__.X object at 0x7f5d1ad600d0> > DEL > >>> resurrect=None > DEL Objects/typeobject.c:type_new() /* Enable GC unless this class is not adding new instance variables and the base class did not use GC. */ if ((base->tp_flags & Py_TPFLAGS_HAVE_GC) || type->tp_basicsize > base->tp_basicsize) type->tp_flags |= Py_TPFLAGS_HAVE_GC; That is. "type->tp_basicsize > base->tp_basicsize" is false if empty __slots__, so we do not set HAVE_GC. And PyObject_CallFinalizer() doesn't set FINALIZED if PyType_IS_GC(tp) == F. Oleg. From turnbull.stephen.fw at u.tsukuba.ac.jp Sun Apr 2 15:23:46 2017 From: turnbull.stephen.fw at u.tsukuba.ac.jp (Stephen J. Turnbull) Date: Mon, 3 Apr 2017 04:23:46 +0900 Subject: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ? In-Reply-To: References: <20170320173026.GA28483@redhat.com> <20170330180556.GA29318@redhat.com> Message-ID: <22753.20418.358745.280444@turnbull.sk.tsukuba.ac.jp> Nathaniel Smith writes: > > Well, I'm afraid to contact this closed and not-for-mortals list, > > not sure this very basic question should go there ;) perhaps you > > are already a member, feel free to forward. > > core-mentorship is intended as a friendly place for folks who are > starting to study CPython internals. I'm not sure where you got the > impression that it's not-for-mortals but I suspect the people > running it would like to know so they can fix it :-). I imagine Oleg got that impression because he tried to access the archives, which are closed to non-members. I don't recall the rationale for that but there was one, I suspect that won't change. IMO, the listinfo https://mail.python.org/mailman/listinfo/core-mentorship makes it clear that developers new to Python core code (whether they are new or advanced developers in other code bases) are welcome. If it's something else, we would *definitely* like to know. Steve From ncoghlan at gmail.com Sun Apr 2 23:18:34 2017 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 3 Apr 2017 13:18:34 +1000 Subject: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ? In-Reply-To: <22753.20418.358745.280444@turnbull.sk.tsukuba.ac.jp> References: <20170320173026.GA28483@redhat.com> <20170330180556.GA29318@redhat.com> <22753.20418.358745.280444@turnbull.sk.tsukuba.ac.jp> Message-ID: On 3 April 2017 at 05:23, Stephen J. Turnbull wrote: > Nathaniel Smith writes: > > > > Well, I'm afraid to contact this closed and not-for-mortals list, > > > not sure this very basic question should go there ;) perhaps you > > > are already a member, feel free to forward. > > > > core-mentorship is intended as a friendly place for folks who are > > starting to study CPython internals. I'm not sure where you got the > > impression that it's not-for-mortals but I suspect the people > > running it would like to know so they can fix it :-). > > I imagine Oleg got that impression because he tried to access the > archives, which are closed to non-members. I don't recall the > rationale for that but there was one, I suspect that won't change. It relates to these two points in the list's guidelines for participation: ========= * Statements made by core developers can be quoted outside of the list. * Statements made by others can not be quoted outside the list without explicit permission. ========= as well as this stated goal: ========= A major goal of this group is to help new contributors feel more confident about participating in the results focused public environments of the bug tracker, python-dev and python-ideas. ========= Lots of folks aren't comfortable with having their newbie questions being archived permanently in reach of online search engines, so rather than saying "You shouldn't be bothered by that", we instead offer them a place to ask questions that is at least somewhat private. There are folks at the other end of the spectrum that don't trust any communications channel with deliberately closed archives ("What are they hiding?"), but that's OK - different services are provided for different audiences. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia From victor.stinner at gmail.com Mon Apr 3 06:56:41 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Mon, 3 Apr 2017 12:56:41 +0200 Subject: [Python-Dev] Fix or drop AIX buildbot? Message-ID: Hi, We have a "PPC64 AIX 3.x" buildbot slave which fails on cloning the GitHub repository: "SSL certificate problem: unable to get local issuer certificate". It started to fail around Feb 11, 2017 (Build #294), probably when buildbots moved to GitHub, after CPython moved to GitHub. First build which failed: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/294 Moreover, some tests are failing since at least 2 years on AIX. Some examples: * test_locale.test_strcoll_with_diacritic() * test_socket.testIPv4toString() * test_strptime Last build which ran unit tests: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/293/steps/test/logs/stdio For me, the principle of a CI is to detect *regressions*. But the AIX buildbot is always failing because of known bugs. There are 3 options: * Find a maintainer who quickly fix all known bugs. Unlike * Skip tests known to fail on AIX. I know that many core developers dislike this option, "hiding" bugs. * Drop the buildbot My favorite option is to drop the buildbot, since I'm tired of these red buildbot slaves. I added David Edelsohn to this email, he owns the buildbot, and I know that he wants to get the best AIX support in Python. The question is also which kind of support level do we provide per platform? Full support, "best effort" or no support? * Full support requires active maintainers, a CI with tests which pass, etc. * "Best effort": fix bugs when someone complains and someone (else?) provides a fix * No support: reject proposed patches to add a partial support for a platform. Victor From victor.stinner at gmail.com Mon Apr 3 10:12:02 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Mon, 3 Apr 2017 16:12:02 +0200 Subject: [Python-Dev] Fix or drop AIX buildbot? In-Reply-To: References: Message-ID: 2017-04-03 16:00 GMT+02:00 David Edelsohn : > I have fixed the Git problem. I thought that it had been working. Thank you :-) I see tests running: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/567/steps/test/logs/stdio > The testsuite failures on AIX are issues with the AIX kernel and C > Library, often corner cases. I don't want to get into arguments about > the POSIX standard. Some of the issues are actual conformance issues > and some are different interpretations of the standard. Many tests of the CPython test suite actually test also the OS, not only Python. But in many cases, it's complex to "mock" the OS (unittest.mock), since tested functions are thin wrapper to syscals. > Addressing the problems in AIX is a slow process. If the failing testcases are > too annoying, I would recommend to skip the testcases. So yeah, let's skip such tests on AIX! > Despite the testsuite failures, Python builds and runs on AIX for the > vast majority of users and applications. I don't see the benefit in > dropping support for a platform that functions because it doesn't > fully pass the testsuite. It's a limitation of buildbot, the output is basically binary: pass (green) or fail (red). If buildbot would understand test results (parse stdout, or Python produces a output file easier to parse), it would be possible to detect *regressions* compared to previous runs. Using Jenkins and JUnit, I know that it's possible to do that. But I'm not volunteer to handle buildbot or switch to Jenkins, I can only help to fix buildbot issues ;-) My point is that with the current tools, it's hard to distinguish regressions to "known failures": buildbots failing since many months. Victor From dje.gcc at gmail.com Mon Apr 3 10:00:33 2017 From: dje.gcc at gmail.com (David Edelsohn) Date: Mon, 3 Apr 2017 10:00:33 -0400 Subject: [Python-Dev] Fix or drop AIX buildbot? In-Reply-To: References: Message-ID: I would prefer that AIX not be dropped from support and from the buildbots. I have fixed the Git problem. I thought that it had been working. The testsuite failures on AIX are issues with the AIX kernel and C Library, often corner cases. I don't want to get into arguments about the POSIX standard. Some of the issues are actual conformance issues and some are different interpretations of the standard. Addressing the problems in AIX is a slow process. If the failing testcases are too annoying, I would recommend to skip the testcases. Despite the testsuite failures, Python builds and runs on AIX for the vast majority of users and applications. I don't see the benefit in dropping support for a platform that functions because it doesn't fully pass the testsuite. Thanks, David On Mon, Apr 3, 2017 at 6:56 AM, Victor Stinner wrote: > Hi, > > We have a "PPC64 AIX 3.x" buildbot slave which fails on cloning the > GitHub repository: "SSL certificate problem: unable to get local > issuer certificate". It started to fail around Feb 11, 2017 (Build > #294), probably when buildbots moved to GitHub, after CPython moved to > GitHub. > > First build which failed: > http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/294 > > Moreover, some tests are failing since at least 2 years on AIX. Some examples: > > * test_locale.test_strcoll_with_diacritic() > * test_socket.testIPv4toString() > * test_strptime > > Last build which ran unit tests: > http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/293/steps/test/logs/stdio > > For me, the principle of a CI is to detect *regressions*. But the AIX > buildbot is always failing because of known bugs. There are 3 options: > > * Find a maintainer who quickly fix all known bugs. Unlike > * Skip tests known to fail on AIX. I know that many core developers > dislike this option, "hiding" bugs. > * Drop the buildbot > > My favorite option is to drop the buildbot, since I'm tired of these > red buildbot slaves. > > I added David Edelsohn to this email, he owns the buildbot, and I know > that he wants to get the best AIX support in Python. > > The question is also which kind of support level do we provide per > platform? Full support, "best effort" or no support? > > * Full support requires active maintainers, a CI with tests which pass, etc. > * "Best effort": fix bugs when someone complains and someone (else?) > provides a fix > * No support: reject proposed patches to add a partial support for a platform. > > Victor From victor.stinner at gmail.com Mon Apr 3 11:30:04 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Mon, 3 Apr 2017 17:30:04 +0200 Subject: [Python-Dev] Fix or drop AIX buildbot? In-Reply-To: References: Message-ID: I created http://bugs.python.org/issue29972 to skip tests known to fail on AIX. I already proposed two different pull requests which fix some tests (not all tests yet). Victor 2017-04-03 16:12 GMT+02:00 Victor Stinner : > 2017-04-03 16:00 GMT+02:00 David Edelsohn : >> I have fixed the Git problem. I thought that it had been working. > > Thank you :-) I see tests running: > http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/567/steps/test/logs/stdio > >> The testsuite failures on AIX are issues with the AIX kernel and C >> Library, often corner cases. I don't want to get into arguments about >> the POSIX standard. Some of the issues are actual conformance issues >> and some are different interpretations of the standard. > > Many tests of the CPython test suite actually test also the OS, not > only Python. But in many cases, it's complex to "mock" the OS > (unittest.mock), since tested functions are thin wrapper to syscals. > >> Addressing the problems in AIX is a slow process. If the failing testcases are >> too annoying, I would recommend to skip the testcases. > > So yeah, let's skip such tests on AIX! > >> Despite the testsuite failures, Python builds and runs on AIX for the >> vast majority of users and applications. I don't see the benefit in >> dropping support for a platform that functions because it doesn't >> fully pass the testsuite. > > It's a limitation of buildbot, the output is basically binary: pass > (green) or fail (red). If buildbot would understand test results > (parse stdout, or Python produces a output file easier to parse), it > would be possible to detect *regressions* compared to previous runs. > Using Jenkins and JUnit, I know that it's possible to do that. But I'm > not volunteer to handle buildbot or switch to Jenkins, I can only help > to fix buildbot issues ;-) > > My point is that with the current tools, it's hard to distinguish > regressions to "known failures": buildbots failing since many months. > > Victor From oleg at redhat.com Mon Apr 3 14:48:57 2017 From: oleg at redhat.com (Oleg Nesterov) Date: Mon, 3 Apr 2017 20:48:57 +0200 Subject: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ? In-Reply-To: <22753.20418.358745.280444@turnbull.sk.tsukuba.ac.jp> References: <20170320173026.GA28483@redhat.com> <20170330180556.GA29318@redhat.com> <22753.20418.358745.280444@turnbull.sk.tsukuba.ac.jp> Message-ID: <20170403184857.GC31390@redhat.com> On 04/03, Stephen J. Turnbull wrote: > > Nathaniel Smith writes: > > > > Well, I'm afraid to contact this closed and not-for-mortals list, > > > not sure this very basic question should go there ;) perhaps you > > > are already a member, feel free to forward. > > > > core-mentorship is intended as a friendly place for folks who are > > starting to study CPython internals. I'm not sure where you got the > > impression that it's not-for-mortals but I suspect the people > > running it would like to know so they can fix it :-). > > I imagine Oleg got that impression because he tried to access the > archives, which are closed to non-members. Yes, so I came to conclusion that I should not bother this list with the very simple questions. > If it's something else, we would *definitely* like to know. No, no, sorry for confusion! And thanks to all. Oleg. From julien at palard.fr Tue Apr 4 07:58:26 2017 From: julien at palard.fr (Julien Palard) Date: Tue, 04 Apr 2017 07:58:26 -0400 Subject: [Python-Dev] PEP 545: Python Documentation Translations In-Reply-To: References: Message-ID: Hi, little follow-up about this PEP. Please check with the PSF that this is what we really want. In the past the suggestion has been to **not** use the PSF license with all of its historical baggage but instead use something like Apache. But since IANAL we really should ask the PSF what the best license for new code is. I checked with the PSF and after a few emails with VanL (thanks), we concluded that we need a "Documentation Contribution Agreement" (they're working on writing it), then we'll *just* have to ensure contributors are understanding and agreeing with it. I think we should setup a bot like "The Knights Who Say Ni" from PEP 512 [1]_ or The Knight Who Say Ni itself, configured for the "DCLA" what do you think? The bot will *only* cover contributions from actual github pull requests, other means of contributions like transifex can be enforced by other means, namely: - We can write a welcome text like "By contributing to this transifex project I accept the Documentation Contribution Licence Agreement?". - We can ask contributors to specifically write they accept the licence agreement along witht the translation independently of the way they send us translations. (It even work for paper?). .. [1] PEP 512 -- Migrating from hg.python.org to GitHub (https://www.python.org/dev/peps/pep-0512/#a-bot-to-enforce-cla-signing) -- Julien Palard https://mdk.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From brett at python.org Tue Apr 4 12:29:55 2017 From: brett at python.org (Brett Cannon) Date: Tue, 04 Apr 2017 16:29:55 +0000 Subject: [Python-Dev] PEP 545: Python Documentation Translations In-Reply-To: References: Message-ID: On Tue, 4 Apr 2017 at 04:58 Julien Palard wrote: > Hi, little follow-up about this PEP. > > > Please check with the PSF that this is what we really want. In the past > the suggestion has been to **not** use the PSF license with all of its > historical baggage but instead use something like Apache. But since IANAL > we really should ask the PSF what the best license for new code is. > > > I checked with the PSF and after a few emails with VanL (thanks), we > concluded that we need a "Documentation Contribution Agreement" (they're > working on writing it), then we'll *just* have to ensure contributors are > understanding and agreeing with it. > > I think we should setup a bot like "The Knights Who Say Ni" from PEP 512 > [1]_ or The Knight Who Say Ni itself, configured for the "DCLA" what do you > think? > It's definitely possible. The bot is designed to be easily customizable from a server hosting, PR hosting, and CLA hosting perspective. Question is whether the DCLA will be managed the same as the CLA, i.e. a flag set on bugs.python.org? -Brett > The bot will *only* cover contributions from actual github pull requests, > other means of contributions like transifex can be enforced by other means, > namely: > > - We can write a welcome text like "By contributing to this transifex > project I accept the Documentation Contribution Licence Agreement?". > - We can ask contributors to specifically write they accept the licence > agreement along witht the translation independently of the way they send us > translations. (It even work for paper?). > > .. [1] PEP 512 -- Migrating from hg.python.org to GitHub > (https://www.python.org/dev/peps/pep-0512/#a-bot-to-enforce-cla-signing > ) > > -- > Julien Palard > https://mdk.fr > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ethan at stoneleaf.us Wed Apr 5 16:36:38 2017 From: ethan at stoneleaf.us (Ethan Furman) Date: Wed, 05 Apr 2017 13:36:38 -0700 Subject: [Python-Dev] Sorting Message-ID: <58E55556.5060905@stoneleaf.us> Just want to drop a note and say THANK YOU to everyone for the work in improving Python to the 3 branch. And if you're curious as to why: I just spent three hours trying to figure out why my comparisons were succeeding when they should be raising exceptions -- and then remembered that in 2.x there's a fallback to comparing type names. Grrrr. :/ So, THANK YOU!! -- ~Ethan~ From phd at phdru.name Wed Apr 5 20:30:06 2017 From: phd at phdru.name (Oleg Broytman) Date: Thu, 6 Apr 2017 02:30:06 +0200 Subject: [Python-Dev] Sorting In-Reply-To: <58E55556.5060905@stoneleaf.us> References: <58E55556.5060905@stoneleaf.us> Message-ID: <20170406003006.GA14586@phdru.name> On Wed, Apr 05, 2017 at 01:36:38PM -0700, Ethan Furman wrote: > Just want to drop a note and say THANK YOU to everyone for the work in improving Python to the 3 branch. > > And if you're curious as to why: I just spent three hours trying to figure > out why my comparisons were succeeding when they should be raising > exceptions -- and then remembered that in 2.x there's a fallback to > comparing type names. > > Grrrr. :/ > > So, THANK YOU!! Sorry, let me pour a bit of cold water here. Recently I was busy porting a few big and small (but complex) programs to Python 3 and was sending thousands curses every day. str=>unicode is the biggest change but not the most painful. The worst was when I spent few days hunting for a subtle bug caused by absent of unbound methods. Painful. :-( > -- > ~Ethan~ Oleg. -- Oleg Broytman http://phdru.name/ phd at phdru.name Programmers don't die, they just GOSUB without RETURN. From steve at pearwood.info Wed Apr 5 22:24:47 2017 From: steve at pearwood.info (Steven D'Aprano) Date: Thu, 6 Apr 2017 12:24:47 +1000 Subject: [Python-Dev] Sorting In-Reply-To: <20170406003006.GA14586@phdru.name> References: <58E55556.5060905@stoneleaf.us> <20170406003006.GA14586@phdru.name> Message-ID: <20170406022445.GO9464@ando.pearwood.info> On Thu, Apr 06, 2017 at 02:30:06AM +0200, Oleg Broytman wrote: > Sorry, let me pour a bit of cold water here. Recently I was busy > porting a few big and small (but complex) programs to Python 3 and was > sending thousands curses every day. str=>unicode is the biggest change > but not the most painful. The worst was when I spent few days hunting > for a subtle bug caused by absent of unbound methods. > Painful. :-( I'm curious about this. What do you mean? Python 3 has unbound methods, they're just the original, unwrapped function: py> class K: ... def method(self, arg): ... pass ... py> K.method The only(?) functional difference between unbound methods in Python 2 versus 3 is that in Python 2 they automatically do a type-check that `self` is an instance of the class. -- Steve From phd at phdru.name Thu Apr 6 06:08:00 2017 From: phd at phdru.name (Oleg Broytman) Date: Thu, 6 Apr 2017 12:08:00 +0200 Subject: [Python-Dev] Unbound methods (was: Sorting) In-Reply-To: <20170406022445.GO9464@ando.pearwood.info> References: <58E55556.5060905@stoneleaf.us> <20170406003006.GA14586@phdru.name> <20170406022445.GO9464@ando.pearwood.info> Message-ID: <20170406100800.GA18111@phdru.name> Hi! On Thu, Apr 06, 2017 at 12:24:47PM +1000, Steven D'Aprano wrote: > On Thu, Apr 06, 2017 at 02:30:06AM +0200, Oleg Broytman wrote: > > > I spent few days hunting > > for a subtle bug caused by absent of unbound methods. > > Painful. :-( > > I'm curious about this. What do you mean? Python 3 has unbound methods, > they're just the original, unwrapped function: > > py> class K: > ... def method(self, arg): > ... pass > ... > py> K.method > I know. > The only(?) functional difference between unbound methods in Python 2 > versus 3 is that in Python 2 they automatically do a type-check that > `self` is an instance of the class. The check was involved, yes. The bug I was hunting manifested itself in PY3 with exceptions hinting that instead of `self` I've passed `self.__class__`. In PY2 everything worked fine. I found the problem in dynamically created methods. Someone implemented them this way: if PY2: def createMethod(func, cls): return types.MethodType(func, None, cls) else: def createMethod(func, cls): return types.MethodType(func, None) Hard to spot at the first glance what was the problem. Finally I grok the problem and fixed the implementation for PY3 to def createMethod(func, cls): return func > -- > Steve Oleg. -- Oleg Broytman http://phdru.name/ phd at phdru.name Programmers don't die, they just GOSUB without RETURN. From larry at hastings.org Thu Apr 6 20:44:29 2017 From: larry at hastings.org (Larry Hastings) Date: Thu, 6 Apr 2017 17:44:29 -0700 Subject: [Python-Dev] Wider Call For Participation for the 2017 Python Language Summit Message-ID: <21689f9c-682d-3971-edb5-a537046783b8@hastings.org> The 2017 Python Language Summit is coming! The Python Language Summit is an annual day-long meeting of CPython core developers. It?s a highly technical meeting, designed to explore and resolve existing discussions regarding the Python programming language, the development of its reference implementation CPython, and the impact of the language?s evolution on the existing alternative implementations. It?s a once-a-year opportunity for Python?s core development team to get together in a room and work things out. The meeting is kept small on purpose, as we think that maximizes its productivity and effectiveness. Nearly all attendees are CPython core developers, but we do accept presentations from anyone in the greater Python community who has something interesting to say to the core developers. And that could be you! In order to be eligible, you must be able to attend the Summit in person. The Summit will be held May 17 2017, all day, in the same convention center where PyCon itself is held. You have to get there yourself; we literally have no discretionary budget to help people attend the Summit. However, you don?t have to buy a ticket to PyCon in order to attend the summit--it?s a completely separate event, and it?s free! But mere eligibility is not enough. The presentations are carefully hand-picked by the Language Summit organizers, and must be exceedingly relevant and of high quality in order to be considered. The Summit only comes once a year, and we the organizers want to keep it interesting and maximally productive for the developers who are kind enough to attend. To be brutally honest, we expect most proposals from non-core-developers will be turned down--again, sorry. PyCon is large, diverse, welcoming, and vibrant, and there are lots of great avenues (e.g. lightning talks, BoFs, open spaces, etc.) for discussing Python-related topics. If your proposed talk isn't accepted for the Language Summit, we highly encourage you to explore these other options. Here are the criteria you should keep in mind if you submit a presentation: * Is this a question about the *design* of Python? Or, to a lesser extent, the implementation of CPython or one of the alternative implementations? The Summit is about Python itself--we don?t discuss other projects. * Is this a *technical* debate? The Python universe is large and diverse, but the Summit is explicitly a highly technical meeting, and a deeper technical context on the part of participants is essential. * Is this topic going to spark conversation? A good rule of thumb: your presentation should raise questions, not provide answers. If your topic could be adequately covered in a blog post, it?s probably not interactive enough. * Is this already an ongoing discussion in the Python development community? As a rule the Language Summit is not a venue for new business--it?s for working through existing technical debates. * Is this topic going to be interesting to a lot of people? While it doesn?t have to be universally interesting, it can?t be too narrow either. As a rule, most people in the room should be interested. * Is this a topic that?s still considered "open" by the core developers? There?s no point in proposing a talk saying "you should abandon Python 3 and go back to 2", or even "you should make a Python 2.8". From the perspective of the core developers, these are resolved, closed issues. Examples of interesting topics: * Python?s new async syntax is flawed, here?s why * The design of CPython?s extension API makes it difficult to do what we want it to do * My patch for CPython makes it ten times faster for common workloads * I?m engaged in a lively and long-lived discussion on python-dev and I want to bring it up with the core devs in person, so that a resolution can be found Examples of irrelevant / uninteresting / ineligible topics: * A useful Python library you want people to know about * A new language feature you want to propose * There?s a bug in CPython you want to raise awareness about * The Python community needs to... The process for submitting a talk proposal is exactly the same as for core developers: fill out the Google form with your contact information, your affiliation, and a summary of your proposal. The form is reachable via the Language Summit page under the PyCon events menu: https://us.pycon.org/2017/events/language-summit/ Since this wider call for proposals comes so late in the process, we?re extending the deadline for submissions. The deadline is now Thursday, April 20th, 2017, two weeks from today. If your submission is accepted, we will notify you by May 1st. Finally, even if you don?t get to attend, stay tuned to Linux Weekly News (LWN) in the days and weeks following the Language Summit. Jake Edge from LWN has done a fantastic job of reporting on the Language Summit the previous two years, and is planning on attending and reporting on it again this year. We all look forward to his thorough reporting of the event! [BL]arry (Barry Warsaw and Larry Hastings) -------------- next part -------------- An HTML attachment was scrubbed... URL: From status at bugs.python.org Fri Apr 7 12:09:16 2017 From: status at bugs.python.org (Python tracker) Date: Fri, 7 Apr 2017 18:09:16 +0200 (CEST) Subject: [Python-Dev] Summary of Python tracker Issues Message-ID: <20170407160916.EDB6D56234@psf.upfronthosting.co.za> ACTIVITY SUMMARY (2017-03-31 - 2017-04-07) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open 5882 (+27) closed 35891 (+37) total 41773 (+64) Open issues with patches: 2413 Issues opened (48) ================== #29939: Compiler warning in _ctypes_test.c http://bugs.python.org/issue29939 reopened by vinay.sajip #29956: math.exp documentation is misleading http://bugs.python.org/issue29956 opened by belopolsky #29957: unnecessary LBYL for key contained in defaultdict, lib2to3/btm http://bugs.python.org/issue29957 opened by selik #29960: _random.Random state corrupted on exception http://bugs.python.org/issue29960 opened by bryangeneolson #29963: Remove obsolete declaration PyTokenizer_RestoreEncoding in tok http://bugs.python.org/issue29963 opened by Jim Fasarakis-Hilliard #29964: %z directive has no effect on the output of time.strptime http://bugs.python.org/issue29964 opened by Paul Pinterits #29966: typing.get_type_hints doesn't really work for classes with For http://bugs.python.org/issue29966 opened by simon.percivall #29967: "AMD64 FreeBSD 9.x 3.x" tries to rebuild Include/opcode.h, tim http://bugs.python.org/issue29967 opened by haypo #29970: Severe open file leakage running asyncio SSL server http://bugs.python.org/issue29970 opened by kyuupichan #29971: Lock.acquire() not interruptible on Windows http://bugs.python.org/issue29971 opened by pitrou #29972: Skip tests known to fail on AIX http://bugs.python.org/issue29972 opened by haypo #29974: Change typing.TYPE_CHECKING doc example http://bugs.python.org/issue29974 opened by rav #29975: Issue in extending documentation http://bugs.python.org/issue29975 opened by Namjun Kim #29976: urllib.parse clarify what ' ' in schemes mean http://bugs.python.org/issue29976 opened by orsenthil #29979: cgi.parse_multipart is not consistent with FieldStorage http://bugs.python.org/issue29979 opened by quentel #29980: OSError: multiple exceptions should preserve the exception typ http://bugs.python.org/issue29980 opened by r.david.murray #29981: Update Index for set, dict, and generator 'comprehensions' http://bugs.python.org/issue29981 opened by terry.reedy #29982: tempfile.TemporaryDirectory fails to delete itself http://bugs.python.org/issue29982 opened by max #29983: Reference TOC: expand 'Atoms' and 'Primaries' http://bugs.python.org/issue29983 opened by terry.reedy #29984: Improve test coverage for 'heapq' module http://bugs.python.org/issue29984 opened by Robert Day #29985: make install doesn't seem to support --quiet http://bugs.python.org/issue29985 opened by chris.jerdonek #29986: Documentation recommends raising TypeError from tp_richcompare http://bugs.python.org/issue29986 opened by Devin Jeanpierre #29987: inspect.isgeneratorfunction not working with partial functions http://bugs.python.org/issue29987 opened by Thomas Antony #29988: (async) with blocks and try/finally are not as KeyboardInterru http://bugs.python.org/issue29988 opened by njs #29989: subprocess.Popen does not handle file-like objects without fil http://bugs.python.org/issue29989 opened by rtpg #29990: Range checking in GB18030 decoder http://bugs.python.org/issue29990 opened by Ma Lin #29991: http client marks valid multipart headers with defects. http://bugs.python.org/issue29991 opened by pareshverma91 #29992: Expose parse_string in JSONDecoder http://bugs.python.org/issue29992 opened by oberstet #29994: site.USER_SITE is None for Windows embeddable Python 3.6 http://bugs.python.org/issue29994 opened by brechtm #29995: re.escape() escapes too much http://bugs.python.org/issue29995 opened by serhiy.storchaka #29996: Use terminal width by default in pprint http://bugs.python.org/issue29996 opened by serhiy.storchaka #29997: Suggested changes for https://docs.python.org/3.6/extending/ex http://bugs.python.org/issue29997 opened by ArthurGoldberg #29998: Pickling and copying ImportError doesn't preserve name and pat http://bugs.python.org/issue29998 opened by serhiy.storchaka #29999: repr() of ImportError misses keyword arguments name and path http://bugs.python.org/issue29999 opened by serhiy.storchaka #30000: Inconsistency in the zlib module http://bugs.python.org/issue30000 opened by Ellison Marks #30002: Minor change to https://docs.python.org/3.6/extending/building http://bugs.python.org/issue30002 opened by ArthurGoldberg #30003: Remove hz codec http://bugs.python.org/issue30003 opened by Ma Lin #30004: in regex-howto, improve example on grouping http://bugs.python.org/issue30004 opened by Cristian Barbarosie #30005: Pickling and copying exceptions doesn't preserve non-__dict__ http://bugs.python.org/issue30005 opened by serhiy.storchaka #30006: Deadlocks in `concurrent.futures.ProcessPoolExecutor` http://bugs.python.org/issue30006 opened by tomMoral #30008: OpenSSL 1.1.0 deprecated functions http://bugs.python.org/issue30008 opened by floppymaster #30011: HTMLParser class is not thread safe http://bugs.python.org/issue30011 opened by ale2017 #30012: gzip.open(filename, "rt") fails on Python 2.7.11 on win32, inv http://bugs.python.org/issue30012 opened by maubp #30013: Compiler warning in Modules/posixmodule.c http://bugs.python.org/issue30013 opened by louielu #30014: Speedup DefaultSelectors.modify() by 1.5x http://bugs.python.org/issue30014 opened by giampaolo.rodola #30015: Windows also treats full-width spaces as a delimiter when pars http://bugs.python.org/issue30015 opened by LCY #30016: No sideways scrolling in IDLE http://bugs.python.org/issue30016 opened by Jensen Taylor #30017: zlib.error: Error -2 while flushing: inconsistent stream state http://bugs.python.org/issue30017 opened by Jeremy Heiner Most recent 15 issues with no replies (15) ========================================== #30017: zlib.error: Error -2 while flushing: inconsistent stream state http://bugs.python.org/issue30017 #30016: No sideways scrolling in IDLE http://bugs.python.org/issue30016 #30015: Windows also treats full-width spaces as a delimiter when pars http://bugs.python.org/issue30015 #30013: Compiler warning in Modules/posixmodule.c http://bugs.python.org/issue30013 #30012: gzip.open(filename, "rt") fails on Python 2.7.11 on win32, inv http://bugs.python.org/issue30012 #30011: HTMLParser class is not thread safe http://bugs.python.org/issue30011 #30008: OpenSSL 1.1.0 deprecated functions http://bugs.python.org/issue30008 #30006: Deadlocks in `concurrent.futures.ProcessPoolExecutor` http://bugs.python.org/issue30006 #30005: Pickling and copying exceptions doesn't preserve non-__dict__ http://bugs.python.org/issue30005 #29998: Pickling and copying ImportError doesn't preserve name and pat http://bugs.python.org/issue29998 #29995: re.escape() escapes too much http://bugs.python.org/issue29995 #29994: site.USER_SITE is None for Windows embeddable Python 3.6 http://bugs.python.org/issue29994 #29985: make install doesn't seem to support --quiet http://bugs.python.org/issue29985 #29984: Improve test coverage for 'heapq' module http://bugs.python.org/issue29984 #29982: tempfile.TemporaryDirectory fails to delete itself http://bugs.python.org/issue29982 Most recent 15 issues waiting for review (15) ============================================= #30014: Speedup DefaultSelectors.modify() by 1.5x http://bugs.python.org/issue30014 #29999: repr() of ImportError misses keyword arguments name and path http://bugs.python.org/issue29999 #29998: Pickling and copying ImportError doesn't preserve name and pat http://bugs.python.org/issue29998 #29996: Use terminal width by default in pprint http://bugs.python.org/issue29996 #29995: re.escape() escapes too much http://bugs.python.org/issue29995 #29990: Range checking in GB18030 decoder http://bugs.python.org/issue29990 #29974: Change typing.TYPE_CHECKING doc example http://bugs.python.org/issue29974 #29963: Remove obsolete declaration PyTokenizer_RestoreEncoding in tok http://bugs.python.org/issue29963 #29957: unnecessary LBYL for key contained in defaultdict, lib2to3/btm http://bugs.python.org/issue29957 #29951: PyArg_ParseTupleAndKeywords exception messages containing "fun http://bugs.python.org/issue29951 #29947: In SocketServer, why not passing a factory instance for the Re http://bugs.python.org/issue29947 #29930: Waiting for asyncio.StreamWriter.drain() twice in parallel rai http://bugs.python.org/issue29930 #29926: time.sleep ignores _thread.interrupt_main() http://bugs.python.org/issue29926 #29914: Incorrect signatures of object.__reduce__() and object.__reduc http://bugs.python.org/issue29914 #29897: itertools.chain behaves strangly when copied with copy.copy http://bugs.python.org/issue29897 Top 10 most discussed issues (10) ================================= #29947: In SocketServer, why not passing a factory instance for the Re http://bugs.python.org/issue29947 15 msgs #30014: Speedup DefaultSelectors.modify() by 1.5x http://bugs.python.org/issue30014 11 msgs #29996: Use terminal width by default in pprint http://bugs.python.org/issue29996 10 msgs #28157: Document time module constants (timezone, tzname, etc.) as dep http://bugs.python.org/issue28157 9 msgs #29941: Confusion between asserts and Py_DEBUG http://bugs.python.org/issue29941 8 msgs #29957: unnecessary LBYL for key contained in defaultdict, lib2to3/btm http://bugs.python.org/issue29957 7 msgs #29964: %z directive has no effect on the output of time.strptime http://bugs.python.org/issue29964 7 msgs #29956: math.exp documentation is misleading http://bugs.python.org/issue29956 6 msgs #5906: Risk of confusion in multiprocessing module - daemonic process http://bugs.python.org/issue5906 5 msgs #19225: lack of PyExc_BufferError doc http://bugs.python.org/issue19225 5 msgs Issues closed (35) ================== #11066: cgi.py proposals : sys.stdout encoding + rewriting of parsing http://bugs.python.org/issue11066 closed by quentel #13290: get vars for object with __slots__ http://bugs.python.org/issue13290 closed by rhettinger #15083: Rewrite ElementTree tests in a cleaner and safer way http://bugs.python.org/issue15083 closed by serhiy.storchaka #16510: Using appropriate checks in tests http://bugs.python.org/issue16510 closed by serhiy.storchaka #20545: Use specific asserts in unicode tests http://bugs.python.org/issue20545 closed by serhiy.storchaka #20547: Use specific asserts in bigmem tests http://bugs.python.org/issue20547 closed by serhiy.storchaka #24117: Wrong range checking in GB18030 decoder. http://bugs.python.org/issue24117 closed by Ma Lin #26947: Hashable documentation improvement needed http://bugs.python.org/issue26947 closed by orsenthil #28115: Use argparse for the zipfile module http://bugs.python.org/issue28115 closed by serhiy.storchaka #29339: Interactive: Move to same indentation level as previousline http://bugs.python.org/issue29339 closed by terry.reedy #29549: Improve docstring for str.index http://bugs.python.org/issue29549 closed by rhettinger #29569: threading.Timer class: Continue periodical execution till acti http://bugs.python.org/issue29569 closed by rhettinger #29649: struct.pack_into check boundary error message ignores offset http://bugs.python.org/issue29649 closed by serhiy.storchaka #29654: SimpleHTTPRequestHandler should support browser cache http://bugs.python.org/issue29654 closed by serhiy.storchaka #29725: sqlite3.Cursor doesn't properly document "arraysize" http://bugs.python.org/issue29725 closed by orsenthil #29762: Use "raise from None" http://bugs.python.org/issue29762 closed by serhiy.storchaka #29949: sizeof set after set_merge() is doubled from 3.5 http://bugs.python.org/issue29949 closed by inada.naoki #29953: Memory leak in the replace() method of datetime and time objec http://bugs.python.org/issue29953 closed by serhiy.storchaka #29954: multiprocessing.Pool.__exit__() calls terminate() instead of c http://bugs.python.org/issue29954 closed by pitrou #29955: logging decimal point should come from locale http://bugs.python.org/issue29955 closed by vinay.sajip #29958: Use add_mutually_exclusive_group(required=True) in zipfile and http://bugs.python.org/issue29958 closed by serhiy.storchaka #29959: re.match failed to match left square brackets as the first cha http://bugs.python.org/issue29959 closed by serhiy.storchaka #29961: More compact sets and frozensets created from sets http://bugs.python.org/issue29961 closed by rhettinger #29962: Add math.remainder operation http://bugs.python.org/issue29962 closed by mark.dickinson #29965: MatchObject __getitem__() should support slicing and len http://bugs.python.org/issue29965 closed by serhiy.storchaka #29968: Document that no characters are allowed to proceed \ in explic http://bugs.python.org/issue29968 closed by Jim Fasarakis-Hilliard #29969: Typo in decimal error message http://bugs.python.org/issue29969 closed by skrah #29973: Travis CI docs broken: UnboundLocalError: local variable 'pref http://bugs.python.org/issue29973 closed by haypo #29977: re.sub stalls forever on an unmatched non-greedy case http://bugs.python.org/issue29977 closed by serhiy.storchaka #29978: Remove remove merge=union attribute for Misc/NEWS in 3.6 and 2 http://bugs.python.org/issue29978 closed by Mariatta #29993: error of parsing encoded words in email of standard library http://bugs.python.org/issue29993 closed by r.david.murray #30001: CPython contribution docs reference missing /issuetracker page http://bugs.python.org/issue30001 closed by Mariatta #30007: report bug http://bugs.python.org/issue30007 closed by xiang.zhang #30009: Integer conversion failure http://bugs.python.org/issue30009 closed by eryksun #30010: Initial bytes to BytesIO cannot be seeked to http://bugs.python.org/issue30010 closed by serhiy.storchaka From victor.stinner at gmail.com Fri Apr 7 12:27:50 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Fri, 7 Apr 2017 18:27:50 +0200 Subject: [Python-Dev] CPython benchmark status, April 2017 Message-ID: Hi, I'm still working on analyzing past optimizations to guide future optimizations. I succeeded to identify multiple significant optimizations over the last 3 years. At least for me, some were unexpected like "Use the test suite for profile data" which made pickle 1.28x faster and pidigts 1.16x faster. Here is a report of my benchmark work of last weeks. I succeeded to compute benchmarks on CPython master on the period April, 2014-April,2017: we now have have a timeline over 3 years of CPython performance! https://speed.python.org/timeline/ I started to take notes on significant performance changes (speedup and slowdown) of this timeline: http://pyperformance.readthedocs.io/cpython_results_2017.html To identify the change which introduced a significant performance change, I wrote a Python script running a Git bisection: compile CPython, run benchmark, repeat. https://github.com/haypo/misc/blob/master/misc/bisect_cpython_perf.py It uses a configuration file which looks like: --- [config] work_dir = ~/prog/bench_python/bisect-pickle src_dir = ~/prog/bench_python/master old_commit = 133138a284be1985ebd9ec9014f1306b9a42 new_commit = 10427f44852b6e872034061421a8890902b8f benchmark = ~/prog/bench_python/performance/performance/benchmarks/bm_pickle.py pickle benchmark_opts = --inherit-environ=PYTHONPATH -p5 -v configure_args = --- I succeeded to identify many significant optimizations, examples: * PyMem_Malloc() now uses the fast pymalloc allocator * Add a C implementation of collections.OrderedDict * Use the test suite for profile data * Speedup method calls 1.2x * Added C implementation of functools.lru_cache() * Optimized ElementTree.iterparse(); it is now 2x faster perf, performance, server configuration, etc. evolve quicker than expected, so I created a Git project to keep a copy of JSON files: https://github.com/haypo/performance_results I lost data of my first milestone (november-december 2016), but you have data from the second (december 2016-february 2017) and third (march 2016-today) milestones. Victor From tjreedy at udel.edu Fri Apr 7 14:50:44 2017 From: tjreedy at udel.edu (Terry Reedy) Date: Fri, 7 Apr 2017 14:50:44 -0400 Subject: [Python-Dev] CPython benchmark status, April 2017 In-Reply-To: References: Message-ID: On 4/7/2017 12:27 PM, Victor Stinner wrote: > I succeeded to compute benchmarks on CPython master on the period > April, 2014-April,2017: we now have have a timeline over 3 years of > CPython performance! > > https://speed.python.org/timeline/ The boxes are un-scaled. Is vertical always 'time for fixed work', so lower is always better? The vertical variation is a small fraction of vertical space, so most vertical space is wasted. Box says 'last 50', but only 13 results. These cover last 3 years? -- Terry Jan Reedy From victor.stinner at gmail.com Fri Apr 7 16:57:19 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Fri, 7 Apr 2017 22:57:19 +0200 Subject: [Python-Dev] CPython benchmark status, April 2017 In-Reply-To: References: Message-ID: 2017-04-07 20:50 GMT+02:00 Terry Reedy : > The boxes are un-scaled. Which page? "Display All in a grid" has no scale, but if you select a single benchmark, there are scales. It's a number of seconds: "(less is better)" as written on the Y scale. > Is vertical always 'time for fixed work', so lower is always better? Yes. > The vertical variation is a small fraction of vertical space, so most vertical space is wasted. I don't well the website part, please see the https://github.com/tobami/codespeed/ project. > Box says 'last 50', but only 13 results. These cover last 3 years? Currently, the oldest result is the commit 0cf3ed60d089cf2a2671fa66cdaa18498091: April 1, 2014. I'm unable to count the exact number of dots :-D On the special "Display All in a grid" view, you cannot select the number of results. I don't know how many results are displayed: 50 max I think. If you select a benchmark, 50 results max are displayed. Currently, it's enough to over 3 years. Victor From ethan at stoneleaf.us Mon Apr 10 13:32:21 2017 From: ethan at stoneleaf.us (Ethan Furman) Date: Mon, 10 Apr 2017 10:32:21 -0700 Subject: [Python-Dev] windows installer and python list mention Message-ID: <58EBC1A5.6030301@stoneleaf.us> Apparently the Windows installer mentions asking for help on Python List. If accessing Python List directly via email it is necessary to subscribe first -- perhaps that could be mentioned? Bonus Python Points for mentioning the other methods that do not require subscribing. :) Rejection text sent to non-subscribers follows: ---- "Hello! I see you want to post a message to the Python List. We would be happy to help, but you must subscribe first: https://mail.python.org/mailman/listinfo/python-list After you have subscribed, please send your message again. Alternatively, this list is mirrored both ways with the comp.lang.python newsgroup (news:comp.lang.python). Some people find it easier to follow this and other lists via gmane (http://news.gmane.org/gmane.comp.python.general), a service which offers a newsgroup interface to many online mailing lists. *NB all posts to the mailing list are publicly archived at:* https://mail.python.org/pipermail/python-list " Any questions or comments should be directed to the list administrator at: python-list-owner at python.org --- -- ~Ethan~ From njs at pobox.com Mon Apr 10 13:48:09 2017 From: njs at pobox.com (Nathaniel Smith) Date: Mon, 10 Apr 2017 10:48:09 -0700 Subject: [Python-Dev] windows installer and python list mention In-Reply-To: <58EBC1A5.6030301@stoneleaf.us> References: <58EBC1A5.6030301@stoneleaf.us> Message-ID: On Mon, Apr 10, 2017 at 10:32 AM, Ethan Furman wrote: > Some people find it easier to follow this and other lists via gmane > (http://news.gmane.org/gmane.comp.python.general), a service which > offers a newsgroup interface to many online mailing lists. Also, gmane has been dead for a few months (that link just says "Page Not Found") and its future is uncertain, so this bit isn't terribly helpful either... -n -- Nathaniel J. Smith -- https://vorpus.org From brett at python.org Mon Apr 10 13:57:37 2017 From: brett at python.org (Brett Cannon) Date: Mon, 10 Apr 2017 17:57:37 +0000 Subject: [Python-Dev] I will be deleting the cpython-mirror repo on April 10 In-Reply-To: References: Message-ID: I've now gone ahead and deleted the cpython-mirror repo as scheduled. Happy two month anniversary on the new workflow. :) On Mon, 27 Mar 2017 at 15:39 Victor Stinner wrote: > Oops, thanks for the reminder! I found two old pull requests that I > forgot to rebase and republish on the new CPython Git repository. > > Victor > > 2017-03-27 22:13 GMT+02:00 Brett Cannon : > > On the two-month anniversary of the GitHub migration I'm going to delete > the > > old git mirror: https://github.com/python/cpython-mirror. If you have a > old > > PR that got closed with comments or something, now is the time to get > those > > comments off. > > > > _______________________________________________ > > Python-Dev mailing list > > Python-Dev at python.org > > https://mail.python.org/mailman/listinfo/python-dev > > Unsubscribe: > > > https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Mon Apr 10 15:24:32 2017 From: tjreedy at udel.edu (Terry Reedy) Date: Mon, 10 Apr 2017 15:24:32 -0400 Subject: [Python-Dev] windows installer and python list mention In-Reply-To: References: <58EBC1A5.6030301@stoneleaf.us> Message-ID: On 4/10/2017 1:48 PM, Nathaniel Smith wrote: > On Mon, Apr 10, 2017 at 10:32 AM, Ethan Furman wrote: >> Some people find it easier to follow this and other lists via gmane >> (http://news.gmane.org/gmane.comp.python.general), a service which >> offers a newsgroup interface to many online mailing lists. > > Also, gmane has been dead for a few months (that link just says "Page > Not Found") and its future is uncertain, so this bit isn't terribly > helpful either... The web interface does indeed seem to have been removed. Even news.gmane.org returns the same. The nntp interface remains for the present, as I still use it daily. (The headers of this message should indicate such.) If the nntp interface were to be taken down, I would like PSF to add news.python.org to continue the python mirrors. -- Terry Jan Reedy From breamoreboy at yahoo.co.uk Mon Apr 10 15:29:53 2017 From: breamoreboy at yahoo.co.uk (Mark Lawrence) Date: Mon, 10 Apr 2017 20:29:53 +0100 Subject: [Python-Dev] windows installer and python list mention In-Reply-To: References: <58EBC1A5.6030301@stoneleaf.us> Message-ID: On 10/04/2017 18:48, Nathaniel Smith wrote: > On Mon, Apr 10, 2017 at 10:32 AM, Ethan Furman wrote: >> Some people find it easier to follow this and other lists via gmane >> (http://news.gmane.org/gmane.comp.python.general), a service which >> offers a newsgroup interface to many online mailing lists. > > Also, gmane has been dead for a few months (that link just says "Page > Not Found") and its future is uncertain, so this bit isn't terribly > helpful either... > > -n > Wrong, it's live and kicking. What am I reading this on, Scotch mist? Of course people should be pointed to the Windows list at gmane.comp.python.windows but that will not stop them asking the same moronic question that has been asked repeatedly for the last 16 months, "I get api-ms-win-crt-runtime-l1-1-0.dll is missing, what do I do about it?". Haven't they heard of search engines? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence From steve.dower at python.org Mon Apr 10 16:48:06 2017 From: steve.dower at python.org (Steve Dower) Date: Mon, 10 Apr 2017 13:48:06 -0700 Subject: [Python-Dev] windows installer and python list mention In-Reply-To: <58EBC1A5.6030301@stoneleaf.us> References: <58EBC1A5.6030301@stoneleaf.us> Message-ID: <7c3e2e8a-f2e9-2776-5ceb-f8fed30b4746@python.org> On 10Apr2017 1032, Ethan Furman wrote: > Apparently the Windows installer mentions asking for help on Python List. Yay! People actually read some of that text in the installer :) Currently the installer has the following message after you run a Repair (from Tools/msi/bundle/Default.wxl): > Feel free to email python-list at python.org if you continue to encounter issues. And this message after you uninstall: > Feel free to email python-list at python.org if you encountered problems. > If accessing Python List directly via email it is necessary to subscribe > first -- perhaps that could be mentioned? Bonus Python Points for > mentioning the other methods that do not require subscribing. :) I wasn't aware of this - I'm sure I've emailed the list before without it being rejected, and I'm certainly not subscribed. Is it a recent change? Is it necessary? I'd be happy to change these to point somewhere else, but the challenge here is the installers are permanent - whatever we put in this message can never change. Given this thread immediately entered uncertainty about what other methods are actually working, I don't want to link to any of them :) Cheers, Steve From brett at python.org Mon Apr 10 18:27:11 2017 From: brett at python.org (Brett Cannon) Date: Mon, 10 Apr 2017 22:27:11 +0000 Subject: [Python-Dev] windows installer and python list mention In-Reply-To: <7c3e2e8a-f2e9-2776-5ceb-f8fed30b4746@python.org> References: <58EBC1A5.6030301@stoneleaf.us> <7c3e2e8a-f2e9-2776-5ceb-f8fed30b4746@python.org> Message-ID: On Mon, 10 Apr 2017 at 14:32 Steve Dower wrote: > On 10Apr2017 1032, Ethan Furman wrote: > > Apparently the Windows installer mentions asking for help on Python List. > > Yay! People actually read some of that text in the installer :) > > Currently the installer has the following message after you run a Repair > (from Tools/msi/bundle/Default.wxl): > > > Feel free to email href="mailto:python-list at python.org">python-list at python.org if you > continue to encounter issues. > > And this message after you uninstall: > > > Feel free to email href="mailto:python-list at python.org">python-list at python.org if you > encountered problems. > > > If accessing Python List directly via email it is necessary to subscribe > > first -- perhaps that could be mentioned? Bonus Python Points for > > mentioning the other methods that do not require subscribing. :) > > I wasn't aware of this - I'm sure I've emailed the list before without > it being rejected, and I'm certainly not subscribed. Is it a recent > change? Is it necessary? > It's possible a previous email was held for moderation and then you were given a permanent acceptance for your email address as Mailman allows for that. -Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at timgolden.me.uk Tue Apr 11 08:40:53 2017 From: mail at timgolden.me.uk (Tim Golden) Date: Tue, 11 Apr 2017 13:40:53 +0100 Subject: [Python-Dev] windows installer and python list mention In-Reply-To: <7c3e2e8a-f2e9-2776-5ceb-f8fed30b4746@python.org> References: <58EBC1A5.6030301@stoneleaf.us> <7c3e2e8a-f2e9-2776-5ceb-f8fed30b4746@python.org> Message-ID: On 10/04/2017 21:48, Steve Dower wrote: > I wasn't aware of [the need to subscribe to Python list] - I'm sure > I've emailed the list before without it being rejected, and I'm > certainly not subscribed. Is it a recent change? Is it necessary? As long as I've been involved, the list has been subscription-only with the first post moderated even after subscription (to prevent bot-subscription). But in fact we'd typically waved through any unsubscribed posts which were clearly genuine / on-topic etc. We changed the policy a year ago. In fact the discussion kicked off between the list moderators on 11th April 2016, exactly a year ago. The reasoning was that we were seeing people who had posted without being subscribed and who were not seeing replies because, by and large, people reply to the list and not to the OP. We felt that we were doing a disservice to people unfamiliar with the mailing list mechanism since they might not realise that people were replying to their question but via the list, to which they were not subscribed. Clearly other decisions are possible; but that's what we've stuck to since. (Pragmatically, we do in fact pass through certain posts which we recognise as long-time posters perhaps coming in from an unfamiliar account, say posting from their phone etc.) TJG From mariatta.wijaya at gmail.com Wed Apr 12 13:50:33 2017 From: mariatta.wijaya at gmail.com (Mariatta Wijaya) Date: Wed, 12 Apr 2017 10:50:33 -0700 Subject: [Python-Dev] Please use #9999 when writing a new PEP Message-ID: Hi everyone, >From now on, when proposing a new PEP, please use the number 9999. This allows Travis build to pass, while waiting for a PEP editor to assign you a number. This means, in the header of your draft PEP, instead of ``PEP: XXX``, you should now use ``PEP: 9999``. You should name the file ``pep-9999.rst``, instead of ``pep-xxxx.rst``. Both PEP 1 and PEP 12 have been updated to address this. Thanks :) Mariatta Wijaya -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at louie.lu Thu Apr 13 07:26:55 2017 From: me at louie.lu (Louie Lu) Date: Thu, 13 Apr 2017 19:26:55 +0800 Subject: [Python-Dev] Is there any docstring format used inside CPython core? Message-ID: Hi everyone, Is there any docstring format used inside CPython core? e.g. Doxygen. During the tour to know more about CPython, I found that some part of the internal function didn't comment that intuitive, for example, `tok_get` return value, `tok_decimal_tail` description, ...etc. If there is a exist docstring format or style, I can help to complete it. If not, is there any plan to introduce the docstring format into the core. (or maybe some discuss has there before, I can't found inside the python-dev archive) Thanks, Louie. -------------- next part -------------- An HTML attachment was scrubbed... URL: From levkivskyi at gmail.com Thu Apr 13 12:24:57 2017 From: levkivskyi at gmail.com (Ivan Levkivskyi) Date: Thu, 13 Apr 2017 18:24:57 +0200 Subject: [Python-Dev] Is there any docstring format used inside CPython core? In-Reply-To: References: Message-ID: On 13 April 2017 at 13:26, Louie Lu wrote: > Hi everyone, > Is there any docstring format used inside CPython core? e.g. Doxygen. > I don't think there is anything beyond https://www.python.org/dev/peps/pep-0257/ -- Ivan -------------- next part -------------- An HTML attachment was scrubbed... URL: From guido at python.org Thu Apr 13 12:39:46 2017 From: guido at python.org (Guido van Rossum) Date: Thu, 13 Apr 2017 09:39:46 -0700 Subject: [Python-Dev] Is there any docstring format used inside CPython core? In-Reply-To: References: Message-ID: There are extensive docs for CPython's public API at https://docs.python.org/3/c-api/index.html. For functions that are exposed to Python via an extension module there's the Argument Clinic, incompletely implemented, see PEP 436 (accepted). For functions that are neither (like the ones you mention) we use good old C comments, and if you want to add more of those, please do and submit a PR! On Thu, Apr 13, 2017 at 9:24 AM, Ivan Levkivskyi wrote: > On 13 April 2017 at 13:26, Louie Lu wrote: > >> Hi everyone, >> Is there any docstring format used inside CPython core? e.g. Doxygen. >> > > I don't think there is anything beyond https://www.python.org/dev/ > peps/pep-0257/ > > -- > Ivan > > > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > guido%40python.org > > -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: From status at bugs.python.org Fri Apr 14 12:09:15 2017 From: status at bugs.python.org (Python tracker) Date: Fri, 14 Apr 2017 18:09:15 +0200 (CEST) Subject: [Python-Dev] Summary of Python tracker Issues Message-ID: <20170414160915.EDF5C56280@psf.upfronthosting.co.za> ACTIVITY SUMMARY (2017-04-07 - 2017-04-14) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open 5889 ( +7) closed 35940 (+49) total 41829 (+56) Open issues with patches: 2410 Issues opened (33) ================== #30018: multiprocessing.Pool garbles call stack for __new__ http://bugs.python.org/issue30018 opened by Charles McEachern #30019: IDLE freezes when opening a file with astral characters http://bugs.python.org/issue30019 opened by David E. Franco G. #30022: Get rid of using EnvironmentError and IOError http://bugs.python.org/issue30022 opened by serhiy.storchaka #30024: Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` http://bugs.python.org/issue30024 opened by Victor.Varvariuc #30028: make test.support.temp_cwd() fork-safe http://bugs.python.org/issue30028 opened by anselm.kruis #30030: Simplify _RandomNameSequence http://bugs.python.org/issue30030 opened by serhiy.storchaka #30031: Improve queens demo (use argparse and singular form) http://bugs.python.org/issue30031 opened by paka #30034: csv reader chokes on bad quoting in large files http://bugs.python.org/issue30034 opened by keef604 #30035: [RFC] PyMemberDef.name should be const char * http://bugs.python.org/issue30035 opened by Sunyeop Lee #30038: Race condition in how trip_signal writes to wakeup fd http://bugs.python.org/issue30038 opened by njs #30039: Resuming a 'yield from' stack is broken if a signal arrives in http://bugs.python.org/issue30039 opened by njs #30040: new empty dict can be more small http://bugs.python.org/issue30040 opened by inada.naoki #30044: shutil.copystat should (allow to) copy ownership, and other at http://bugs.python.org/issue30044 opened by noctiflore #30046: csv: Inconsistency re QUOTE_NONNUMERIC http://bugs.python.org/issue30046 opened by tlotze #30048: If a task is canceled at the right moment, the cancellation is http://bugs.python.org/issue30048 opened by abacabadabacaba #30049: Don't cache tp_iternext http://bugs.python.org/issue30049 opened by serhiy.storchaka #30050: Please provide a way to disable the warning printed if the sig http://bugs.python.org/issue30050 opened by njs #30051: Document that the random module doesn't support fork http://bugs.python.org/issue30051 opened by haypo #30052: URL Quoting page links to function Bytes instead of defintion http://bugs.python.org/issue30052 opened by csabella #30053: Problems building with --enable-profiling on macOS http://bugs.python.org/issue30053 opened by brechtm #30054: Expose tracemalloc C API to track/untrack memory blocks http://bugs.python.org/issue30054 opened by haypo #30057: signal.signal should check tripped signals http://bugs.python.org/issue30057 opened by jdemeyer #30058: Buffer overflow in kqueue.control() http://bugs.python.org/issue30058 opened by serhiy.storchaka #30059: No documentation for C type Py_Ellipsis http://bugs.python.org/issue30059 opened by MSeifert #30060: Crash on Py_Finalize if Py_NoSiteFlag is used http://bugs.python.org/issue30060 opened by steveire #30061: Check if PyObject_Size() raised an error http://bugs.python.org/issue30061 opened by serhiy.storchaka #30062: datetime in Python 3.6+ no longer respects 'TZ' environment va http://bugs.python.org/issue30062 opened by adamwill #30064: BaseSelectorEventLoop.sock_{recv,sendall}() don't remove their http://bugs.python.org/issue30064 opened by abacabadabacaba #30065: Insufficient validation in _posixsubprocess.fork_exec() http://bugs.python.org/issue30065 opened by serhiy.storchaka #30068: missing iter(self) in _io._IOBase.readlines http://bugs.python.org/issue30068 opened by xiang.zhang #30069: External library behave differently when loaded by Python (may http://bugs.python.org/issue30069 opened by sylgar #30070: Fix errors handling in the parser module http://bugs.python.org/issue30070 opened by serhiy.storchaka #30071: Duck-typing inspect.isfunction() http://bugs.python.org/issue30071 opened by jdemeyer Most recent 15 issues with no replies (15) ========================================== #30070: Fix errors handling in the parser module http://bugs.python.org/issue30070 #30069: External library behave differently when loaded by Python (may http://bugs.python.org/issue30069 #30068: missing iter(self) in _io._IOBase.readlines http://bugs.python.org/issue30068 #30064: BaseSelectorEventLoop.sock_{recv,sendall}() don't remove their http://bugs.python.org/issue30064 #30057: signal.signal should check tripped signals http://bugs.python.org/issue30057 #30053: Problems building with --enable-profiling on macOS http://bugs.python.org/issue30053 #30049: Don't cache tp_iternext http://bugs.python.org/issue30049 #30044: shutil.copystat should (allow to) copy ownership, and other at http://bugs.python.org/issue30044 #30039: Resuming a 'yield from' stack is broken if a signal arrives in http://bugs.python.org/issue30039 #30035: [RFC] PyMemberDef.name should be const char * http://bugs.python.org/issue30035 #30022: Get rid of using EnvironmentError and IOError http://bugs.python.org/issue30022 #30016: No sideways scrolling in IDLE http://bugs.python.org/issue30016 #30013: Compiler warning in Modules/posixmodule.c http://bugs.python.org/issue30013 #30011: HTMLParser class is not thread safe http://bugs.python.org/issue30011 #30006: Deadlocks in `concurrent.futures.ProcessPoolExecutor` http://bugs.python.org/issue30006 Most recent 15 issues waiting for review (15) ============================================= #30071: Duck-typing inspect.isfunction() http://bugs.python.org/issue30071 #30070: Fix errors handling in the parser module http://bugs.python.org/issue30070 #30068: missing iter(self) in _io._IOBase.readlines http://bugs.python.org/issue30068 #30065: Insufficient validation in _posixsubprocess.fork_exec() http://bugs.python.org/issue30065 #30061: Check if PyObject_Size() raised an error http://bugs.python.org/issue30061 #30058: Buffer overflow in kqueue.control() http://bugs.python.org/issue30058 #30057: signal.signal should check tripped signals http://bugs.python.org/issue30057 #30049: Don't cache tp_iternext http://bugs.python.org/issue30049 #30040: new empty dict can be more small http://bugs.python.org/issue30040 #30028: make test.support.temp_cwd() fork-safe http://bugs.python.org/issue30028 #30022: Get rid of using EnvironmentError and IOError http://bugs.python.org/issue30022 #30017: zlib.error: Error -2 while flushing: inconsistent stream state http://bugs.python.org/issue30017 #30014: Speedup DefaultSelectors.modify() by 2x http://bugs.python.org/issue30014 #30006: Deadlocks in `concurrent.futures.ProcessPoolExecutor` http://bugs.python.org/issue30006 #29999: repr() of ImportError misses keyword arguments name and path http://bugs.python.org/issue29999 Top 10 most discussed issues (10) ================================= #29870: ssl socket leak http://bugs.python.org/issue29870 18 msgs #29956: math.exp documentation is misleading http://bugs.python.org/issue29956 11 msgs #30040: new empty dict can be more small http://bugs.python.org/issue30040 11 msgs #30024: Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` http://bugs.python.org/issue30024 10 msgs #30028: make test.support.temp_cwd() fork-safe http://bugs.python.org/issue30028 9 msgs #30034: csv reader chokes on bad quoting in large files http://bugs.python.org/issue30034 9 msgs #30038: Race condition in how trip_signal writes to wakeup fd http://bugs.python.org/issue30038 9 msgs #30048: If a task is canceled at the right moment, the cancellation is http://bugs.python.org/issue30048 7 msgs #30018: multiprocessing.Pool garbles call stack for __new__ http://bugs.python.org/issue30018 6 msgs #30030: Simplify _RandomNameSequence http://bugs.python.org/issue30030 6 msgs Issues closed (46) ================== #16572: Bad multi-inheritance support in some libs like threading or m http://bugs.python.org/issue16572 closed by rhettinger #21301: pathlib missing Path.expandvars(env=os.environ) http://bugs.python.org/issue21301 closed by berker.peksag #26187: sqlite3 trace callback prints duplicate line http://bugs.python.org/issue26187 closed by berker.peksag #26860: Make os.walk and os.fwalk yield namedtuple instead of tuple http://bugs.python.org/issue26860 closed by rhettinger #26985: Information about CodeType in inspect documentation is outdate http://bugs.python.org/issue26985 closed by xiang.zhang #29506: Incorrect documentation for the copy module http://bugs.python.org/issue29506 closed by ncoghlan #29642: Why does unittest.TestLoader.discover still rely on existence http://bugs.python.org/issue29642 closed by berker.peksag #29692: contextlib.contextmanager may incorrectly unchain RuntimeError http://bugs.python.org/issue29692 closed by Mariatta #29694: race condition in pathlib mkdir with flags parents=True http://bugs.python.org/issue29694 closed by Mariatta #29791: print documentation: flush is also a keyword argument http://bugs.python.org/issue29791 closed by berker.peksag #29869: Underscores in numeric literals not supported in lib2to3. http://bugs.python.org/issue29869 closed by Mariatta #29914: Incorrect signatures of object.__reduce__() and object.__reduc http://bugs.python.org/issue29914 closed by serhiy.storchaka #29951: PyArg_ParseTupleAndKeywords exception messages containing "fun http://bugs.python.org/issue29951 closed by serhiy.storchaka #29957: unnecessary LBYL for key contained in defaultdict, lib2to3/btm http://bugs.python.org/issue29957 closed by Mariatta #29963: Remove obsolete declaration PyTokenizer_RestoreEncoding in tok http://bugs.python.org/issue29963 closed by Jim Fasarakis-Hilliard #29975: Issue in extending documentation http://bugs.python.org/issue29975 closed by terry.reedy #29987: inspect.isgeneratorfunction not working with partial functions http://bugs.python.org/issue29987 closed by terry.reedy #29989: subprocess.Popen does not handle file-like objects without fil http://bugs.python.org/issue29989 closed by rtpg #29994: site.USER_SITE is None for Windows embeddable Python 3.6 http://bugs.python.org/issue29994 closed by steve.dower #29995: re.escape() escapes too much http://bugs.python.org/issue29995 closed by serhiy.storchaka #29998: Pickling and copying ImportError doesn't preserve name and pat http://bugs.python.org/issue29998 closed by serhiy.storchaka #30012: gzip.open(filename, "rt") fails on Python 2.7.11 on win32, inv http://bugs.python.org/issue30012 closed by martin.panter #30015: Windows also treats full-width spaces as a delimiter when pars http://bugs.python.org/issue30015 closed by LCY #30020: Make attrgetter use namedtuple http://bugs.python.org/issue30020 closed by rhettinger #30021: Add examples for re.escape() http://bugs.python.org/issue30021 closed by serhiy.storchaka #30023: Example code becomes invalid for "Why do lambdas defined in a http://bugs.python.org/issue30023 closed by eric.smith #30025: Spam http://bugs.python.org/issue30025 closed by zach.ware #30026: Hashable doesn't check for __eq__ http://bugs.python.org/issue30026 closed by rhettinger #30027: test_xml_etree and test_xml_etree_c fail due to AssertionError http://bugs.python.org/issue30027 closed by serhiy.storchaka #30029: Compiler "'await' outside function" error message is unreachab http://bugs.python.org/issue30029 closed by anthonypjshaw #30032: email module creates base64 output with incorrect line breaks http://bugs.python.org/issue30032 closed by r.david.murray #30033: email module base64-encodes utf-8 text http://bugs.python.org/issue30033 closed by r.david.murray #30036: The bugs website doesn't use httpS by default http://bugs.python.org/issue30036 closed by Mariatta #30037: inspect documentation on code attributes incomplete http://bugs.python.org/issue30037 closed by martin.panter #30041: subprocess: weird behavior with shell=True and args being a li http://bugs.python.org/issue30041 closed by martin.panter #30042: fcntl module for windows http://bugs.python.org/issue30042 closed by christian.heimes #30043: fcntl module for windows platform http://bugs.python.org/issue30043 closed by haypo #30045: Bad parameter name in re.escape() http://bugs.python.org/issue30045 closed by serhiy.storchaka #30047: Typos in Doc/library/select.rst http://bugs.python.org/issue30047 closed by Mariatta #30055: Missed testcleanup in decimal.rst http://bugs.python.org/issue30055 closed by skrah #30056: RuntimeWarning: invalid value encountered in maximum/minimum http://bugs.python.org/issue30056 closed by r.david.murray #30063: DeprecationWarning in json/encoder.py http://bugs.python.org/issue30063 closed by r.david.murray #30066: anaconda3::traitsu::NotImplementedError http://bugs.python.org/issue30066 closed by berker.peksag #30067: _osx_support.py: misplaced flags in re.sub() http://bugs.python.org/issue30067 closed by serhiy.storchaka #30072: re functions: convert count and flags parameters to keyword-on http://bugs.python.org/issue30072 closed by serhiy.storchaka #30073: binary compressed file reading corrupts newlines (lzma, gzip, http://bugs.python.org/issue30073 closed by jtaylor From lalalalalanono at gmail.com Fri Apr 14 20:23:16 2017 From: lalalalalanono at gmail.com (lalalalalanono at gmail.com) Date: Fri, 14 Apr 2017 17:23:16 -0700 (PDT) Subject: [Python-Dev] Python ideias ideais..... Message-ID: Oieeeee Estou divulgando esse canal https://youtu.be/5e59iafUIQk Tem v?deos s? de dicas de Python e muita mais, segue v?deo de dicas: https://youtu.be/W2yayBy5unU Obrigadaaaa!!!!! Gostaram??? From joao.moreira at free.fr Sun Apr 16 13:16:09 2017 From: joao.moreira at free.fr (joao.moreira at free.fr) Date: Sun, 16 Apr 2017 19:16:09 +0200 (CEST) Subject: [Python-Dev] Installing a newly-built python on windows In-Reply-To: <1977417910.43920639.1492362891100.JavaMail.root@zimbra73-e12.priv.proxad.net> Message-ID: <837872657.43931080.1492362969918.JavaMail.root@zimbra73-e12.priv.proxad.net> Hi all, I've followed the instructions in the 1st chapter (Getting Started) of the Python Developers's Guide to compile python 3.6 from source, using VS 2017 on a Windows 7 SP1. I successfully built 35 of the 40 subprojects, and the python interpreter in cpython\PCbuild\amd64 is working fine. How do I now install this, so that users on this machine can use it ? I've found no instrutions on how to do this, can someone point me in the right direction ? Alternatively, could someone point me to the source code for the python .msi installer ? Thx, Joao -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Sun Apr 16 15:08:44 2017 From: tjreedy at udel.edu (Terry Reedy) Date: Sun, 16 Apr 2017 15:08:44 -0400 Subject: [Python-Dev] Installing a newly-built python on windows In-Reply-To: <837872657.43931080.1492362969918.JavaMail.root@zimbra73-e12.priv.proxad.net> References: <1977417910.43920639.1492362891100.JavaMail.root@zimbra73-e12.priv.proxad.net> <837872657.43931080.1492362969918.JavaMail.root@zimbra73-e12.priv.proxad.net> Message-ID: On 4/16/2017 1:16 PM, joao.moreira at free.fr wrote: > Hi all, > > I've followed the instructions in the 1st chapter (Getting Started) of > the Python Developers's Guide to compile python 3.6 from source, using > VS 2017 on a Windows 7 SP1. I successfully built 35 of the 40 > subprojects, and the python interpreter in cpython\PCbuild\amd64 is > working fine. > > How do I now install this, so that users on this machine can use it ? Python developers use built binaries routinely without 'installing'. 1. Invoke .../python.exe with path, either absolute or relative to a development directory that one has CD'ed to already. 2. Add the directory to the PATH. 3. Invoke built python in a .bat file. (lib/idlelib/idle.bat can be modified for this.) Put startpy.bat either somewhere in PATH or one's development directory. I use 1 and 3b. Note that running a .bat with echo left on leaves the path-to-python on a line that can be recalled and edited. > I've found no instrutions on how to do this, can someone point me in the > right direction ? Why not? 1. CPython developers need to update the code and recompile for each work session or at least fairly frequently. They should normally compile with debugging turned on, which slows normally running. Creating the installation .exe is not yet completely automated and would be a nuisance to do frequently. 2. CPython developers should also have current releases installed. 2a. To test whether bugs reported by users on tracker still exist in the latest release, or if the report is out of date. 2b. To test installed python. (I discovered that an idlelib file was missing from 3.6.0, at least on Windows.) One would have to make sure that 2 installations of same version do not conflict. > Alternatively, could someone point me to the source code for the python > .msi installer ? .msi is not used in 3.5+ and the template may have been removed. -- Terry Jan Reedy From steve.dower at python.org Sun Apr 16 17:31:10 2017 From: steve.dower at python.org (Steve Dower) Date: Sun, 16 Apr 2017 14:31:10 -0700 Subject: [Python-Dev] Installing a newly-built python on windows In-Reply-To: <837872657.43931080.1492362969918.JavaMail.root@zimbra73-e12.priv.proxad.net> References: <1977417910.43920639.1492362891100.JavaMail.root@zimbra73-e12.priv.proxad.net> <837872657.43931080.1492362969918.JavaMail.root@zimbra73-e12.priv.proxad.net> Message-ID: You'll want to look at tools/msi/build.bat and buildrelease.bat. The former should produce a test installer that should be isolated from a regular install (though it may not be perfect), while the latter is used for the official release. If you're going to use the latter and redistribute the result, you should read the instructions in the batch file and make the modifications it suggests (basically, there's a URI used to generate GUIDs, and also registry keys for PEP 514 and self-locating). Please don't distribute an installer that conflicts with the official one :) Cheers, Steve Top-posted from my Windows Phone -----Original Message----- From: "joao.moreira at free.fr" Sent: ?4/?16/?2017 10:32 To: "python-dev at python.org" Subject: [Python-Dev] Installing a newly-built python on windows Hi all, I've followed the instructions in the 1st chapter (Getting Started) of the Python Developers's Guide to compile python 3.6 from source, using VS 2017 on a Windows 7 SP1. I successfully built 35 of the 40 subprojects, and the python interpreter in cpython\PCbuild\amd64 is working fine. How do I now install this, so that users on this machine can use it ? I've found no instrutions on how to do this, can someone point me in the right direction ? Alternatively, could someone point me to the source code for the python .msi installer ? Thx, Joao -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at louie.lu Tue Apr 18 12:04:07 2017 From: me at louie.lu (Louie Lu) Date: Wed, 19 Apr 2017 00:04:07 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? Message-ID: Hi all, After reading some topic at python-committers mailing list, some of the topics are around not enough reviewers to review patches, cause the develop process slowing down or the patch can't merge into the codebase. I would like to make some analysis about module / library patch merge rate (maybe fine-grained to per file?), and make a statistic list that can point out which module / library need more people to contribute to it. Are there any API for bugs.python.org can be used, or there is a existing thing just doing what I want to do. (Or maybe Python tracker, who sent the summary can add this kind of function.) Thanks, Louie. -------------- next part -------------- An HTML attachment was scrubbed... URL: From brett at python.org Wed Apr 19 17:04:42 2017 From: brett at python.org (Brett Cannon) Date: Wed, 19 Apr 2017 21:04:42 +0000 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: I don't think there's any API. Your best bet will probably be to analyze the GitHub data. On Tue, 18 Apr 2017 at 09:09 Louie Lu wrote: > Hi all, > > After reading some topic at python-committers mailing list, some of the > topics are around not enough reviewers to review patches, cause the develop > process slowing down or the patch can't merge into the codebase. > > I would like to make some analysis about module / library patch merge rate > (maybe fine-grained to per file?), and make a statistic list that can point > out which module / library need more people to contribute to it. > > Are there any API for bugs.python.org can be used, or there is a existing > thing just doing what I want to do. (Or maybe Python tracker, who sent the > summary can add this kind of function.) > > Thanks, > Louie. > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/brett%40python.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at louie.lu Thu Apr 20 00:40:00 2017 From: me at louie.lu (Louie Lu) Date: Thu, 20 Apr 2017 12:40:00 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: I used the download CSV function, and make some change about it. The demo of the site is here: https://bpo-mergerate.louie.lu/ To used, just need to enter the prefix of dictionary to search bar, for now, its resolution is to the second folder or files, e.g., Lib/unittest, Python/ceval.c 2017-04-20 5:04 GMT+08:00 Brett Cannon : > I don't think there's any API. Your best bet will probably be to analyze > the GitHub data. > > On Tue, 18 Apr 2017 at 09:09 Louie Lu wrote: > >> Hi all, >> >> After reading some topic at python-committers mailing list, some of the >> topics are around not enough reviewers to review patches, cause the develop >> process slowing down or the patch can't merge into the codebase. >> >> I would like to make some analysis about module / library patch merge >> rate (maybe fine-grained to per file?), and make a statistic list that can >> point out which module / library need more people to contribute to it. >> >> Are there any API for bugs.python.org can be used, or there is a >> existing thing just doing what I want to do. (Or maybe Python tracker, who >> sent the summary can add this kind of function.) >> >> Thanks, >> Louie. >> _______________________________________________ >> Python-Dev mailing list >> Python-Dev at python.org >> https://mail.python.org/mailman/listinfo/python-dev >> Unsubscribe: https://mail.python.org/mailman/options/python-dev/ >> brett%40python.org >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Thu Apr 20 16:04:12 2017 From: wes.turner at gmail.com (Wes Turner) Date: Thu, 20 Apr 2017 15:04:12 -0500 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: Roundup has an xmlrpc API: - https://sourceforge.net/p/roundup/code/ci/default/tree/roundup/xmlrpc.py - https://sourceforge.net/p/roundup/code/ci/default/tree/test/test_xmlrpc.py http://roundup.sourceforge.net https://sourceforge.net/p/roundup/code/ Tangentially, here's a PR to add gh pr http webhook support to Roundup: https://github.com/AnishShah/roundup/commit/84cdf84946835c883a1384c4ece649355f7e7669 April 19, 2017, Louie Lu wrote: > I used the download CSV function, and make some change about it. > > The demo of the site is here: > > https://bpo-mergerate.louie.lu/ > > > To used, just need to enter the prefix of dictionary to search bar, for > now, its resolution is to the second folder or files, e.g., > Lib/unittest, Python/ceval.c > > This searches files changed in issue patch attachments or more like e.g. `git log Lib/unittest` `git blame Lib/unittest`? > > > 2017-04-20 5:04 GMT+08:00 Brett Cannon >: > >> I don't think there's any API. Your best bet will probably be to analyze >> the GitHub data. >> >> On Tue, 18 Apr 2017 at 09:09 Louie Lu > > wrote: >> >>> Hi all, >>> >>> After reading some topic at python-committers mailing list, some of the >>> topics are around not enough reviewers to review patches, cause the develop >>> process slowing down or the patch can't merge into the codebase. >>> >>> I would like to make some analysis about module / library patch merge >>> rate (maybe fine-grained to per file?), and make a statistic list that can >>> point out which module / library need more people to contribute to it. >>> >>> Are there any API for bugs.python.org can be used, or there is a >>> existing thing just doing what I want to do. (Or maybe Python tracker, who >>> sent the summary can add this kind of function.) >>> >>> Thanks, >>> Louie. >>> _______________________________________________ >>> Python-Dev mailing list >>> Python-Dev at python.org >>> >>> https://mail.python.org/mailman/listinfo/python-dev >>> Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett% >>> 40python.org >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschwabedal at gmail.com Fri Apr 21 05:47:24 2017 From: jschwabedal at gmail.com (Justus Schwabedal) Date: Fri, 21 Apr 2017 11:47:24 +0200 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors Message-ID: Hi everyone, I possibly found a bug in class __init__ and would like to fix it. So I'm looking for a mentor to help me. `class Foo: def __init__(self, bar=[]): self.list = bar spam_1 = Foo() spam_2 = Foo() spam_1.list.append(42) print(spam_2.list)` At least I think it's a bug. Maybe it's a feature.. Best Regards, Jus -- Justus Schwabedal Handy (D): +49 177 939 5281 email: jschwabedal at googlemail.com skype: justus1802 G?rlitzer Str. 22 01099 Dresden, Sachsen Germany Steinkreuzstr. 23 53757 Sankt Augustin, NRW Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From jschwabedal at gmail.com Fri Apr 21 06:09:53 2017 From: jschwabedal at gmail.com (Justus Schwabedal) Date: Fri, 21 Apr 2017 12:09:53 +0200 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: References: Message-ID: Hi everyone, I possibly found a bug in class initialization and would like to fix it. Because it's my first journey to core-dev, I would really appreciate the help of a mentor that I may ask a few questions to get me up to speed. To my person, I have previously worked on larger projects in python, c, and c++ if that information helps, and I'm really curious to learn more about the interiors of the greatest interpreter known to wo-/men. Here comes the bug-producing example: `class Foo: def __init__(self, bar=[]): self.list = bar spam_1 = Foo() spam_2 = Foo() spam_1.list.append(42) print(spam_2.list)` At least I think it's a bug. Maybe it's a feature.. Best Regards, Jus --- f*** me on github :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.f.moore at gmail.com Fri Apr 21 11:07:18 2017 From: p.f.moore at gmail.com (Paul Moore) Date: Fri, 21 Apr 2017 16:07:18 +0100 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: References: Message-ID: This is correct behaviour. I would suggest that you post this to python-list for a full discussion of what's going on here, but basically the default value for argument bar of __init__ is created at class creation time, and then reused for every instance. This is a common mistake made by newcomers, using mutable default arguments for functions (or methods). A google search for "python mutable default argument" should find you some useful explanations of what's going on. Cheers, Paul On 21 April 2017 at 10:47, Justus Schwabedal wrote: > Hi everyone, > > I possibly found a bug in class __init__ and would like to fix it. So I'm > looking for a mentor to help me. > > `class Foo: > def __init__(self, bar=[]): > self.list = bar > > spam_1 = Foo() > spam_2 = Foo() > > spam_1.list.append(42) > print(spam_2.list)` > > At least I think it's a bug. Maybe it's a feature.. > > Best Regards, Jus > > > > > > -- > Justus Schwabedal > > Handy (D): +49 177 939 5281 > email: jschwabedal at googlemail.com > skype: justus1802 > > G?rlitzer Str. 22 > 01099 Dresden, Sachsen > Germany > > Steinkreuzstr. 23 > 53757 Sankt Augustin, NRW > Germany > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/p.f.moore%40gmail.com > From z+py+pydev at m0g.net Fri Apr 21 11:03:57 2017 From: z+py+pydev at m0g.net (Guyzmo) Date: Fri, 21 Apr 2017 17:03:57 +0200 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: References: Message-ID: <20170421150357.kr6cojall2xtwhfa@BuGz.eclipse.m0g.net> On Fri, Apr 21, 2017 at 11:47:24AM +0200, Justus Schwabedal wrote: > At least I think it's a bug. Maybe it's a feature.. it's indeed a feature. > I possibly found a bug in class __init__ and would like to fix it technically, it's a method. More precisely, it's the constructor method. > So I'm looking for a mentor to help me. > > class Foo: > def __init__(self, bar=[]): > self.list = bar > > spam_1 = Foo() > spam_2 = Foo() > > spam_1.list.append(42) > print(spam_2.list)` the argument `bar` of your method is instanciated at the time you're declaring the method. It's happening once for the the lifetime of the execution of your code. By allocating the `bar` reference into the `self.list` member, you're assigning the same *instance* of that list into the `self.list` member. So everytime you create a new Foo instance, you're actually assigning the same `[]` instance into `self.list` which is why, when you mutate the list, it's happening in all the instances of Foo as well. I hope it makes sense to you ! -- Guyzmo From max at zettlmeissl.de Fri Apr 21 11:18:30 2017 From: max at zettlmeissl.de (=?UTF-8?B?Ik1heCBaZXR0bG1lacOfbCI=?=) Date: Fri, 21 Apr 2017 17:18:30 +0200 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: References: Message-ID: On 21 April 2017 at 12:09, Justus Schwabedal wrote: > I possibly found a bug in class initialization and would like to fix it. > > Here comes the bug-producing example: > > `class Foo: > def __init__(self, bar=[]): > self.list = bar > > spam_1 = Foo() > spam_2 = Foo() > > spam_1.list.append(42) > print(spam_2.list)` > > At least I think it's a bug. Maybe it's a feature.. > It is not a bug. It is the way in which Python handles mutable keyword arguments. If you want to use something in this way you should go with def __init__(self, bar=None): if bar is None: bar = [] From mmavrofides at gmail.com Fri Apr 21 11:18:42 2017 From: mmavrofides at gmail.com (Manolis Mavrofidis) Date: Fri, 21 Apr 2017 16:18:42 +0100 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: <20170421150357.kr6cojall2xtwhfa@BuGz.eclipse.m0g.net> References: <20170421150357.kr6cojall2xtwhfa@BuGz.eclipse.m0g.net> Message-ID: In a nutshell. You create two instances and you assign the same list to both of them which you instantiate when you run your code. >>> id(spam_1.list) 4530230984 # <- Here >>> id(spam_2.list) 4530230984 # <- Here >>> id(spam_1) 4530231632 # Nice unique instance >>> id(spam_2) 4530231200 # Nice unique instance as well Try >>> class Foo: ... def __init__(self, list=None): ... self.list = list ... >>> spam_1 = Foo() >>> spam_2 = Foo([]) <- Cheating. >>> spam_1 <__main__.Foo instance at 0x10e05d9e0> >>> spam_2 <__main__.Foo instance at 0x10e05d950> >>> spam_2.list.append(42) >>> print(spam_1.list) None >>> print(spam_2.list) [42] >>> id(spam_1.list) 4527705752 >>> id(spam_2.list) 4530231488 Or something along those lines :) On 21 April 2017 at 16:03, Guyzmo via Python-Dev wrote: > On Fri, Apr 21, 2017 at 11:47:24AM +0200, Justus Schwabedal wrote: >> At least I think it's a bug. Maybe it's a feature.. > > it's indeed a feature. > >> I possibly found a bug in class __init__ and would like to fix it > > technically, it's a method. More precisely, it's the constructor method. > >> So I'm looking for a mentor to help me. >> >> class Foo: >> def __init__(self, bar=[]): >> self.list = bar >> >> spam_1 = Foo() >> spam_2 = Foo() >> >> spam_1.list.append(42) >> print(spam_2.list)` > > the argument `bar` of your method is instanciated at the time you're > declaring the method. It's happening once for the the lifetime of the > execution of your code. > > By allocating the `bar` reference into the `self.list` member, you're > assigning the same *instance* of that list into the `self.list` member. > > So everytime you create a new Foo instance, you're actually assigning > the same `[]` instance into `self.list` which is why, when you mutate > the list, it's happening in all the instances of Foo as well. > > I hope it makes sense to you ! > > -- > Guyzmo > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/mmavrofides%40gmail.com -- "Only those who will risk going too far can possibly find out how far one can go. "T.S. Eliot http://0x109.tuxfamily.org From status at bugs.python.org Fri Apr 21 12:09:09 2017 From: status at bugs.python.org (Python tracker) Date: Fri, 21 Apr 2017 18:09:09 +0200 (CEST) Subject: [Python-Dev] Summary of Python tracker Issues Message-ID: <20170421160909.0549E56AEF@psf.upfronthosting.co.za> ACTIVITY SUMMARY (2017-04-14 - 2017-04-21) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open 5882 ( -7) closed 36004 (+64) total 41886 (+57) Open issues with patches: 2389 Issues opened (39) ================== #30075: Printing ANSI Escape Sequences on Windows 10 http://bugs.python.org/issue30075 opened by Tithen Firion #30076: Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK http://bugs.python.org/issue30076 opened by serhiy.storchaka #30077: Support Apple AIFF-C pseudo compression in aifc.py http://bugs.python.org/issue30077 opened by thruston #30079: Explain why it is recommended to pass args as a string rather http://bugs.python.org/issue30079 opened by iMath #30080: Add the --duplicate option for timeit http://bugs.python.org/issue30080 opened by serhiy.storchaka #30082: hide command prompt when using subprocess.Popen with shell=Fal http://bugs.python.org/issue30082 opened by iMath #30083: Asyncio: GeneratorExit + strange exception http://bugs.python.org/issue30083 opened by socketpair #30085: Discourage operator.__dunder__ functions http://bugs.python.org/issue30085 opened by steven.daprano #30088: mailbox.Maildir doesn't create subdir structure when create=Tr http://bugs.python.org/issue30088 opened by webknjaz #30089: Automatic Unload of Dynamic Library Cause Segfault http://bugs.python.org/issue30089 opened by Chinh Nguyen #30094: PDB enhancement http://bugs.python.org/issue30094 opened by erixoltan #30095: HTMLCalendar allow custom classes http://bugs.python.org/issue30095 opened by Oz.Tiram #30096: Update examples in abc documentation to use abc.ABC http://bugs.python.org/issue30096 opened by brett.cannon #30097: Command-line option to suppress "from None" for debugging http://bugs.python.org/issue30097 opened by rhettinger #30098: Verbose TypeError for asyncio.ensure_future http://bugs.python.org/issue30098 opened by crenwick #30099: Lib2to3 fails with unreadable pickle file http://bugs.python.org/issue30099 opened by Jake Merdich #30100: WeakSet should all discard and remove on items that can have w http://bugs.python.org/issue30100 opened by donkopotamus #30101: Add support for ncurses A_ITALIC http://bugs.python.org/issue30101 opened by Eijebong #30102: improve performance of libSSL usage on hashing http://bugs.python.org/issue30102 opened by gut #30103: uu package uses old encoding http://bugs.python.org/issue30103 opened by LawfulEvil #30104: clang 4.0 miscompiles dtoa.c, giving broken float parsing and http://bugs.python.org/issue30104 opened by haypo #30105: Duplicated connection_made() call for some SSL connections http://bugs.python.org/issue30105 opened by kyuupichan #30106: test_asyncore: test_handle_write() fails in tearDown() http://bugs.python.org/issue30106 opened by haypo #30107: python.core file created when running tests on AMD64 FreeBSD C http://bugs.python.org/issue30107 opened by haypo #30109: make reindent failed. http://bugs.python.org/issue30109 opened by corona10 #30110: test_asyncio reports reference leak http://bugs.python.org/issue30110 opened by xiang.zhang #30113: Add profile test case for trace_dispatch_return assertion http://bugs.python.org/issue30113 opened by louielu #30115: test_logging report reference leak http://bugs.python.org/issue30115 opened by xiang.zhang #30117: test_lib2to3.test_parser.test_all_project_files() fails http://bugs.python.org/issue30117 opened by haypo #30118: Adding unittest for cProfile / profile command line interface http://bugs.python.org/issue30118 opened by louielu #30119: (ftplib) A remote attacker could possibly attack by containing http://bugs.python.org/issue30119 opened by corona10 #30121: Windows: subprocess debug assertion on failure to execute the http://bugs.python.org/issue30121 opened by Segev Finer #30122: Added missing archive programs and close option to Windows doc http://bugs.python.org/issue30122 opened by Decorater #30124: Fix C aliasing issue in Python/dtoa.c to use strict aliasing o http://bugs.python.org/issue30124 opened by haypo #30125: test_SEH() of test_ctypes logs "Windows fatal exception: acces http://bugs.python.org/issue30125 opened by haypo #30126: CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger http://bugs.python.org/issue30126 opened by haypo #30128: xid_start definition for Unicode identifiers refers to xid_con http://bugs.python.org/issue30128 opened by ralph.corderoy #30129: functools.partialmethod should look more like what it's impers http://bugs.python.org/issue30129 opened by skip.montanaro #30130: array.array is not an instance of collections.MutableSequence http://bugs.python.org/issue30130 opened by Alexander Gosselin Most recent 15 issues with no replies (15) ========================================== #30130: array.array is not an instance of collections.MutableSequence http://bugs.python.org/issue30130 #30128: xid_start definition for Unicode identifiers refers to xid_con http://bugs.python.org/issue30128 #30121: Windows: subprocess debug assertion on failure to execute the http://bugs.python.org/issue30121 #30119: (ftplib) A remote attacker could possibly attack by containing http://bugs.python.org/issue30119 #30118: Adding unittest for cProfile / profile command line interface http://bugs.python.org/issue30118 #30117: test_lib2to3.test_parser.test_all_project_files() fails http://bugs.python.org/issue30117 #30113: Add profile test case for trace_dispatch_return assertion http://bugs.python.org/issue30113 #30110: test_asyncio reports reference leak http://bugs.python.org/issue30110 #30105: Duplicated connection_made() call for some SSL connections http://bugs.python.org/issue30105 #30103: uu package uses old encoding http://bugs.python.org/issue30103 #30101: Add support for ncurses A_ITALIC http://bugs.python.org/issue30101 #30099: Lib2to3 fails with unreadable pickle file http://bugs.python.org/issue30099 #30089: Automatic Unload of Dynamic Library Cause Segfault http://bugs.python.org/issue30089 #30083: Asyncio: GeneratorExit + strange exception http://bugs.python.org/issue30083 #30069: External library behave differently when loaded by Python (may http://bugs.python.org/issue30069 Most recent 15 issues waiting for review (15) ============================================= #30099: Lib2to3 fails with unreadable pickle file http://bugs.python.org/issue30099 #30088: mailbox.Maildir doesn't create subdir structure when create=Tr http://bugs.python.org/issue30088 #30080: Add the --duplicate option for timeit http://bugs.python.org/issue30080 #30077: Support Apple AIFF-C pseudo compression in aifc.py http://bugs.python.org/issue30077 #30071: Duck-typing inspect.isfunction() http://bugs.python.org/issue30071 #30058: Buffer overflow in kqueue.control() http://bugs.python.org/issue30058 #30057: signal.signal should check tripped signals http://bugs.python.org/issue30057 #30040: new empty dict can be more small http://bugs.python.org/issue30040 #30028: make test.support.temp_cwd() fork-safe http://bugs.python.org/issue30028 #30014: Speedup DefaultSelectors.modify() by 2x http://bugs.python.org/issue30014 #30006: Deadlocks in `concurrent.futures.ProcessPoolExecutor` http://bugs.python.org/issue30006 #29999: repr() of ImportError misses keyword arguments name and path http://bugs.python.org/issue29999 #29996: Use terminal width by default in pprint http://bugs.python.org/issue29996 #29974: Change typing.TYPE_CHECKING doc example http://bugs.python.org/issue29974 #29947: In SocketServer, why not passing a factory instance for the Re http://bugs.python.org/issue29947 Top 10 most discussed issues (10) ================================= #30104: clang 4.0 miscompiles dtoa.c, giving broken float parsing and http://bugs.python.org/issue30104 16 msgs #30124: Fix C aliasing issue in Python/dtoa.c to use strict aliasing o http://bugs.python.org/issue30124 10 msgs #14102: argparse: add ability to create a man page http://bugs.python.org/issue14102 9 msgs #30030: Simplify _RandomNameSequence http://bugs.python.org/issue30030 9 msgs #30098: Verbose TypeError for asyncio.ensure_future http://bugs.python.org/issue30098 9 msgs #11822: Improve disassembly to show embedded code objects http://bugs.python.org/issue11822 6 msgs #30095: HTMLCalendar allow custom classes http://bugs.python.org/issue30095 6 msgs #30106: test_asyncore: test_handle_write() fails in tearDown() http://bugs.python.org/issue30106 6 msgs #19764: subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUP http://bugs.python.org/issue19764 5 msgs #22319: mailbox.MH chokes on directories without .mh_sequences http://bugs.python.org/issue22319 5 msgs Issues closed (63) ================== #10076: Regex objects became uncopyable in 2.5 http://bugs.python.org/issue10076 closed by serhiy.storchaka #10379: locale.format() input regression http://bugs.python.org/issue10379 closed by berker.peksag #12414: getsizeof() on code objects is wrong http://bugs.python.org/issue12414 closed by serhiy.storchaka #19225: lack of PyExc_BufferError doc http://bugs.python.org/issue19225 closed by berker.peksag #21833: Fix unicodeless build of Python http://bugs.python.org/issue21833 closed by serhiy.storchaka #21834: Fix a number of tests in unicodeless build http://bugs.python.org/issue21834 closed by serhiy.storchaka #21835: Fix Tkinter in unicodeless build http://bugs.python.org/issue21835 closed by serhiy.storchaka #21836: Fix sqlite3 in unicodeless build http://bugs.python.org/issue21836 closed by serhiy.storchaka #21837: Fix tarfile in unicodeless build http://bugs.python.org/issue21837 closed by serhiy.storchaka #21838: Fix ctypes in unicodeless build http://bugs.python.org/issue21838 closed by serhiy.storchaka #21839: Fix distutils in unicodeless build http://bugs.python.org/issue21839 closed by serhiy.storchaka #21841: Fix xml.sax in unicodeless build http://bugs.python.org/issue21841 closed by serhiy.storchaka #21842: Fix IDLE in unicodeless build http://bugs.python.org/issue21842 closed by serhiy.storchaka #21843: Fix doctest in unicodeless build http://bugs.python.org/issue21843 closed by serhiy.storchaka #21845: Fix plistlib in unicodeless build http://bugs.python.org/issue21845 closed by serhiy.storchaka #21846: Fix zipfile in unicodeless build http://bugs.python.org/issue21846 closed by serhiy.storchaka #21848: Fix logging in unicodeless build http://bugs.python.org/issue21848 closed by serhiy.storchaka #21850: Fix httplib and SimpleHTTPServer in unicodeless build http://bugs.python.org/issue21850 closed by serhiy.storchaka #21851: Fix gettext in unicodeless build http://bugs.python.org/issue21851 closed by serhiy.storchaka #21852: Fix optparse in unicodeless build http://bugs.python.org/issue21852 closed by serhiy.storchaka #21854: Fix cookielib in unicodeless build http://bugs.python.org/issue21854 closed by serhiy.storchaka #22352: Ensure opcode names and args fit in disassembly output http://bugs.python.org/issue22352 closed by serhiy.storchaka #23174: shelve.open fails with error "anydbm.error: db type could not http://bugs.python.org/issue23174 closed by rhettinger #24739: allow argparse.FileType to accept newline argument http://bugs.python.org/issue24739 closed by berker.peksag #25632: Document BUILD_*_UNPACK opcodes http://bugs.python.org/issue25632 closed by serhiy.storchaka #27863: multiple issues in _elementtree module http://bugs.python.org/issue27863 closed by serhiy.storchaka #28765: _sre.compile(): be more strict on types of indexgroup and grou http://bugs.python.org/issue28765 closed by serhiy.storchaka #29387: Tabs vs spaces FAQ out of date http://bugs.python.org/issue29387 closed by Mariatta #29738: Fix memory leak in SSLSocket.getpeercert() http://bugs.python.org/issue29738 closed by Mariatta #29838: Check that sq_length and mq_length return non-negative result http://bugs.python.org/issue29838 closed by serhiy.storchaka #29839: Avoid raising OverflowError in len() when __len__() returns ne http://bugs.python.org/issue29839 closed by serhiy.storchaka #29870: ssl socket leak http://bugs.python.org/issue29870 closed by Mariatta #29991: http client marks valid multipart headers with defects. http://bugs.python.org/issue29991 closed by berker.peksag #30011: HTMLParser class is not thread safe http://bugs.python.org/issue30011 closed by serhiy.storchaka #30017: zlib.error: Error -2 while flushing: inconsistent stream state http://bugs.python.org/issue30017 closed by serhiy.storchaka #30018: multiprocessing.Pool garbles call stack for __new__ http://bugs.python.org/issue30018 closed by serhiy.storchaka #30022: Get rid of using EnvironmentError and IOError http://bugs.python.org/issue30022 closed by serhiy.storchaka #30031: Improve queens demo (use argparse and singular form) http://bugs.python.org/issue30031 closed by rhettinger #30034: csv reader chokes on bad quoting in large files http://bugs.python.org/issue30034 closed by terry.reedy #30049: Don't cache tp_iternext http://bugs.python.org/issue30049 closed by rhettinger #30059: No documentation for C type Py_Ellipsis http://bugs.python.org/issue30059 closed by Mariatta #30061: Check if PyObject_Size() raised an error http://bugs.python.org/issue30061 closed by serhiy.storchaka #30065: Insufficient validation in _posixsubprocess.fork_exec() http://bugs.python.org/issue30065 closed by serhiy.storchaka #30068: missing iter(self) in _io._IOBase.readlines http://bugs.python.org/issue30068 closed by xiang.zhang #30070: Fix errors handling in the parser module http://bugs.python.org/issue30070 closed by serhiy.storchaka #30074: compile warnings of _PySlice_Unpack in 2.7 http://bugs.python.org/issue30074 closed by serhiy.storchaka #30078: "-m unittest --help" says nothing about direct script exection http://bugs.python.org/issue30078 closed by berker.peksag #30081: Inconsistent handling of failure of PyModule_AddObject http://bugs.python.org/issue30081 closed by xiang.zhang #30084: starred tuple expression vs list display and function call http://bugs.python.org/issue30084 closed by steven.daprano #30086: type() and len() recognize "abc", expression as "abc" string. http://bugs.python.org/issue30086 closed by rhettinger #30087: pdb issue with type conversion http://bugs.python.org/issue30087 closed by Christoph Zimmermann #30090: Failed to build these modules: _ctypes http://bugs.python.org/issue30090 closed by eric.smith #30091: DeprecationWarning: invalid escape sequence: Only appears on f http://bugs.python.org/issue30091 closed by jdufresne #30092: Replace sys.version to sys.version_info in sysconfig.py http://bugs.python.org/issue30092 closed by serhiy.storchaka #30093: Unicode eq operation with hash. http://bugs.python.org/issue30093 closed by corona10 #30108: test_site modifies sys.path http://bugs.python.org/issue30108 closed by haypo #30111: json module: encoder optimization http://bugs.python.org/issue30111 closed by serhiy.storchaka #30112: Spam http://bugs.python.org/issue30112 closed by christian.heimes #30114: json module: it is not possible to override 'true', 'false' va http://bugs.python.org/issue30114 closed by bob.ippolito #30116: numpy.ndarray.T doesn't change the structure http://bugs.python.org/issue30116 closed by r.david.murray #30120: add new key words to keyword lib http://bugs.python.org/issue30120 closed by r.david.murray #30123: test_venv failed without pip http://bugs.python.org/issue30123 closed by serhiy.storchaka #30127: argparse action not correctly describing the right behavior http://bugs.python.org/issue30127 closed by Diego Costantini From antoine.rozo at gmail.com Fri Apr 21 12:45:12 2017 From: antoine.rozo at gmail.com (Antoine Rozo) Date: Fri, 21 Apr 2017 18:45:12 +0200 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: References: <20170421150357.kr6cojall2xtwhfa@BuGz.eclipse.m0g.net> Message-ID: And it is not related to __init__ method. You have the same behaviour with any other function or method. >>> def append_to_list(item, l=[]): ... l.append(item) ... return l ... >>> append_to_list(1) [1] >>> append_to_list(2) [1, 2] 2017-04-21 17:18 GMT+02:00 Manolis Mavrofidis : > In a nutshell. > You create two instances and you assign the same list to both of them > which you instantiate when you run your code. > >>> id(spam_1.list) > 4530230984 # <- Here > >>> id(spam_2.list) > 4530230984 # <- Here > >>> id(spam_1) > 4530231632 # Nice unique instance > >>> id(spam_2) > 4530231200 # Nice unique instance as well > > Try > >>> class Foo: > ... def __init__(self, list=None): > ... self.list = list > ... > >>> spam_1 = Foo() > >>> spam_2 = Foo([]) <- Cheating. > >>> spam_1 > <__main__.Foo instance at 0x10e05d9e0> > >>> spam_2 > <__main__.Foo instance at 0x10e05d950> > >>> spam_2.list.append(42) > >>> print(spam_1.list) > None > >>> print(spam_2.list) > [42] > >>> id(spam_1.list) > 4527705752 > >>> id(spam_2.list) > 4530231488 > > Or something along those lines :) > > On 21 April 2017 at 16:03, Guyzmo via Python-Dev > wrote: > > On Fri, Apr 21, 2017 at 11:47:24AM +0200, Justus Schwabedal wrote: > >> At least I think it's a bug. Maybe it's a feature.. > > > > it's indeed a feature. > > > >> I possibly found a bug in class __init__ and would like to fix it > > > > technically, it's a method. More precisely, it's the constructor method. > > > >> So I'm looking for a mentor to help me. > >> > >> class Foo: > >> def __init__(self, bar=[]): > >> self.list = bar > >> > >> spam_1 = Foo() > >> spam_2 = Foo() > >> > >> spam_1.list.append(42) > >> print(spam_2.list)` > > > > the argument `bar` of your method is instanciated at the time you're > > declaring the method. It's happening once for the the lifetime of the > > execution of your code. > > > > By allocating the `bar` reference into the `self.list` member, you're > > assigning the same *instance* of that list into the `self.list` member. > > > > So everytime you create a new Foo instance, you're actually assigning > > the same `[]` instance into `self.list` which is why, when you mutate > > the list, it's happening in all the instances of Foo as well. > > > > I hope it makes sense to you ! > > > > -- > > Guyzmo > > _______________________________________________ > > Python-Dev mailing list > > Python-Dev at python.org > > https://mail.python.org/mailman/listinfo/python-dev > > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > mmavrofides%40gmail.com > > > > -- > "Only those who will risk going too far > can possibly find out how far one can go. > "T.S. Eliot > http://0x109.tuxfamily.org > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > antoine.rozo%40gmail.com > -- Antoine Rozo -------------- next part -------------- An HTML attachment was scrubbed... URL: From breamoreboy at yahoo.co.uk Fri Apr 21 16:31:47 2017 From: breamoreboy at yahoo.co.uk (Mark Lawrence) Date: Fri, 21 Apr 2017 21:31:47 +0100 Subject: [Python-Dev] Possible bug in class-init, lookin for mentors In-Reply-To: <20170421150357.kr6cojall2xtwhfa@BuGz.eclipse.m0g.net> References: <20170421150357.kr6cojall2xtwhfa@BuGz.eclipse.m0g.net> Message-ID: On 21/04/2017 16:03, Guyzmo via Python-Dev wrote: > On Fri, Apr 21, 2017 at 11:47:24AM +0200, Justus Schwabedal wrote: >> At least I think it's a bug. Maybe it's a feature.. > > it's indeed a feature. > >> I possibly found a bug in class __init__ and would like to fix it > > technically, it's a method. More precisely, it's the constructor method. > No, __new__ is the constructor, __init__ is the initializer. It is completely impossible to state when a Python object has been initialised as you can throw in attributes any time you like. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence From eric.lafontaine1 at gmail.com Sat Apr 22 15:19:28 2017 From: eric.lafontaine1 at gmail.com (Eric Lafontaine) Date: Sat, 22 Apr 2017 15:19:28 -0400 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: I believe this is a great initiative :). On Apr 18, 2017 12:09, "Louie Lu" wrote: > Hi all, > > After reading some topic at python-committers mailing list, some of the > topics are around not enough reviewers to review patches, cause the develop > process slowing down or the patch can't merge into the codebase. > > I would like to make some analysis about module / library patch merge rate > (maybe fine-grained to per file?), and make a statistic list that can point > out which module / library need more people to contribute to it. > > Are there any API for bugs.python.org can be used, or there is a existing > thing just doing what I want to do. (Or maybe Python tracker, who sent the > summary can add this kind of function.) > > Thanks, > Louie. > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/eric. > lafontaine1%40gmail.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at louie.lu Sat Apr 22 23:21:09 2017 From: me at louie.lu (Louie Lu) Date: Sun, 23 Apr 2017 11:21:09 +0800 Subject: [Python-Dev] Request review of cProfile/profile series issue Message-ID: Hi all, I'm now looking for cProfile/profile lib's issue, and have solve a series of dependent problem, here is the list: #9285 - Add a profile decorator to profile and cProfile #30113 - Allow helper functions to wrap sys.setprofile #18971 - Use argparse in the profile/cProfile modules #30118 - Add unittest for cProfile/profile command line interface It can divide into two categories, first is the context manager problem, and the second is optparse to argparse problem. 1. context manager problem: Relative issue: #9285, #30113 Relative PR: #287, #1212, #1253 This is an issue since 2010, and stop at profile can't simply add a __enter__ and __exit__ to make it a context manager. The main problem is, sys.setprofile() will hit the return and get bad return in profile dispatch_return function. The solution is to insert a simulate call in the helper function, to provide the context between helper frame and where the profile is defined. 2. optparse to argparse problem: Relative issue: #18971, #30118 Relative PR: #1232 Relative patch: profile_argparse.patch Serhiy have provide the patch of replace optparse to argparse in the profile and cProfile, but block by Ezio request of unittest for command line interface. The unittest is provide at #1232, and need to be reivew. If the unittest is add and argparse patch is apply, we can then solve more problem, e.g.: #23420, #29238, #21862 This is what I've investigated for cProfile / profile library now, to be move on, it will need others to review the work. Thanks! Best Regards, Louie. -------------- next part -------------- An HTML attachment was scrubbed... URL: From barry at barrys-emacs.org Sun Apr 23 16:53:00 2017 From: barry at barrys-emacs.org (Barry Scott) Date: Sun, 23 Apr 2017 21:53:00 +0100 Subject: [Python-Dev] Python3 C extension how to support dir() Message-ID: <8A56393C-8D50-4D89-AC74-105F1510A7AE@barrys-emacs.org> I first ask this on python users. But I think the only people that can answer are the core developers. I have a python3 C++ extension that works written using the PyCXX C++ interface. But dir(obj) does not return the list of member variables. With the python2 version supporting the __members__ variable was all that was needed. But __members__ been removed from python3. How should I support dir() from the C API? I cannot use tp_members, not appropiate to the code I'm writing. If I provide __dir__ I then hit the problem I need the C API version of: all_attr = super( mytype, obj ).__dir__(); all_attr.extend( mytype_variable_names ); return all_attr I'm not getting inspiration from the python 3.6 sources for this problem. I did find the object_dir function in typeobject.c, but that has not helped get me move forward. What is the the patten that I should implement? Barry PyCXX From ncoghlan at gmail.com Mon Apr 24 00:00:49 2017 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 24 Apr 2017 14:00:49 +1000 Subject: [Python-Dev] Proposed BDFL Delegate update for PEPs 538 & 540 (assuming UTF-8 for *nix system boundaries) Message-ID: Hi folks (mainly Guido), Due to constraints on his available time, Barry has decided to step down as BDFL-Delegate for PEP 538 (my proposal to default to coercing the legacy C locale to newer UTF-8 based locales when the latter are available). After discussion with Barry and Inada-san, Victor and I are now proposing to invite Naoki Inada to take on the task of being BDFL-Delegate for both PEP 538 and Victor's related PEP 540, with the following rationale: - the two PEPs are sufficiently closely related that Barry, Victor and I think the same person should be the final decision maker for both of them - with the initial delegation of PEP 538 to Barry, Guido indicated he'd prefer to delegate the task rather than having to come fully up to speed on the vagaries of modern *nix locale handling and the current state of the affected system boundaries in CPython - Inada-san has already been active in reviewing and commenting on both proposals - being based in Japan and working with Japanese text and interfaces, Inada-san regularly encounters the developer experience problems that these proposals are intended to help address Assuming Guido's OK with that proposed delegation, I'll update the headers on both PEPs accordingly. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia From guido at python.org Mon Apr 24 00:06:58 2017 From: guido at python.org (Guido van Rossum) Date: Sun, 23 Apr 2017 21:06:58 -0700 Subject: [Python-Dev] Proposed BDFL Delegate update for PEPs 538 & 540 (assuming UTF-8 for *nix system boundaries) In-Reply-To: References: Message-ID: +1. I have full confidence that Inada-san will be a trustworthy delegate for these PEPs. --Guido On Sun, Apr 23, 2017 at 9:00 PM, Nick Coghlan wrote: > Hi folks (mainly Guido), > > Due to constraints on his available time, Barry has decided to step > down as BDFL-Delegate for PEP 538 (my proposal to default to coercing > the legacy C locale to newer UTF-8 based locales when the latter are > available). > > After discussion with Barry and Inada-san, Victor and I are now > proposing to invite Naoki Inada to take on the task of being > BDFL-Delegate for both PEP 538 and Victor's related PEP 540, with the > following rationale: > > - the two PEPs are sufficiently closely related that Barry, Victor and > I think the same person should be the final decision maker for both of > them > - with the initial delegation of PEP 538 to Barry, Guido indicated > he'd prefer to delegate the task rather than having to come fully up > to speed on the vagaries of modern *nix locale handling and the > current state of the affected system boundaries in CPython > - Inada-san has already been active in reviewing and commenting on > both proposals > - being based in Japan and working with Japanese text and interfaces, > Inada-san regularly encounters the developer experience problems that > these proposals are intended to help address > > Assuming Guido's OK with that proposed delegation, I'll update the > headers on both PEPs accordingly. > > Cheers, > Nick. > > -- > Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > guido%40python.org > -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ncoghlan at gmail.com Mon Apr 24 00:08:43 2017 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 24 Apr 2017 14:08:43 +1000 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: On 21 April 2017 at 06:04, Wes Turner wrote: > Roundup has an xmlrpc API: > > - https://sourceforge.net/p/roundup/code/ci/default/tree/roundup/xmlrpc.py > - https://sourceforge.net/p/roundup/code/ci/default/tree/test/test_xmlrpc.py There's also a pending patch to add a HTTPS+JSON REST API to our Roundup instance: http://psf.upfronthosting.co.za/roundup/meta/issue581 Definite +1 for the general idea of collecting and publishing these kinds of statistics, though - I can see them being quite useful to a variety of audiences. Cheers, Nick. P.S. The upstream Roundup project is also interested in offering that capability by default: http://issues.roundup-tracker.org/issue2550734 -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia From ncoghlan at gmail.com Mon Apr 24 00:12:00 2017 From: ncoghlan at gmail.com (Nick Coghlan) Date: Mon, 24 Apr 2017 14:12:00 +1000 Subject: [Python-Dev] Request review of cProfile/profile series issue In-Reply-To: References: Message-ID: On 23 April 2017 at 13:21, Louie Lu wrote: > Hi all, > > I'm now looking for cProfile/profile lib's issue, and have solve a series of > dependent problem, here is the list: > > #9285 - Add a profile decorator to profile and cProfile > #30113 - Allow helper functions to wrap sys.setprofile > #18971 - Use argparse in the profile/cProfile modules > #30118 - Add unittest for cProfile/profile command line interface > > It can divide into two categories, first is the context manager problem, and > the second is optparse to argparse problem. > > 1. context manager problem: > > Relative issue: #9285, #30113 > Relative PR: #287, #1212, #1253 > > This is an issue since 2010, and stop at profile can't simply add a > __enter__ and __exit__ to make it a context manager. The main problem is, > sys.setprofile() will hit the return and get bad return in profile > dispatch_return function. The solution is to insert a simulate call in the > helper function, to provide the context between helper frame and where the > profile is defined. I'd like to second Louie's call for additional review here. I've been reviewing them so far, and they look sensible to me, but I don't personally know the profile code base at all, so there's a strong chance I'll miss subtle details. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia From me at louie.lu Mon Apr 24 11:55:13 2017 From: me at louie.lu (Louie Lu) Date: Mon, 24 Apr 2017 23:55:13 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: Hi all, thanks for all your reply, since roundup didn't contain JSON REST API, and I'm not sure did roundup robot have deal with "patched but still open" situation, thus I do some change to bpo-mergerate and have some result. GitHub repo: https://github.com/lulouie/bpo-mergerate Demo site: https://bpo-mergerate.louie.lu Now bpo-mergerate using SQLite database and no more CSV file, and an update.py script was added, on my host, it will automatically update the bpo patch status hourly. For the site, it is now using ajax and can deal with fuzzy search. The merge rate calculate is now find-grained to per-file, and will automatically count the prefix merge rate, for example: Searching: Lib/test Result: path merged open total rate /Lib/test 3013 1359 4372 68.916 Lib/test/test_ssl.py 60 15 75 80.000 Lib/test/test_inspect.py 56 12 68 82.353 I think the site function is complete now, welcome for any suggestion. (maybe like speed.python.org make a timeline for the merge rate?) Best Regards, Louie. 2017-04-24 12:08 GMT+08:00 Nick Coghlan : > On 21 April 2017 at 06:04, Wes Turner wrote: > > Roundup has an xmlrpc API: > > > > - https://sourceforge.net/p/roundup/code/ci/default/tree/ > roundup/xmlrpc.py > > - https://sourceforge.net/p/roundup/code/ci/default/tree/ > test/test_xmlrpc.py > > There's also a pending patch to add a HTTPS+JSON REST API to our > Roundup instance: > http://psf.upfronthosting.co.za/roundup/meta/issue581 > > Definite +1 for the general idea of collecting and publishing these > kinds of statistics, though - I can see them being quite useful to a > variety of audiences. > > Cheers, > Nick. > > P.S. The upstream Roundup project is also interested in offering that > capability by default: http://issues.roundup-tracker.org/issue2550734 > > -- > Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Mon Apr 24 20:12:08 2017 From: wes.turner at gmail.com (Wes Turner) Date: Mon, 24 Apr 2017 19:12:08 -0500 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: On Monday, April 24, 2017, Louie Lu wrote: > Hi all, > > thanks for all your reply, since roundup didn't contain JSON REST API, and > I'm not sure did roundup robot have deal with "patched but still open" > situation, thus I do some change to bpo-mergerate and have some result. > > GitHub repo: https://github.com/lulouie/bpo-mergerate > Demo site: https://bpo-mergerate.louie.lu > > Now bpo-mergerate using SQLite database and no more CSV file, and an > update.py script was added, on my host, it will automatically update the > bpo patch status hourly. > For the site, it is now using ajax and can deal with fuzzy search. > > The merge rate calculate is now find-grained to per-file, and will > automatically count the prefix merge rate, for example: > > Searching: Lib/test > Result: > path merged open total rate > /Lib/test 3013 1359 4372 68.916 > Lib/test/test_ssl.py 60 15 75 80.000 > Lib/test/test_inspect.py 56 12 68 82.353 > > > I think the site function is complete now, welcome for any suggestion. > (maybe like speed.python.org make a timeline for the merge rate?) > Nice work. Additional per-file factors worth visualizing: - change in test coverage - change in relevant docs.rst - build job ids (which patch on which arch) - benchmark timings - git log --stat Gource is a pretty cool way to visualize file changes by author over time: http://gource.io "Evolution of CPython (gource visualization)" https://youtu.be/tZVG57xFwMk Is there something like `hg churn` for git? I haven't had need; but just found: - https://www.mercurial-iscm.org/wiki/ChurnExtension - https://gist.github.com/aras-p/8289222 (cheat sheet) Does ChurnExtension work with hg-git? - https://github.com/arzzen/git-quick-stats https://github.com/arzzen/git-quick-stats/blob/master/git-quick-stats (bash script) - https://github.com/IonicaBizau/git-stats Json? JSON-LD with the file path as the resource @id really would be great (and mergeable from various build artifacts): - https://www.google.com/search?q=elasticsearch+git+log - westurner/pyrpo canould write streaming JSON from `git log` but not yet `git log --stat` - {SQLAlchemy(SQLite), } > JSON-LD reports with @id URIs for {source, docs} file paths > Best Regards, > Louie. > > 2017-04-24 12:08 GMT+08:00 Nick Coghlan >: > >> On 21 April 2017 at 06:04, Wes Turner > > wrote: >> > Roundup has an xmlrpc API: >> > >> > - https://sourceforge.net/p/roundup/code/ci/default/tree/round >> up/xmlrpc.py >> > - https://sourceforge.net/p/roundup/code/ci/default/tree/test/ >> test_xmlrpc.py >> >> There's also a pending patch to add a HTTPS+JSON REST API to our >> Roundup instance: >> http://psf.upfronthosting.co.za/roundup/meta/issue581 >> >> Definite +1 for the general idea of collecting and publishing these >> kinds of statistics, though - I can see them being quite useful to a >> variety of audiences. >> >> Cheers, >> Nick. >> >> P.S. The upstream Roundup project is also interested in offering that >> capability by default: http://issues.roundup-tracker.org/issue2550734 >> >> -- >> Nick Coghlan | ncoghlan at gmail.com >> | Brisbane, >> Australia >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wes.turner at gmail.com Mon Apr 24 23:15:38 2017 From: wes.turner at gmail.com (Wes Turner) Date: Mon, 24 Apr 2017 22:15:38 -0500 Subject: [Python-Dev] Request review of cProfile/profile series issue In-Reply-To: References: Message-ID: On Sun, Apr 23, 2017 at 11:12 PM, Nick Coghlan wrote: > On 23 April 2017 at 13:21, Louie Lu wrote: > > Hi all, > > > > I'm now looking for cProfile/profile lib's issue, and have solve a > series of > > dependent problem, here is the list: > > > > #9285 - Add a profile decorator to profile and cProfile > %prun -s Src: https://github.com/ipython/ipython/blob/master/IPython/core/magics/execution.py#L187 Docs: https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-prun http://pynash.org/2013/03/06/timing-and-profiling/ %time, %timeit %prun, %lprun %mprun, %memit > > #30113 - Allow helper functions to wrap sys.setprofile > > #18971 - Use argparse in the profile/cProfile modules > > #30118 - Add unittest for cProfile/profile command line interface > > > > It can divide into two categories, first is the context manager problem, > and > > the second is optparse to argparse problem. > > > > 1. context manager problem: > > > > Relative issue: #9285, #30113 > > Relative PR: #287, #1212, #1253 > > > > This is an issue since 2010, and stop at profile can't simply add a > > __enter__ and __exit__ to make it a context manager. The main problem is, > > sys.setprofile() will hit the return and get bad return in profile > > dispatch_return function. The solution is to insert a simulate call in > the > > helper function, to provide the context between helper frame and where > the > > profile is defined. > > I'd like to second Louie's call for additional review here. I've been > reviewing them so far, and they look sensible to me, but I don't > personally know the profile code base at all, so there's a strong > chance I'll miss subtle details. > https://westurner.github.io/wiki/awesome-python-testing#benchmarks - plop, https://github.com/python/cpython/blob/master/Lib/profile.py https://github.com/python/cpython/blob/master/Lib/cProfile.py -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at louie.lu Tue Apr 25 04:18:53 2017 From: me at louie.lu (Louie Lu) Date: Tue, 25 Apr 2017 16:18:53 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: Hi all, Current merge rate is count in a mixed way (patch + PR). After reading Bertt's post "The history behind the decision to move Python to GitHub", I would like to separate the count of merge rate to hg and GitHub. It may check that did migrate to GitHub get the better process of CPython development. Best Regards, Louie. 2017-04-24 23:55 GMT+08:00 Louie Lu : > Hi all, > > thanks for all your reply, since roundup didn't contain JSON REST API, and > I'm not sure did roundup robot have deal with "patched but still open" > situation, thus I do some change to bpo-mergerate and have some result. > > GitHub repo: https://github.com/lulouie/bpo-mergerate > Demo site: https://bpo-mergerate.louie.lu > > Now bpo-mergerate using SQLite database and no more CSV file, and an > update.py script was added, on my host, it will automatically update the > bpo patch status hourly. > For the site, it is now using ajax and can deal with fuzzy search. > > The merge rate calculate is now find-grained to per-file, and will > automatically count the prefix merge rate, for example: > > Searching: Lib/test > Result: > path merged open total rate > /Lib/test 3013 1359 4372 68.916 > Lib/test/test_ssl.py 60 15 75 80.000 > Lib/test/test_inspect.py 56 12 68 82.353 > > > I think the site function is complete now, welcome for any suggestion. > (maybe like speed.python.org make a timeline for the merge rate?) > > Best Regards, > Louie. > > 2017-04-24 12:08 GMT+08:00 Nick Coghlan : > >> On 21 April 2017 at 06:04, Wes Turner wrote: >> > Roundup has an xmlrpc API: >> > >> > - https://sourceforge.net/p/roundup/code/ci/default/tree/round >> up/xmlrpc.py >> > - https://sourceforge.net/p/roundup/code/ci/default/tree/test/ >> test_xmlrpc.py >> >> There's also a pending patch to add a HTTPS+JSON REST API to our >> Roundup instance: >> http://psf.upfronthosting.co.za/roundup/meta/issue581 >> >> Definite +1 for the general idea of collecting and publishing these >> kinds of statistics, though - I can see them being quite useful to a >> variety of audiences. >> >> Cheers, >> Nick. >> >> P.S. The upstream Roundup project is also interested in offering that >> capability by default: http://issues.roundup-tracker.org/issue2550734 >> >> -- >> Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseaaronlopez at gmail.com Tue Apr 25 15:52:57 2017 From: joseaaronlopez at gmail.com (Jose Aaron Lopez Garcia) Date: Tue, 25 Apr 2017 21:52:57 +0200 Subject: [Python-Dev] Details on replacing Python's dict object Message-ID: Hello: I'm attempting to replace Python's dict object with an algorithm I created myself to improve on memory and time consumption of hashmaps. My initial tests on the algorithm show that it manages to keep a stable logarithmic performance even with extremely high load factors (>0.9). My knowledge of C and Python are good enough but I only know how the interpreter works from a theoretical viewpoint, never really done any deep investigation into it. This said, I need expert help to port the algorithm, any insight into the details of the dict object is greatly appreciated (and please let it be as technical and guru-ish as possible). Regards J. Aaron Lopez. -------------- next part -------------- An HTML attachment was scrubbed... URL: From python-ideas at mgmiller.net Tue Apr 25 17:32:41 2017 From: python-ideas at mgmiller.net (Mike Miller) Date: Tue, 25 Apr 2017 14:32:41 -0700 Subject: [Python-Dev] Details on replacing Python's dict object In-Reply-To: References: Message-ID: While not super technical, this talk by RH got me up to speed on recent improvements in the implementation: https://www.youtube.com/watch?v=p33CVV29OG8 I believe there is some sample code linked that you might be able to use for testing/benchmarking, etc. -Mike On 2017-04-25 12:52, Jose Aaron Lopez Garcia wrote: > Hello: > I'm attempting to replace Python's dict object with an algorithm I created > myself to improve on memory and time consumption of hashmaps. > My initial tests on the algorithm show that it manages to keep a stable > logarithmic performance even with extremely high load factors (>0.9). > My knowledge of C and Python are good enough but I only know how the interpreter > works from a theoretical viewpoint, never really done any deep investigation > into it. > This said, I need expert help to port the algorithm, any insight into the > details of the dict object is greatly appreciated (and please let it be as > technical and guru-ish as possible). > Regards J. Aaron Lopez. > From me at louie.lu Wed Apr 26 01:17:16 2017 From: me at louie.lu (Louie Lu) Date: Wed, 26 Apr 2017 13:17:16 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: Hi all, Fix some pr counting issue, and now the bpo-mergerate can choose hg (the old process), git, or all for mergerate counting. Also, relative bpo issue can be expand by clicking row for more detail. demo site: https://bpo-mergerate.louie.lu Best Regards, Louie. 2017-04-25 16:18 GMT+08:00 Louie Lu : > Hi all, > > Current merge rate is count in a mixed way (patch + PR). > > After reading Bertt's post "The history behind the decision to move Python > to GitHub", I would like to separate the count of merge rate to hg and > GitHub. > > It may check that did migrate to GitHub get the better process of CPython > development. > > > Best Regards, > Louie. > > > > 2017-04-24 23:55 GMT+08:00 Louie Lu : > >> Hi all, >> >> thanks for all your reply, since roundup didn't contain JSON REST API, >> and I'm not sure did roundup robot have deal with "patched but still open" >> situation, thus I do some change to bpo-mergerate and have some result. >> >> GitHub repo: https://github.com/lulouie/bpo-mergerate >> Demo site: https://bpo-mergerate.louie.lu >> >> Now bpo-mergerate using SQLite database and no more CSV file, and an >> update.py script was added, on my host, it will automatically update the >> bpo patch status hourly. >> For the site, it is now using ajax and can deal with fuzzy search. >> >> The merge rate calculate is now find-grained to per-file, and will >> automatically count the prefix merge rate, for example: >> >> Searching: Lib/test >> Result: >> path merged open total rate >> /Lib/test 3013 1359 4372 68.916 >> Lib/test/test_ssl.py 60 15 75 80.000 >> Lib/test/test_inspect.py 56 12 68 82.353 >> >> >> I think the site function is complete now, welcome for any suggestion. >> (maybe like speed.python.org make a timeline for the merge rate?) >> >> Best Regards, >> Louie. >> >> 2017-04-24 12:08 GMT+08:00 Nick Coghlan : >> >>> On 21 April 2017 at 06:04, Wes Turner wrote: >>> > Roundup has an xmlrpc API: >>> > >>> > - https://sourceforge.net/p/roundup/code/ci/default/tree/round >>> up/xmlrpc.py >>> > - https://sourceforge.net/p/roundup/code/ci/default/tree/test/ >>> test_xmlrpc.py >>> >>> There's also a pending patch to add a HTTPS+JSON REST API to our >>> Roundup instance: >>> http://psf.upfronthosting.co.za/roundup/meta/issue581 >>> >>> Definite +1 for the general idea of collecting and publishing these >>> kinds of statistics, though - I can see them being quite useful to a >>> variety of audiences. >>> >>> Cheers, >>> Nick. >>> >>> P.S. The upstream Roundup project is also interested in offering that >>> capability by default: http://issues.roundup-tracker.org/issue2550734 >>> >>> -- >>> Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brett at python.org Wed Apr 26 13:04:56 2017 From: brett at python.org (Brett Cannon) Date: Wed, 26 Apr 2017 17:04:56 +0000 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: Thanks for this, Louie! Definitely interesting to look at what modules have the most open patches against them (spoiler alert: it's apparently argparse with 51). On Tue, 25 Apr 2017 at 22:18 Louie Lu wrote: > Hi all, > > Fix some pr counting issue, and now the bpo-mergerate can choose hg (the > old process), git, or all for mergerate counting. Also, relative bpo issue > can be expand by clicking row for more detail. > > demo site: https://bpo-mergerate.louie.lu > > Best Regards, > Louie. > > 2017-04-25 16:18 GMT+08:00 Louie Lu : > >> Hi all, >> >> Current merge rate is count in a mixed way (patch + PR). >> >> After reading Bertt's post "The history behind the decision to move >> Python to GitHub", I would like to separate the count of merge rate to hg >> and GitHub. >> >> It may check that did migrate to GitHub get the better process of CPython >> development. >> >> >> Best Regards, >> Louie. >> >> >> >> 2017-04-24 23:55 GMT+08:00 Louie Lu : >> >>> Hi all, >>> >>> thanks for all your reply, since roundup didn't contain JSON REST API, >>> and I'm not sure did roundup robot have deal with "patched but still open" >>> situation, thus I do some change to bpo-mergerate and have some result. >>> >>> GitHub repo: https://github.com/lulouie/bpo-mergerate >>> Demo site: https://bpo-mergerate.louie.lu >>> >>> Now bpo-mergerate using SQLite database and no more CSV file, and an >>> update.py script was added, on my host, it will automatically update the >>> bpo patch status hourly. >>> For the site, it is now using ajax and can deal with fuzzy search. >>> >>> The merge rate calculate is now find-grained to per-file, and will >>> automatically count the prefix merge rate, for example: >>> >>> Searching: Lib/test >>> Result: >>> path merged open total rate >>> /Lib/test 3013 1359 4372 68.916 >>> Lib/test/test_ssl.py 60 15 75 80.000 >>> Lib/test/test_inspect.py 56 12 68 82.353 >>> >>> >>> I think the site function is complete now, welcome for any suggestion. >>> (maybe like speed.python.org make a timeline for the merge rate?) >>> >>> Best Regards, >>> Louie. >>> >>> 2017-04-24 12:08 GMT+08:00 Nick Coghlan : >>> >>>> On 21 April 2017 at 06:04, Wes Turner wrote: >>>> > Roundup has an xmlrpc API: >>>> > >>>> > - >>>> https://sourceforge.net/p/roundup/code/ci/default/tree/roundup/xmlrpc.py >>>> > - >>>> https://sourceforge.net/p/roundup/code/ci/default/tree/test/test_xmlrpc.py >>>> >>>> There's also a pending patch to add a HTTPS+JSON REST API to our >>>> Roundup instance: >>>> http://psf.upfronthosting.co.za/roundup/meta/issue581 >>>> >>>> Definite +1 for the general idea of collecting and publishing these >>>> kinds of statistics, though - I can see them being quite useful to a >>>> variety of audiences. >>>> >>>> Cheers, >>>> Nick. >>>> >>>> P.S. The upstream Roundup project is also interested in offering that >>>> capability by default: http://issues.roundup-tracker.org/issue2550734 >>>> >>>> -- >>>> Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia >>>> >>> >>> >> > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/brett%40python.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Thu Apr 27 02:14:45 2017 From: tjreedy at udel.edu (Terry Reedy) Date: Thu, 27 Apr 2017 02:14:45 -0400 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: On 4/26/2017 1:17 AM, Louie Lu wrote: > Fix some pr counting issue, and now the bpo-mergerate can choose hg (the > old process), git, or all for mergerate counting. Also, relative bpo > issue can be expand by clicking row for more detail. Details do not seem to be correct. I searched for 'Lib/idlelib'. For pyshell.py, it says 3 merged, 1 open. I clicked and got bpo issues: 29162 29581 29919 30067 The 'open' one is https://bugs.python.org/issue29581, patch at https://github.com/python/cpython/pull/527/commits/de5d514e649729a1f9e6f3e132d8ffb872d38b08 seems to be an error. Lib/idlelib/idle_test/test_calltips.py has 1 and 1 bpo issues: 20185 22392 24665 None of these are idlelib issues. > demo site: https://bpo-mergerate.louie.lu -- Terry Jan Reedy From me at louie.lu Thu Apr 27 07:57:16 2017 From: me at louie.lu (Louie Lu) Date: Thu, 27 Apr 2017 19:57:16 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: Thanks for the reply, 2017-04-27 14:14 GMT+08:00 Terry Reedy : > On 4/26/2017 1:17 AM, Louie Lu wrote: > >> Fix some pr counting issue, and now the bpo-mergerate can choose hg (the >> old process), git, or all for mergerate counting. Also, relative bpo issue >> can be expand by clicking row for more detail. > > > Details do not seem to be correct. I searched for 'Lib/idlelib'. > For pyshell.py, it says 3 merged, 1 open. > I clicked and got bpo issues: 29162 29581 29919 30067 > The 'open' one is https://bugs.python.org/issue29581, patch at > https://github.com/python/cpython/pull/527/commits/de5d514e649729a1f9e6f3e132d8ffb872d38b08 > seems to be an error. You are right, somehow database was wrong, and cannot deal with path change (if there is a change after fetching). Rebuild and fix this problem. > > Lib/idlelib/idle_test/test_calltips.py has 1 and 1 > bpo issues: 20185 22392 24665 > None of these are idlelib issues. > Not that directly, but these bpo issue PR has changed the file. See: bpo-20185: PR 542 bpo-24665: PR 89, and a issue fixed but close PR 898. The detail now will show the relative PR (which bpo and which PR that is merged, fixed, or open) inside. e.g. Lib/idlelib/idle_test/test_calltips.py bpo issues: 20185 22392 24665 PR: bpo-20185: PR 542 bpo-24665: PR 89 Best Regards, Louie. From victor.stinner at gmail.com Thu Apr 27 08:50:43 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Thu, 27 Apr 2017 14:50:43 +0200 Subject: [Python-Dev] TLS issue (unknown CA) on test_imaplib Message-ID: Hi, test_imaplib is starting to fail randomly causing CI tests to fail and buildbots to fail randomly: http://bugs.python.org/issue30175 Can somone please take a look to help me to fix this issue which becomes blocking? test.test_imaplib.RemoteIMAP_SSLTest.test_logincapa_with_client_certfile() fails with: ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:749) RemoteIMAP_SSLTest uses the cyrus.andrew.cmu.edu server with the port 993. Certificate chain: 0 s:/C=US/postalCode=15213/ST=PA/L=Pittsburgh/street=5000 Forbes/O=Carnegie Mellon University/OU=Carnegie Mellon University/OU=Multi-Domain SSL/CN=cyrus.andrew.cmu.edu i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation Secure Server CA 1 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation Secure Server CA i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Certification Authority 2 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Certification Authority i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root 3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root Note: Would it be possible to setup an IMAP server on pythontest.net instead of using a server of an university? http://www.cmu.edu/ Victor From solipsis at pitrou.net Thu Apr 27 09:41:48 2017 From: solipsis at pitrou.net (Antoine Pitrou) Date: Thu, 27 Apr 2017 15:41:48 +0200 Subject: [Python-Dev] TLS issue (unknown CA) on test_imaplib References: Message-ID: <20170427154148.511092a2@fsol> There's also a failure in test_nntplib: https://travis-ci.org/python/cpython/jobs/226384811#L3157-L3171 Regards Antoine. On Thu, 27 Apr 2017 14:50:43 +0200 Victor Stinner wrote: > Hi, > > test_imaplib is starting to fail randomly causing CI tests to fail and > buildbots to fail randomly: > http://bugs.python.org/issue30175 > > Can somone please take a look to help me to fix this issue which > becomes blocking? > > test.test_imaplib.RemoteIMAP_SSLTest.test_logincapa_with_client_certfile() > fails with: > > ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:749) > > RemoteIMAP_SSLTest uses the cyrus.andrew.cmu.edu server with the port 993. > > Certificate chain: > > 0 s:/C=US/postalCode=15213/ST=PA/L=Pittsburgh/street=5000 > Forbes/O=Carnegie Mellon University/OU=Carnegie Mellon > University/OU=Multi-Domain SSL/CN=cyrus.andrew.cmu.edu > i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA > Limited/CN=COMODO RSA Organization Validation Secure Server CA > 1 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA > Limited/CN=COMODO RSA Organization Validation Secure Server CA > i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA > Limited/CN=COMODO RSA Certification Authority > 2 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA > Limited/CN=COMODO RSA Certification Authority > i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust > External CA Root > 3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust > External CA Root > i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust > External CA Root > > Note: Would it be possible to setup an IMAP server on pythontest.net > instead of using a server of an university? http://www.cmu.edu/ > > Victor From victor.stinner at gmail.com Thu Apr 27 09:46:35 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Thu, 27 Apr 2017 15:46:35 +0200 Subject: [Python-Dev] TLS issue (unknown CA) on test_imaplib In-Reply-To: <20170427154148.511092a2@fsol> References: <20170427154148.511092a2@fsol> Message-ID: 2017-04-27 15:41 GMT+02:00 Antoine Pitrou : > There's also a failure in test_nntplib: > https://travis-ci.org/python/cpython/jobs/226384811#L3157-L3171 That's a different issue, unrelated to the SSL issue. EOFError is probably as old as test_nntplib, there are 2 open issues to track this bug: http://bugs.python.org/issue19613 http://bugs.python.org/issue19756 Victor From victor.stinner at gmail.com Thu Apr 27 11:16:15 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Thu, 27 Apr 2017 17:16:15 +0200 Subject: [Python-Dev] TLS issue (unknown CA) on test_imaplib In-Reply-To: References: <20170427154148.511092a2@fsol> Message-ID: 2017-04-27 15:46 GMT+02:00 Victor Stinner : > 2017-04-27 15:41 GMT+02:00 Antoine Pitrou : >> There's also a failure in test_nntplib: >> https://travis-ci.org/python/cpython/jobs/226384811#L3157-L3171 > > That's a different issue, unrelated to the SSL issue. > > EOFError is probably as old as test_nntplib, there are 2 open issues > to track this bug: Oh wait, it seems like nntplib now has a fail rate close to 100% :-/ I created http://bugs.python.org/issue30188 and wrote a fix. I included this nntplib fix in my imaplib PR... Victor From tjreedy at udel.edu Thu Apr 27 16:06:07 2017 From: tjreedy at udel.edu (Terry Reedy) Date: Thu, 27 Apr 2017 16:06:07 -0400 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: On 4/27/2017 7:57 AM, Louie Lu wrote: >> Lib/idlelib/idle_test/test_calltips.py has 1 and 1 >> bpo issues: 20185 22392 24665 >> None of these are idlelib issues. >> > > Not that directly, but these bpo issue PR has changed the file. > See: bpo-20185: PR 542 bpo-24665: PR 89, and a issue fixed but close PR 898. #20185: The PR number is *very* helpful. This issue has multiple patches and 5 PRs merged to default. #22392: PR 89 has about 10 commits. The original, easy-to-find patch, https://github.com/python/cpython/pull/89/commits/6ea78e33b599605b0c1c35fbbc2df493d6dfc80a did not touch test_calltips. It is touched by the latest, not so easy-to-find commit https://github.com/python/cpython/pull/89/commits/54de7aa6c6fffe9b2248153051a24b0e658bf665 I don't know how to get the complete merged diff that would be applied if the green button were pressed. #22392 has PR 899 (merged) and PR 898 (closed). The latter was a blunder that incorporated about 100 already applied patches, mostly from 2016. Take a look. https://github.com/python/cpython/pull/898 Part of doing good statistics is removing bogus data from datasets. Even though you cannot remove 898 from github, you should ignore it in your analysis. All the hits it generates are false positives. This is probably the source of many other false hits for idlelib. > The detail now will show the relative PR (which bpo and which PR that > is merged, fixed, or open) inside. > > e.g. > Lib/idlelib/idle_test/test_calltips.py > bpo issues: 20185 22392 24665 > PR: bpo-20185: PR 542 bpo-24665: PR 89 Note that 898 is so bogus that it cannot be handled properly. For me, the immediate use case is to find patches to idlelib by others that I am not aware of, like the two real ones to test_calltips. I would like an entry box for the start date to put in date last checked. What would be really super would to be able to exclude issues (and associated patches) assigned to me. When you get this polished, I hope you open an issue and PR to add it to one of the cpython and mention it in the devguide. -- Terry Jan Reedy From victor.stinner at gmail.com Thu Apr 27 19:22:59 2017 From: victor.stinner at gmail.com (Victor Stinner) Date: Fri, 28 Apr 2017 01:22:59 +0200 Subject: [Python-Dev] TLS issue (unknown CA) on test_imaplib In-Reply-To: References: <20170427154148.511092a2@fsol> Message-ID: 2017-04-27 17:16 GMT+02:00 Victor Stinner : > Oh wait, it seems like nntplib now has a fail rate close to 100% :-/ I > created http://bugs.python.org/issue30188 and wrote a fix. I included > this nntplib fix in my imaplib PR... I have good news: * I pushed fixes for test_imaplib and test_nntplib in 3.5, 3.6 and master * I contacted the administrator of the NNTP server used by test_nntplib. I noticed a failure this morning (the server was unable to spawn new processes). He fixed the issue, the server should be back. I was aware that Python was using his server and doesn't seem to be annoyed by that. He wrote RFC 6048, RFC 8143, and co-authored the RFC 8054! Network News Transfer Protocol (NNTP) Additions to LIST Command https://tools.ietf.org/html/rfc6048 Using Transport Layer Security (TLS) with Network News Transfer Protocol (NNTP) https://tools.ietf.org/html/rfc8143 Network News Transfer Protocol (NNTP) Extension for Compression https://tools.ietf.org/html/rfc8054 He asked me if Python is going to support the last extension, Compression. I don't know nntplib, so I have to take a look. Victor From me at louie.lu Fri Apr 28 00:12:27 2017 From: me at louie.lu (Louie Lu) Date: Fri, 28 Apr 2017 12:12:27 +0800 Subject: [Python-Dev] API for bugs.python.org or some statistic about lib/module merge rate? In-Reply-To: References: Message-ID: 2017-04-28 4:06 GMT+08:00 Terry Reedy : > On 4/27/2017 7:57 AM, Louie Lu wrote: > >>> Lib/idlelib/idle_test/test_calltips.py has 1 and 1 >>> bpo issues: 20185 22392 24665 >>> None of these are idlelib issues. >>> >> >> Not that directly, but these bpo issue PR has changed the file. >> See: bpo-20185: PR 542 bpo-24665: PR 89, and a issue fixed but close PR >> 898. > > > #20185: The PR number is *very* helpful. This issue has multiple patches > and 5 PRs merged to default. > > #22392: PR 89 has about 10 commits. The original, easy-to-find patch, > https://github.com/python/cpython/pull/89/commits/6ea78e33b599605b0c1c35fbbc2df493d6dfc80a > did not touch test_calltips. > > It is touched by the latest, not so easy-to-find commit > https://github.com/python/cpython/pull/89/commits/54de7aa6c6fffe9b2248153051a24b0e658bf665 > > I don't know how to get the complete merged diff that would be applied if > the green button were pressed. > > #22392 has PR 899 (merged) and PR 898 (closed). The latter was a blunder > that incorporated about 100 already applied patches, mostly from 2016. Take > a look. > https://github.com/python/cpython/pull/898 > > Part of doing good statistics is removing bogus data from datasets. Even > though you cannot remove 898 from github, you should ignore it in your > analysis. All the hits it generates are false positives. This is probably > the source of many other false hits for idlelib. > Now add the blacklist for PR, this is still manual to add into the config I have three cases: PR 898, PR 703, and PR 552. The "automatic" identified should be add in future (probably) >> The detail now will show the relative PR (which bpo and which PR that >> is merged, fixed, or open) inside. >> >> e.g. >> Lib/idlelib/idle_test/test_calltips.py >> bpo issues: 20185 22392 24665 >> PR: bpo-20185: PR 542 bpo-24665: PR 89 > > > Note that 898 is so bogus that it cannot be handled properly. > > For me, the immediate use case is to find patches to idlelib by others that > I am not aware of, like the two real ones to test_calltips. I would like an > entry box for the start date to put in date last checked. What would be The latest bpo-issue check date will now be shown when the cursor hovers on the issue. (That mean, mobile can't see the date now. I think (on mobile) this isn't that needed) > really super would to be able to exclude issues (and associated patches) > assigned to me. This may be update in the future. (Assignee from bpo or GitHub?) > > When you get this polished, I hope you open an issue and PR to add it to one > of the cpython and mention it in the devguide. > Yes, I will. A small question what does it mean "add it to one of the cpython"? > > -- > Terry Jan Reedy > Best Regards, Louie. From status at bugs.python.org Fri Apr 28 12:09:17 2017 From: status at bugs.python.org (Python tracker) Date: Fri, 28 Apr 2017 18:09:17 +0200 (CEST) Subject: [Python-Dev] Summary of Python tracker Issues Message-ID: <20170428160917.09E4556AE6@psf.upfronthosting.co.za> ACTIVITY SUMMARY (2017-04-21 - 2017-04-28) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open 5908 (+26) closed 36048 (+44) total 41956 (+70) Open issues with patches: 2386 Issues opened (49) ================== #30131: test_logging leaks a "dangling" thread http://bugs.python.org/issue30131 opened by haypo #30132: [Windows] test_distutils leaks a vc140.pdb file http://bugs.python.org/issue30132 opened by haypo #30133: Strings that end with properly escaped backslashes cause error http://bugs.python.org/issue30133 opened by Patrick Foley #30134: BytesWarning is missing from the documents http://bugs.python.org/issue30134 opened by cocoatomo #30140: Binary arithmetic does not always call subclasses first http://bugs.python.org/issue30140 opened by Stephan Hoyer #30141: If you forget to call do_handshake, then everything seems to w http://bugs.python.org/issue30141 opened by njs #30143: Using collections ABC from collections.abc rather than collect http://bugs.python.org/issue30143 opened by serhiy.storchaka #30145: Create a How to or Tutorial documentation for asyncio http://bugs.python.org/issue30145 opened by Mariatta #30147: Change in re.escape output is not documented in whatsnew http://bugs.python.org/issue30147 opened by wumpus #30148: Pathological regex behaviour http://bugs.python.org/issue30148 opened by jpakkane #30149: inspect.signature() doesn't support partialmethod without expl http://bugs.python.org/issue30149 opened by serhiy.storchaka #30150: raw debug allocators to not return malloc alignment http://bugs.python.org/issue30150 opened by jtaylor #30151: Race condition in use of _PyOS_SigintEvent on windows http://bugs.python.org/issue30151 opened by njs #30152: Reduce the number of imports for argparse http://bugs.python.org/issue30152 opened by serhiy.storchaka #30154: subprocess.run with stderr connected to a pipe won't timeout w http://bugs.python.org/issue30154 opened by mjpieters #30155: Add ability to get/set tzinfo on datetime instances in C API http://bugs.python.org/issue30155 opened by atuining #30156: PYTHONDUMPREFS segfaults on exit http://bugs.python.org/issue30156 opened by orent #30157: csv.Sniffer.sniff() regex error http://bugs.python.org/issue30157 opened by jcdavis1983 #30158: Deprecation warnings emitted in test_importlib http://bugs.python.org/issue30158 opened by serhiy.storchaka #30159: gdb autoloading python-gdb.py http://bugs.python.org/issue30159 opened by dilyan.palauzov #30160: BaseHTTPRequestHandler.wfile: supported usage unclear http://bugs.python.org/issue30160 opened by jugglinmike #30162: Add _PyTuple_Empty and make PyTuple_New(0) never failing http://bugs.python.org/issue30162 opened by serhiy.storchaka #30164: Testing FTP support in urllib shouldn't use Debian FTP server http://bugs.python.org/issue30164 opened by serhiy.storchaka #30166: Import command-line parsing modules only when needed http://bugs.python.org/issue30166 opened by serhiy.storchaka #30167: site.main() does not work on Python 3.6 and superior if PYTHON http://bugs.python.org/issue30167 opened by anjos #30168: Class Logger is unindented in the documentation. http://bugs.python.org/issue30168 opened by Jim Fasarakis-Hilliard #30169: test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Deb http://bugs.python.org/issue30169 opened by haypo #30170: "tests may fail, unable to create temporary directory" warning http://bugs.python.org/issue30170 opened by haypo #30171: Emit ResourceWarning in multiprocessing Queue destructor http://bugs.python.org/issue30171 opened by haypo #30172: test_tools takes longer than 5 minutes on some buildbots http://bugs.python.org/issue30172 opened by haypo #30173: x86 Windows7 3.x buildbot has the issue #26624 bug http://bugs.python.org/issue30173 opened by haypo #30175: Random test_imaplib.test_logincapa_with_client_certfile failur http://bugs.python.org/issue30175 opened by haypo #30176: curses attribute constants list is incomplete http://bugs.python.org/issue30176 opened by xiang.zhang #30177: pathlib.resolve(strict=False) only includes first child http://bugs.python.org/issue30177 opened by mshuffett #30178: Indent methods and attributes of MimeTypes class http://bugs.python.org/issue30178 opened by Jim Fasarakis-Hilliard #30180: PyArg_ParseTupleAndKeywords supports required keyword only arg http://bugs.python.org/issue30180 opened by llllllllll #30181: Incorrect parsing of test case docstring http://bugs.python.org/issue30181 opened by benf_wspdigital #30183: [HPUX] compilation error in pytime.c with cc compiler http://bugs.python.org/issue30183 opened by haney #30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords http://bugs.python.org/issue30184 opened by serhiy.storchaka #30185: forkserver process should silence KeyboardInterrupt http://bugs.python.org/issue30185 opened by pitrou #30190: unittest's assertAlmostEqual improved error message http://bugs.python.org/issue30190 opened by giampaolo.rodola #30192: hashlib module breaks with 64-bit kernel and 32-bit user space http://bugs.python.org/issue30192 opened by nascheme #30193: Support the buffer protocol in json.loads() http://bugs.python.org/issue30193 opened by fafhrd91 #30195: writing non-ascii characters in xml file using python code emb http://bugs.python.org/issue30195 opened by aimad #30196: Add __matmul__ to collections.Counter http://bugs.python.org/issue30196 opened by J??chym Barv??nek #30197: Enhance swap_attr() and swap_item() in test.support http://bugs.python.org/issue30197 opened by serhiy.storchaka #30198: distutils build_ext: don't run newer_group() in parallel in mu http://bugs.python.org/issue30198 opened by haypo #30199: Warning -- asyncore.socket_map was modified by test_ssl http://bugs.python.org/issue30199 opened by haypo #30200: tkinter ListboxSelect http://bugs.python.org/issue30200 opened by Frank Pae Most recent 15 issues with no replies (15) ========================================== #30200: tkinter ListboxSelect http://bugs.python.org/issue30200 #30199: Warning -- asyncore.socket_map was modified by test_ssl http://bugs.python.org/issue30199 #30198: distutils build_ext: don't run newer_group() in parallel in mu http://bugs.python.org/issue30198 #30197: Enhance swap_attr() and swap_item() in test.support http://bugs.python.org/issue30197 #30196: Add __matmul__ to collections.Counter http://bugs.python.org/issue30196 #30192: hashlib module breaks with 64-bit kernel and 32-bit user space http://bugs.python.org/issue30192 #30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords http://bugs.python.org/issue30184 #30180: PyArg_ParseTupleAndKeywords supports required keyword only arg http://bugs.python.org/issue30180 #30178: Indent methods and attributes of MimeTypes class http://bugs.python.org/issue30178 #30177: pathlib.resolve(strict=False) only includes first child http://bugs.python.org/issue30177 #30168: Class Logger is unindented in the documentation. http://bugs.python.org/issue30168 #30166: Import command-line parsing modules only when needed http://bugs.python.org/issue30166 #30159: gdb autoloading python-gdb.py http://bugs.python.org/issue30159 #30155: Add ability to get/set tzinfo on datetime instances in C API http://bugs.python.org/issue30155 #30145: Create a How to or Tutorial documentation for asyncio http://bugs.python.org/issue30145 Most recent 15 issues waiting for review (15) ============================================= #30197: Enhance swap_attr() and swap_item() in test.support http://bugs.python.org/issue30197 #30193: Support the buffer protocol in json.loads() http://bugs.python.org/issue30193 #30192: hashlib module breaks with 64-bit kernel and 32-bit user space http://bugs.python.org/issue30192 #30190: unittest's assertAlmostEqual improved error message http://bugs.python.org/issue30190 #30184: Add tests for invalid use of PyArg_ParseTupleAndKeywords http://bugs.python.org/issue30184 #30176: curses attribute constants list is incomplete http://bugs.python.org/issue30176 #30166: Import command-line parsing modules only when needed http://bugs.python.org/issue30166 #30162: Add _PyTuple_Empty and make PyTuple_New(0) never failing http://bugs.python.org/issue30162 #30158: Deprecation warnings emitted in test_importlib http://bugs.python.org/issue30158 #30156: PYTHONDUMPREFS segfaults on exit http://bugs.python.org/issue30156 #30152: Reduce the number of imports for argparse http://bugs.python.org/issue30152 #30143: Using collections ABC from collections.abc rather than collect http://bugs.python.org/issue30143 #30134: BytesWarning is missing from the documents http://bugs.python.org/issue30134 #30129: functools.partialmethod should look more like what it's impers http://bugs.python.org/issue30129 #30099: Lib2to3 fails with unreadable pickle file http://bugs.python.org/issue30099 Top 10 most discussed issues (10) ================================= #30175: Random test_imaplib.test_logincapa_with_client_certfile failur http://bugs.python.org/issue30175 14 msgs #30124: Fix C aliasing issue in Python/dtoa.c to use strict aliasing o http://bugs.python.org/issue30124 13 msgs #30152: Reduce the number of imports for argparse http://bugs.python.org/issue30152 13 msgs #30103: uu package uses old encoding http://bugs.python.org/issue30103 10 msgs #23404: 'make touch' does not work with git clones of the source repos http://bugs.python.org/issue23404 8 msgs #30131: test_logging leaks a "dangling" thread http://bugs.python.org/issue30131 7 msgs #30052: URL Quoting page links to function Bytes instead of defintion http://bugs.python.org/issue30052 6 msgs #30104: clang 4.0 miscompiles dtoa.c, giving broken float parsing and http://bugs.python.org/issue30104 6 msgs #30107: python.core file created when running tests on AMD64 FreeBSD C http://bugs.python.org/issue30107 6 msgs #30140: Binary arithmetic does not always call subclasses first http://bugs.python.org/issue30140 6 msgs Issues closed (43) ================== #15718: Possible OverflowError in __len__ method undocumented (when ca http://bugs.python.org/issue15718 closed by serhiy.storchaka #26082: functools.lru_cache user specified cachedict support http://bugs.python.org/issue26082 closed by rhettinger #26828: Implement __length_hint__() on map() and filter() to optimize http://bugs.python.org/issue26828 closed by rhettinger #27613: Empty iterator with fake __len__ is rendered as a single brack http://bugs.python.org/issue27613 closed by serhiy.storchaka #28041: Inconsistent behavior: Get st_nlink from os.stat() and os.scan http://bugs.python.org/issue28041 closed by haypo #28415: PyUnicode_FromFormat integer format handling different from pr http://bugs.python.org/issue28415 closed by xiang.zhang #28698: Python 3.x ctypes c_wchar_p return is different from official http://bugs.python.org/issue28698 closed by berker.peksag #28851: namedtuples field_names sequence preferred http://bugs.python.org/issue28851 closed by Mariatta #29191: liblzma is missing from pcbuild.sln http://bugs.python.org/issue29191 closed by Mariatta #29617: Drop Python 3.4 support from asyncio http://bugs.python.org/issue29617 closed by inada.naoki #29751: PyLong_FromString documentation wrong on numbers with leading http://bugs.python.org/issue29751 closed by Mariatta #29782: Use __builtin_clzl for bits_in_digit if available http://bugs.python.org/issue29782 closed by mark.dickinson #29802: A possible null-pointer dereference in struct.s_unpack_interna http://bugs.python.org/issue29802 closed by serhiy.storchaka #29840: Avoid raising OverflowError in bool() http://bugs.python.org/issue29840 closed by serhiy.storchaka #29867: Add asserts in PyXXX_GET_SIZE macros http://bugs.python.org/issue29867 closed by haypo #29903: struct.Struct Addition http://bugs.python.org/issue29903 closed by haypo #29952: "keys and values" preferred to "keys and elements" for dict co http://bugs.python.org/issue29952 closed by cocoatomo #29974: Change typing.TYPE_CHECKING doc example http://bugs.python.org/issue29974 closed by levkivskyi #30075: Printing ANSI Escape Sequences on Windows 10 http://bugs.python.org/issue30075 closed by terry.reedy #30098: Verbose TypeError for asyncio.ensure_future http://bugs.python.org/issue30098 closed by Mariatta #30101: Add support for ncurses A_ITALIC http://bugs.python.org/issue30101 closed by xiang.zhang #30115: test_logging report reference leak http://bugs.python.org/issue30115 closed by xiang.zhang #30135: default value of argument seems to be overwritten http://bugs.python.org/issue30135 closed by serhiy.storchaka #30136: Add test.support.script_helper to documentation http://bugs.python.org/issue30136 closed by berker.peksag #30137: Equivalent syntax regarding List returns List objects with non http://bugs.python.org/issue30137 closed by steven.daprano #30138: Incorrect documentation of replacement of slice of length 0 http://bugs.python.org/issue30138 closed by sjt #30139: Fix for issue 8743 not available in python MacOS 3.5.1 http://bugs.python.org/issue30139 closed by ned.deily #30142: The "callable" fixer doesn't exist http://bugs.python.org/issue30142 closed by Mariatta #30144: Import collections ABC from collections.abc rather than collec http://bugs.python.org/issue30144 closed by serhiy.storchaka #30146: Difference in behavior between set() and collections.abc.Mutab http://bugs.python.org/issue30146 closed by rhettinger #30153: lru_cache should support invalidations http://bugs.python.org/issue30153 closed by rhettinger #30161: Using `with` statement causes dict to start papering over attr http://bugs.python.org/issue30161 closed by r.david.murray #30163: argparse mx_group is required, when action value equal default http://bugs.python.org/issue30163 closed by paul.j3 #30165: faulthandler acquires lock from signal handler, can deadlock w http://bugs.python.org/issue30165 closed by haypo #30174: Duplicate code in pickletools.py http://bugs.python.org/issue30174 closed by serhiy.storchaka #30179: Update Copyright to 2017 http://bugs.python.org/issue30179 closed by Mariatta #30182: Incorrect in referring to ISO as "International Standards Orga http://bugs.python.org/issue30182 closed by Mariatta #30186: Python interpreter calling "PathCchCombineEx" on startup, Wind http://bugs.python.org/issue30186 closed by steve.dower #30187: Regex becomes invalid in python 3.6 http://bugs.python.org/issue30187 closed by serhiy.storchaka #30188: test_nntplib: random EOFError in setUpClass() http://bugs.python.org/issue30188 closed by haypo #30189: SSL match_hostname does not accept IP Address http://bugs.python.org/issue30189 closed by christian.heimes #30191: > http://bugs.python.org/issue30191 closed by eryksun #30194: AttributeError on opening ZipFile http://bugs.python.org/issue30194 closed by haypo From python at nedharvey.com Sat Apr 29 08:32:16 2017 From: python at nedharvey.com (Edward Ned Harvey (python)) Date: Sat, 29 Apr 2017 12:32:16 +0000 Subject: [Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable Message-ID: Years ago, I fell in love with python and left C an C++ behind. Sometime later, I fell in love with C# because with strong typing, my IDE does most of the work for me - I never have to browse the API to find which method or attribute exists in a class, I can use tab completion for everything, avoid type-o's, etc. So I was recently thrilled to discover type hinting in python, and support included in pycharm. I'm coming back to python now (for the last few months). In python 3.6.1, and pycharm CE 2017.1.1 on windows (I haven't tested other versions or other platforms): The following is recognized and supported by pycharm, but then at runtime, python throws an exception: #!/usr/bin/env python3 def foo(bars: list[str]): for bar in bars: if bar.startswith("hi"): raise ValueError("bar should never say hi") return True if foo(["a","b","c"]): print("Ok") TypeError: 'type' object is not subscriptable The problem is that python doesn't recognize list[str] as a type. Pycharm handles it, and everything works fine if I'm using a non-subscripted type, like plain old int, or str, or anything else. Is this a bug, or is it something python simply hasn't implemented yet, or is it something that's not going to be implemented? Is there a workaround? -------------- next part -------------- An HTML attachment was scrubbed... URL: From levkivskyi at gmail.com Sat Apr 29 09:20:37 2017 From: levkivskyi at gmail.com (Ivan Levkivskyi) Date: Sat, 29 Apr 2017 15:20:37 +0200 Subject: [Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable In-Reply-To: References: Message-ID: You should use List[int] (note capital first letter) and similar for other generic types. Please read https://docs.python.org/3/library/typing.html The fact that this is accepted by PyCharm is a PyCharm bug, and should be reported on their tracker. -- Ivan On 29 April 2017 at 14:32, Edward Ned Harvey (python) wrote: > Years ago, I fell in love with python and left C an C++ behind. Sometime > later, I fell in love with C# because with strong typing, my IDE does most > of the work for me - I never have to browse the API to find which method or > attribute exists in a class, I can use tab completion for everything, avoid > type-o's, etc. So I was recently thrilled to discover type hinting in > python, and support included in pycharm. I'm coming back to python now (for > the last few months). > > > > In python 3.6.1, and pycharm CE 2017.1.1 on windows (I haven't tested > other versions or other platforms): > > > > The following is recognized and supported by pycharm, but then at runtime, > python throws an exception: > > > > #!/usr/bin/env python3 > > > > def foo(bars: list[str]): > > for bar in bars: > > if bar.startswith("hi"): > > raise > ValueError("bar should never say hi") > > return True > > > > > > if foo(["a","b","c"]): > > print("Ok") > > > > > > TypeError: 'type' object is not subscriptable > > > > The problem is that python doesn't recognize list[str] as a type. Pycharm > handles it, and everything works fine if I'm using a non-subscripted type, > like plain old int, or str, or anything else. > > > > Is this a bug, or is it something python simply hasn't implemented yet, or > is it something that's not going to be implemented? > > > > Is there a workaround? > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > levkivskyi%40gmail.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From python at nedharvey.com Sat Apr 29 17:47:36 2017 From: python at nedharvey.com (Edward Ned Harvey (python)) Date: Sat, 29 Apr 2017 21:47:36 +0000 Subject: [Python-Dev] Type hinting: TypeError: 'type' object is not subscriptable In-Reply-To: References: Message-ID: > From: Ivan Levkivskyi [mailto:levkivskyi at gmail.com] > > You should use List[int] (note capital first letter) and similar for other generic > types. > Please read https://docs.python.org/3/library/typing.html > The fact that this is accepted by PyCharm is a PyCharm bug, and should be > reported on their tracker. Thank you. I've reported the issue to jetbrains, and also reported the jetbrains help page for type hinting in pycharm, which describes and provides examples using lowercase, and is where I learned about python type hinting. Based on what you've said, it appears it's both a pycharm bug, and also a jetbrains documentation bug.