Wireshark mailing list archives

Re: Is Python Still Considered Optional for the Build Process? What Should the Minimum Version Be?


From: Anders Broman <anders.broman () ericsson com>
Date: Tue, 31 Jul 2012 09:43:04 +0200

Hi,
Others have to comment on whether we require python or not but it would be nice if you attached your script to a bug 
report so we could have a look at it and have a record of it. I think it should be OK to require python 2.6 as the 
lowest supported level to make things simpler.
Best regards
Anders


________________________________
From: wireshark-dev-bounces () wireshark org [mailto:wireshark-dev-bounces () wireshark org] On Behalf Of robert.bullen 
() usbank com
Sent: den 30 juli 2012 20:27
To: wireshark-dev () wireshark org
Subject: [Wireshark-dev] Is Python Still Considered Optional for the Build Process? What Should the Minimum Version Be?

Hi,

I've taken it upon myself to streamline the build process a little by using a single Python script for the generation 
of all registration files (register.c, all instances of plugin.c, tshark-tap-register.c, and wireshark-tap-register.c). 
This new and improved Python script incorporates all the functionality of four similar but different files that were 
previously responsible for this: make-dissector-reg(.py), make-tap-reg.py, and make-tapreg-dotc.

The approach of the new and improved Python script works well and it benefits the project in a few ways so I'd like to 
submit it. Now I wonder if I need to port over the Python script to an equivalent sh script for build environments 
lacking Python. The developer documentation and most of the make scripts imply that Python is optional.

However, Python may already be mandatory if I understand things correctly, UseMakeDissectorReg.cmake defines a macro 
named REGISTER_DISSECTOR_FILES that currently supports only Python for the generation of register.c and all instances 
of plugin.c, and therefore automake scripts depend on Python.

But not being familiar enough with the entire build process, I'm wondering: is Python still optional or is saying so a 
vestige from yesteryear? Is it time to re-evaluate Python as a hard prerequisite so we can avoid implementing things 
like this twice?

Also, I've taken a dependency on Python 2.5 or later by using the "with" statement (replacing the use of exception 
frames) when performing file I/O. The master build scripts appear to support versions 2.4-2.7, so my use of the "with" 
statement is a problem for only the earliest supported version--2.4. According to Wikipedia, Wireshark's supported 
versions were released as follows:

Python 2.4 - November 30, 2004
Python 2.5 - September 19, 2006
Python 2.6 - October 1, 2008
Python 2.7 - July 3, 2010

Is the Wireshark developer community amenable to upping our minimum Python version to 2.5 two for the sake of code 
readability? Or what about 2.6 which doesn't require using "from __future__ import with_statement" for "with" statement 
support?

Of course these changes would apply to Wireshark versions 1.9 and beyond.

Robert Bullen
Network Application Analysis (NAA)
1 Meridian Crossing
Richfield, MN 55423-3978
Office: 612-973-6216
Email: robert.bullen () usbank com

U.S. BANCORP made the following annotations
---------------------------------------------------------------------
Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by 
electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended 
recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise 
disclosing this information in any manner. Instead, please reply to the sender that you have received this 
communication in error, and then immediately delete it. Thank you in advance for your cooperation.


---------------------------------------------------------------------
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: