Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Pylons application maintenance

Received: by 10.58.172.37 with SMTP id az5mr2188446vec.28.1350238845189;
        Sun, 14 Oct 2012 11:20:45 -0700 (PDT)
X-BeenThere: pylons-discuss@googlegroups.com
Received: by 10.52.73.72 with SMTP id j8ls3011068vdv.7.gmail; Sun, 14 Oct 2012
 11:20:41 -0700 (PDT)
Received: by 10.59.0.194 with SMTP id ba2mr501262ved.19.1350238841779;
        Sun, 14 Oct 2012 11:20:41 -0700 (PDT)
Received: by 10.59.0.194 with SMTP id ba2mr501261ved.19.1350238841767;
        Sun, 14 Oct 2012 11:20:41 -0700 (PDT)
Return-Path: <sluggos...@gmail.com>
Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171])
        by gmr-mx.google.com with ESMTPS id dj17si188613vdb.1.2012.10.14.11.20.41
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 14 Oct 2012 11:20:41 -0700 (PDT)
Received-SPF: pass (google.com: domain of sluggos...@gmail.com designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of sluggos...@gmail.com designates 209.85.220.171 as permitted sender) smtp.mail=sluggos...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-vc0-f171.google.com with SMTP id m18so6452515vcm.16
        for <pylons-discuss@googlegroups.com>; Sun, 14 Oct 2012 11:20:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:date:message-id:subject:from:to:content-type;
        bh=niQye2RGchrGsGGfA/gZnwdOnut5ZOEEfk4P8xus5q8=;
        b=YMtZtb+Ia4oHcYenGcL8shSeIKga71B5DgeoHL/UmBLlpNKRt668tOLEjNUTD7FaLn
         mRN90c6YWeUKZzBfQ4fPw3RcWQufCn1UOoKcl3k+GQWb2y+MUXAW1pX9+o5NKgfdlPz8
         8sXlLpTiIP+KjcPBo0ic4RjisJawYUaVNjoj/ajKC/VXNgpdve9syd9h48CMonB9rTGp
         IZAG5R1ZT16r7TChbQQlC3gF9pZe5Gq5TipTSVxAzMUqdTFHjSZa0mpzlaWZNs5QSBHA
         Eye8Eqryj3eEAZRk3igAOrWcJNbjXVA/aIB3bk8Yn0FVweVeqlvNlO+Z/0EFz8mMvLZu
         0eaQ==
MIME-Version: 1.0
Received: by 10.220.223.13 with SMTP id ii13mr5516485vcb.2.1350238841541; Sun,
 14 Oct 2012 11:20:41 -0700 (PDT)
Received: by 10.220.145.6 with HTTP; Sun, 14 Oct 2012 11:20:41 -0700 (PDT)
Date: Sun, 14 Oct 2012 11:20:41 -0700
Message-ID: <CAH9f=uqoRUVZD_Y-8jNfVx0A9m6OY3R51=V6_WRq31FFMvi...@mail.gmail.com>
Subject: Pylons application maintenance
From: Mike Orr <sluggos...@gmail.com>
To: pylons-discuss@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1

Some cracks have started to appear in Pylons' documentation and
support scripts, so I thought I'd better mention them for people like
Jonathan that are maintaining Pylons programs or writing new ones.

The "go-pylons.py" script was lost in the transition from the old
Pylons sever to the Pyramid server. You can still find an old version
on Google, but it won't work because it tries to download the packages
from a directory that no longer exists on a server whose domain name
has changed. Fortunately, it's pretty easy to do the equivalent
manually:
    1) Download "virtualenv" manually from PyPI.
    2) Inside it you'll find a "virtualenv.py" script.
    3) Run "virtualenv.py NEW_DIRECTORY_NAME". It will install a
virtual Python and Distribute.
    4) Activate the virtualenv per the instructions on PyPI.  ("source
NEW_DIRECTORY_NAME/bin/activate" on Unix, or run a .bat script on
Windows.)
    5) Install Pylons: "pip install Pylons".
    6) If you've already written your application, cd into it and
install it via "pip install -e ." . In this case, you can skip step 5
because it will automatically install Pylons as a dependency.
    7) When you're finished using the virtualenv, deactivate it by
running "deactivate". (Maybe a .bat script on Windows?)

The links from some Pylons docs to third-party docs have broken. The
one I notice most is WebHelpers, which is my fault because I need to
square away its online docs and haven't yet. In the meantime the docs
are under a temporary URL
http://sluggo.scrapping.cc/python/WebHelpers/ .

If you're using the Pylons 1 series, you should be using Pylons 1.0.1,
which was released in August. It's updated for compatibility changes
in Paste, PasteDeploy, and WebOb 1.2. It also has several other small
fixes and enhancements that had accumulated since 1.0.

I'm also supporting Pylons 1 and -- eek! -- Pylons 0.9.7 applications,
because my organization has insufficient developer time to convert
them to Pyramid as fast as I'd wish.  It's easier for me because I've
been with Pylons a long time so I remember when the changes were made.
But the fact remains that Pylons 1 is now 2 1/2 years old, its old
maintainers aren't focusing on it as much as they used to, and cracks
have started to appear. The cracks will doubtlessly get wider over
time. So it would be prudent to:

- Switch to Pyramid when feasable. It has better support and more
thorough documentation.

- Make a "requirements" file listing the versions of dependencies that
are known to work with your application. That way, if a dependency
makes an incompatible change in the future, you won't be stuck until
Pylons is patched. (Run "pip freeze >requirements.txt" to make a
requirements file, then optionally delete any lines that are not
critical to your application.)

- Set up a Pip "download cache", which will copy packages to a
designated directory as they are downloaded, and later install them
from that directory rather than downloading them again. That way,
you'll have a copy of all required packages in their compatible
versions. (Make a directory "~/.pip" containing a file "pip.conf" in
INI format, with an "[install]" section containing "download-cache
~/.pip/download_cache").

- Consider setting up a caching PyPI mirror. This will avoid the need
to go to the network to check current versions of packages when
installing. (I haven't done this part but there are blog articles
about it.)

-- 
Mike Orr <sluggos...@gmail.com>