A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/005933.html below:

[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python

[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 PythonBarry Scott barry@scottb.demon.co.uk
Mon, 10 Jul 2000 00:15:49 +0100
The key problem here is that the python engine needs to
verify the version of python that the extension supports
before allowing the extension to do anything dangerous.

Maybe the solution is a pair of functions and a bit of
protocol.

The first function is used for version checking.

	int check_version_##module_name();

The second function will do the init as today.

	init init##module_name();

Based on the outcome of calling the check_version function
python can decide if it should call the init function.

Issues with the check_version function that I can think of
are:

* how is a python version represented?
* should the check_version function be passed the calling
  python's version? This would allow smart extensions to
  adapt to the invoking python's version dependent features.

		Barry




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4