Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is PasteDeploy and do I need to learn it if Eggs in Python are considered gone?

I'm quite new to Python. I've downloaded the Pyramid Framework and have been trying to understand it. It uses many separate tools for its work. For example some PasteDeploy. I tried to read PasteDeploy's manual but can't understand anything. There is almost no valuable examples and explanation. Just syntax. All I understood is that it uses .egg format everywhere. It is based on .egg format:

[composite:main]
use = egg:Paste#urlmap

[app:home]
use = egg:Paste#static

[app:blogapp]
use = egg:BlogApp

At the same time I found that .egg format is going to be thrown away from Python's package's future. Here's the source. And also at the same time the Pyramid is built around eggs too. Every component in its env\Lib\site-packages is an egg component:

chameleon-2.11-py3.3.egg
distribute-0.6.31-py3.3.egg
pastedeploy-1.5.0-py3.3.egg
pyramid-1.4-py3.3.egg
... and so on

So I don't understand why it uses .egg format if it is considered as some sort of "deprecated"? Why it uses PasteDeploy that itself uses almost deprecated .egg format? Should I learn PasteDeploy or there are some more progressive tools out there now but I don't know about them yet? Will .egg format be replaced in Pyramid in closest future?

like image 597
Green Avatar asked Feb 15 '13 20:02

Green


1 Answers

The egg format is absolutely not deprecated and anywhere that you read that is lying to you. There are a lot of issues with Python packaging, but Pyramid embraces the state of the art.

Your link discusses goals for the future, but you can't deprecate something that does not yet have a replacement. It will be many years before egg support is actually dropped (there are thousands of packages that use it). That document is just discussing the futuristic goals of where things should go, and (ignoring Python 3) the community has a strong sentiment toward backward compatibility so even if new formats come out, eggs will continue to be supported for a long time.

PasteDeploy is the package that Pyramid uses for parsing INI files, configuring a WSGI pipeline and configuring a WSGI server.

The documentation for PasteDeploy can be a little rough if you don't have something specific in mind that you are trying to find. Pyramid's docs cover the basic INI settings well enough that you should be able to live off of that for a while and if you have something you are trying to accomplish that you can't find, ask another question on SO or use the mailing list.

Aside from all of this, PasteDeploy is again just used for parsing INI files. Pyramid itself does not actually require the use of an INI in this way, but it's the simplest way to get people off the ground.

like image 81
Michael Merickel Avatar answered Sep 25 '22 02:09

Michael Merickel