[BangPypers] "The Python I would like to see" - Armin Ronacher

kracekumar ramaraju kracethekingmaker at gmail.com
Tue Aug 19 22:39:32 CEST 2014


I am late to the party, adding my thoughts.

- It is good to have Python spec and implementation decoupled from each
other. By that it would be possible to have different run time. Lot of
people say rust memory management is good, so someone can implement Python
in rust. Though library compatibility and C code integration will be always
an issue.

- In my opinion other than logical error most of the error I have
encountered working with Python is passing dict to function where model
object was expected and KeyError. Though KeyError in dict can be avoided by
using .get and other technique. Still I haven't figured linter for
Emacs/Sublime which can notify about the type of the argument. Yes, I am
aware of function annotation in Python 3, but I can't see linter/IDE which
has integrated this. When I pass wrong type argument I would like to see
hint in the editor. Without function annotation in python 2.7 it is harder
to make linter aware of types. Though docstring can help to solve this
issue but not completely.

- Though pip, venv solve issue to certain extent. If there are 100+
packages need to be installed, pip will take atleast 60 -  90 seconds to
check all the packages are installed considering venv have all packages
(AWS). Then deploy will look like code deploy + package install + restart
of service. There are high chances request may pile up if restart of
service takes more than 30 - 40 seconds if the app is single page app
(Initial load during peak hours). Also if PyPi is down my deployment will
fail, having PyPi mirror isn't affordable. So far I haven't faced any issue
with PyPi, but there were times when npmjs.org is down :-) Yes you can
package all your dependencies in .deb files and distribute but there is a
cost associated with it. With golang style of deployment all the
installation time and packaging issue is solved with single binary.

+1 for https://talks.golang.org/2012/zen.slide#1.

- At some point I was looking into PEX for deployment, felt it isn't ready
yet, probably will try once again.

On Wed, Aug 20, 2014 at 1:14 AM, Baiju M <baiju.m.mail at gmail.com> wrote:

> On Tue, Aug 19, 2014 at 9:42 PM, Gora Mohanty <gora at mimirtech.com> wrote:
> > On 19 August 2014 21:24, Baiju M <baiju.m.mail at gmail.com> wrote:
> >>
> >> I would like to add one point about deployment of large and complex
> >> applications written in Python. Deployment of these types of
> applications
> >> are very difficult in Python.
> >
> > Would you please elaborate on the difficulties? We are reasonably
> > happy with AWS images to bootstrap the system, then virtualenv, pip,
> > fabric and now ansible to deploy Django apps.
> Using cloud based images, orchestration tools like Ansible, container
> technologies like Docker all helps to make application deployment easier.
> However, it's still complex compared to copying a single binary and
> running it.
> >>                                                    I would love to
> install single statically
> >> linked binaries for deployment. Building these binaries should be very
> fact
> >> also, say less than 1 minute.
> >
> > Statically-linked binaries are so 1990s :-)
> Modern languages like Rust ( http://www.rust-lang.org/ ) & Go (
> http://golang.org/ )
> seems to produce statically linked binaries by default.
> >
> >>                                               This is one of the reason
> I am getting
> >> attracted to Golang :-)
> >
> > For me, the main attraction of Go is the concurrency features. Syntax
> still
> > seems strange, though.
> I felt Go more Pythonic :)
> https://talks.golang.org/2012/zen.slide#1
> Regards,
> Baiju M
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> https://mail.python.org/mailman/listinfo/bangpypers


*Thanks & Regardskracekumar"Talk is cheap, show me the code" -- Linus
Torvaldshttp://kracekumar.com <http://kracekumar.com>*

More information about the BangPypers mailing list