Re: [Python-Dev] Is it useful to update cgitb module?
Extremely useful … for CGI scripts. Now, my sample size is quite small – mainly the #python irc channel on freenode, but I have been informally asking for a few years, and you are the first person I have encountered who admitted to writing and maintaining new CGI based sites. I still say the value of supporting such an obsolete model is… questionable. That said, I have no power to block commits. From: Python-Dev On Behalf Of Glenn Linderman Sent: Sunday, April 8, 2018 2:28 AM To: python-dev@python.org Subject: Re: [Python-Dev] Is it useful to update cgitb module? On 4/7/2018 9:45 PM, Alex Walters wrote: Are there people still actively developing new cgi scripts in python? I know some modern HTTPDs don’t even support classic cgi without some kind of fastcgi daemon in between. I am aware that some parts of various wsgi tools use the cgi module, but is the cgitb module useful for them? Yes. I have several web sites and applications built as Python CGI scripts. cgitb is extremely useful. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Is it useful to update cgitb module?
07.04.18 23:21, Stéphane Blondon пише: I wonder if it's useful to update the cgitb module, in particular the html output. I see some possible improvements: 1. In both text and html versions: When a module is called, there are no parameters (displayed as '()'). I think they are unnecessary. Perhaps the parentheses should be removed? Perhaps it's better to keep them for backward compatibility? ### example for the text version ### $ python3 demo.py [...] /home/stephane/src/cgitest/demo.py in () 7 def func1(a, b): [...] ### end of example ### 2. In html version only: a. If the executed code is in : in this case, it is not shown in the html version because the square brackets are interpreted as a html tag (see the picture in attachement). b. Update the style of the html or/and using html5. It would be prettier but it will be a big change for probably too few benefits. What do you think about them? I can report bugs and send pull-requests for them but I would prefer to get feedbacks before. 2a is definitely a bug. Please open an issue on the bug tracker for. 1 can be considered as a bug or as a request for enhancement. Needed to look at the code closer. And 2b is a separate request for enhancement. All three should be separate issues. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Trying to build from source, test-poplib fails
08.04.18 19:10, Antoine Pitrou пише: On Sat, 7 Apr 2018 17:31:47 -0500 Skip Montanaro wrote: It's been a long while since I rebuilt Python from the Git source. I tried for the first time the other day. Everything passed except test_poplib and test_asyncio. The former just runs and runs and runs. Here's the first traceback I encounter when executing ./python Lib/test/test_poplib.py: test_stls_context (__main__.TestPOP3Class) ... Exception in thread Thread-16: Traceback (most recent call last): File "/home/skip/src/python/cpython/Lib/threading.py", line 917, in _bootstrap_inner self.run() File "Lib/test/test_poplib.py", line 227, in run asyncore.loop(timeout=0.1, count=1) File "/home/skip/src/python/cpython/Lib/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/home/skip/src/python/cpython/Lib/asyncore.py", line 150, in poll read(obj) File "/home/skip/src/python/cpython/Lib/asyncore.py", line 87, in read obj.handle_error() File "/home/skip/src/python/cpython/Lib/asyncore.py", line 83, in read obj.handle_read_event() File "/home/skip/src/python/cpython/Lib/asyncore.py", line 422, in handle_read_event self.handle_read() File "Lib/test/test_poplib.py", line 194, in handle_read self._do_tls_handshake() File "Lib/test/test_poplib.py", line 174, in _do_tls_handshake self.socket.do_handshake() File "/home/skip/src/python/cpython/Lib/ssl.py", line 1108, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1049) [...] I get the same issues too, and this has been happening for quite some time. The tests and/or poplib itself may be written in a fragile way. I get the different issue with test_poplib (running with the -j option). All tests except test_multiprocessing_fork are passed, and test_poplib hangs. I thought it is a misconfiguration on my computer. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Trying to build from source, test-poplib fails
On 2018-04-08 01:33, Skip Montanaro wrote: >> Do you have ca-certificates installed? > > It seems so: > > % apt search ca-certificates | grep installed > > ca-certificates/artful,artful,now 20170717 all [installed] > ca-certificates-mono/artful,artful,now 4.6.2.7+dfsg-1ubuntu1 all > [installed,automatic] > liblwp-protocol-https-perl/artful,artful,now 6.07-2 all [installed] Skip, it's a red herring. Python's test_poplib suite doesn't depend on public CA certs. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Trying to build from source, test-poplib fails
FYI, there is filed issue. https://bugs.python.org/issue33099 ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Trying to build from source, test-poplib fails
On 2018-04-09 10:30, Serhiy Storchaka wrote: >> I get the same issues too, and this has been happening for quite some >> time. The tests and/or poplib itself may be written in a fragile way. > > I get the different issue with test_poplib (running with the -j option). > All tests except test_multiprocessing_fork are passed, and test_poplib > hangs. I thought it is a misconfiguration on my computer. It's not your computer, it's the test suite. It uses the old asyncore library. The test has become unstable since the ssl module properly checks host names, see https://bugs.python.org/issue32706 and https://bugs.python.org/issue32753. In Python 3.6 and earlier, a hostname verification error resulted in a closed connection. Starting with Python 3.7, the ssl module checks the hostname earlier in the TLS handshake. A verification error results in a TLS handshake alert and an exception on the server side. Sometimes the old server code in asyncore runs into a race condition and the test fails. The whole test framework needs to be rewritten from scratch and replaced with something better. I haven't had time to work on it. Christian ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Is it useful to update cgitb module?
On 04/08/2018 12:45 AM, Alex Walters wrote: > Are there people still actively developing new cgi scripts in python? In addition to the "magic" support triggered by 'cgitb.enable()', the module also exposes useful utility functions ('cgitb.html()' and 'cgitb.text()') which are used by non-CGI third-party libraries to render tracebacks for debugging purposes. Enhancing those methods seems pretty reasonable to me. Tres. -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Is it useful to update cgitb module?
cgitb is useful even outside of cgi scripts. I've used "cgitb.enable(format='text')" in the several scripts to get "better" exceptions. On Sun, 8 Apr 2018 at 08:52 Glenn Linderman wrote: > On 4/7/2018 9:45 PM, Alex Walters wrote: > > Are there people still actively developing new cgi scripts in python? I know > some modern HTTPDs don’t even support classic cgi without some kind of > fastcgi daemon in between. I am aware that some parts of various wsgi tools > use the cgi module, but is the cgitb module useful for them? > > > Yes. I have several web sites and applications built as Python CGI > scripts. cgitb is extremely useful. > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/jmcs%40jsantos.eu > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Are undocumented functions part of the stable ABI?
On 2018-04-08 05:17, Nick Coghlan wrote: Changing macro definitions doesn't break the stable ABI, as long as the *old* macro expansions still do the right thing. To me, it looks like a bad idea to change macros. Imagine that the PyCFunction_Check macro changes in Python 3.8. Then an extension module compiled on 3.7 (but run on 3.8) would behave differently from the same extension compiled on 3.8. I cannot imagine that this is in line with the "stable ABI" philosophy. Jeroen. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com