Re: Correct traceback for multiline chain of method calling

2021-07-10 Thread Peter Otten

On 09/07/2021 17:29, Артем Комендантян wrote:

Hello!

There is a code https://pastebin.com/0NLsHuLa.
It has a multiline chain of method calling, when some method fails. In
python3.7 it fails in a row which corresponds to the failing method, in
python3.9 it corresponds to the very first line.

Another similar example is https://pastebin.com/2P9snnMn
The error is on the first line for older pythons too.

I propose to have a line with the method name in traceback if this method
fails.

I develop some library when it is very popular among users to declare some
operations with such multiline chains. Also I want to keep correct
traceback for each operation because the first line is not very informative
when some method occurred more than once in this chain.

Can this improvement be done? Maybe anybody has any other suggestions on
how to get the correct line in traceback right now?


If I understand you correctly there's hope; the upcoming Python 3.10 
will show the failing method call:


Python 3.10.0b3 (tags/v3.10.0b3:865714a, Jun 17 2021, 20:19:11) [MSC 
v.1929 32 bit (Intel)] on win32

Type "help", "copyright", "credits" or "license()" for more information.
class A:
def chain(self): return self
def fail(self): 1/0

(A()
 .chain()
 .chain()
 .fail()
 .chain()
 )
Traceback (most recent call last):
  File "", line 4, in 
.fail()
  File "", line 3, in fail
def fail(self): 1/0
ZeroDivisionError: division by zero


--
https://mail.python.org/mailman/listinfo/python-list


Re: i just moved from bottleframework to flask. I changes what needed to be altered to convert the code and when i run it i just get "Internal server error" Running tail -f ../logs/error_log i get no

2021-07-10 Thread Greg Ewing

On 11/07/21 2:24 am, Dennis Lee Bieber wrote:

Off-hand, that looks like a BASH command, so stuff it in your .bashrc
or .profile and see what happens.


Or make yourself a little shell script that starts flask with
the appopriate settings.

--
Greg

--
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.10.0b4 is available

2021-07-10 Thread Pablo Galindo Salgado
Wow! A release on a Saturday? Do the release management team even rest? You
better believe it, because this is the last of the planned beta releases.
This means that the next pre-release will be the first release candidate of
Python 3.10.0. Remember that our goal is to have no ABI changes after this
beta and a few code changes as possible after 3.10.0rc1.

https://www.python.org/downloads/release/python-3100b4/

#This is a beta preview of Python 3.10

Python 3.10 is still in development. 3.10.0b4 is the fourth and last of the
beta release previews. Beta release previews are intended to give the wider
community the opportunity to test new features and bug fixes and to prepare
their projects to support the new feature release.

We strongly encourage maintainers of third-party Python projects to test
with 3.10 during the beta phase and report issues found to the Python bug
tracker as soon as possible. While the release is planned to be feature
complete entering the beta phase, it is possible that features may be
modified or, in rare cases, deleted up until the start of the release
candidate phase (Monday, 2021-08-02). Our goal is to have no ABI changes
after beta 4 and as few code changes as possible after 3.10.0rc1, the first
release candidate. To achieve that, it will be extremely important to get
as much exposure for 3.10 as possible during the beta phase.

Please keep in mind that this is a preview release and its use is not
recommended for production environments.

The next pre-release, the first release candidate of Python 3.10.0, will be
3.10.0rc1. It is currently scheduled for Monday, 2021-08-02.

#And now for something completely different

In quantum physics, the spin is an intrinsic form of angular momentum
carried by elementary particles, composite particles, and atomic nuclei.
The spin is one of two types of angular momentum in quantum mechanics, the
other being orbital angular momentum. The orbital angular momentum operator
is the quantum-mechanical counterpart to the classical angular momentum of
orbital revolution and appears when there is periodic structure to its
wavefunction as the angle varies. For photons, spin is the
quantum-mechanical counterpart of the polarization of light; for electrons,
the spin has no classical counterpart.

# We hope you enjoy those new releases!

Thanks to all of the many volunteers who help make Python Development and
these releases possible! Please consider supporting our efforts by
volunteering yourself or through organization contributions to the Python
Software Foundation.

Regards from very cloudy London,

Your friendly release team,
Pablo Galindo @pablogsal
Ned Deily @nad
Steve Dower @steve.dower
-- 
https://mail.python.org/mailman/listinfo/python-list