public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Deprecation of python_version(), python_mod_exists(), python_tkinter_exists(), distutils_python_version() and distutils_python_tkinter() in EAPI <=2
@ 2010-03-02 18:27 Arfrever Frehtes Taifersar Arahesis
  2010-03-03  6:52 ` Petteri Räty
  0 siblings, 1 reply; 25+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2010-03-02 18:27 UTC (permalink / raw
  To: Gentoo Development


[-- Attachment #1.1: Type: Text/Plain, Size: 903 bytes --]

Members of Gentoo Python Project have agreed to deprecate the following functions
in EAPI <=2:
  - python_version()
  - python_mod_exists()
  - python_tkinter_exists()
  - distutils_python_version()
  - distutils_python_tkinter()

These functions are already banned in EAPI >=3.

1. In this week, these functions will start printing deprecation warnings in older EAPIs.
2. On 2010-07-01, these functions will start calling die().
   (If any ebuilds in gentoo-x86 still call any of these functions on 2010-07-01,
    then addition of calls to die() will be delayed.)
3. On 2011-01-01, these functions will be removed.

I will also send the announcement to gentoo-dev-announce mailing list to ensure
that developers not subscribed to gentoo-dev mailing list will notice the deprecation.
The attached patch shows text of deprecation warnings.

-- 
Arfrever Frehtes Taifersar Arahesis

[-- Attachment #1.2: deprecation_warnings.patch --]
[-- Type: text/x-patch, Size: 2368 bytes --]

--- python.eclass
+++ python.eclass
@@ -1980,6 +1980,15 @@
 		die "${FUNCNAME}() cannot be used in this EAPI"
 	fi
 
+	_python_set_color_variables
+
+	if [[ "${FUNCNAME[1]}" != "distutils_python_version" ]]; then
+		ewarn
+		ewarn "${_RED}Deprecation Warning: ${FUNCNAME}() is deprecated and will be banned on 2010-07-01.${_NORMAL}"
+		ewarn "${_RED}Use PYTHON() instead of python variable. Use python_get_*() instead of PYVER* variables.${_NORMAL}"
+		ewarn
+	fi
+
 	[[ -n "${PYVER}" ]] && return 0
 	local tmpstr
 	python="${python:-${EPREFIX}/usr/bin/python}"
@@ -2011,6 +2020,13 @@
 		die "${FUNCNAME}() cannot be used in this EAPI"
 	fi
 
+	_python_set_color_variables
+
+	ewarn
+	ewarn "${_RED}Deprecation Warning: ${FUNCNAME}() is deprecated and will be banned on 2010-07-01.${_NORMAL}"
+	ewarn "${_RED}Use USE dependencies and/or has_version() instead of ${FUNCNAME}().${_NORMAL}"
+	ewarn
+
 	if [[ "$#" -ne 1 ]]; then
 		die "${FUNCNAME}() requires 1 argument"
 	fi
@@ -2027,6 +2043,15 @@
 		die "${FUNCNAME}() cannot be used in this EAPI"
 	fi
 
+	_python_set_color_variables
+
+	if [[ "${FUNCNAME[1]}" != "distutils_python_tkinter" ]]; then
+		ewarn
+		ewarn "${_RED}Deprecation Warning: ${FUNCNAME}() is deprecated and will be banned on 2010-07-01.${_NORMAL}"
+		ewarn "${_RED}Use PYTHON_USE_WITH=\"xml\" and python_pkg_setup() instead of ${FUNCNAME}().${_NORMAL}"
+		ewarn
+	fi
+
 	if ! "$(PYTHON ${PYTHON_ABI})" -c "from sys import version_info
 if version_info[0] == 3:
 	import tkinter
--- distutils.eclass
+++ distutils.eclass
@@ -382,6 +382,13 @@
 		die "${FUNCNAME}() cannot be used in this EAPI"
 	fi
 
+	_python_set_color_variables
+
+	ewarn
+	ewarn "${_RED}Deprecation Warning: ${FUNCNAME}() is deprecated and will be banned on 2010-07-01.${_NORMAL}"
+	ewarn "${_RED}Use PYTHON() instead of python variable. Use python_get_*() instead of PYVER* variables.${_NORMAL}"
+	ewarn
+
 	python_version
 }
 
@@ -394,5 +401,12 @@
 		die "${FUNCNAME}() cannot be used in this EAPI"
 	fi
 
+	_python_set_color_variables
+
+	ewarn
+	ewarn "${_RED}Deprecation Warning: ${FUNCNAME}() is deprecated and will be banned on 2010-07-01.${_NORMAL}"
+	ewarn "${_RED}Use PYTHON_USE_WITH=\"xml\" and python_pkg_setup() instead of ${FUNCNAME}().${_NORMAL}"
+	ewarn
+
 	python_tkinter_exists
 }

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-03-06  5:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02 18:27 [gentoo-dev] Deprecation of python_version(), python_mod_exists(), python_tkinter_exists(), distutils_python_version() and distutils_python_tkinter() in EAPI <=2 Arfrever Frehtes Taifersar Arahesis
2010-03-03  6:52 ` Petteri Räty
2010-03-03  7:52   ` [gentoo-dev] " Ryan Hill
2010-03-03  8:47     ` Tomáš Chvátal
2010-03-03  9:23       ` Nirbheek Chauhan
2010-03-03 11:09         ` Petteri Räty
2010-03-03 12:40           ` Ryan Hill
2010-03-03 15:55             ` Petteri Räty
2010-03-03 21:39               ` Ryan Hill
2010-03-04  7:13                 ` Petteri Räty
2010-03-04  7:39                   ` Ulrich Mueller
2010-03-04  7:55                     ` Petteri Räty
2010-03-04  9:43                       ` Ulrich Mueller
2010-03-05  3:19                         ` Ryan Hill
2010-03-03 12:47       ` Ciaran McCreesh
2010-03-03 15:08         ` Duncan
2010-03-03 15:46         ` Petteri Räty
2010-03-05  9:54           ` [gentoo-dev] " Peter Hjalmarsson
2010-03-05 11:12             ` Petteri Räty
2010-03-05 20:14               ` [gentoo-dev] " Ryan Hill
2010-03-05 21:00                 ` Mike Frysinger
2010-03-06  5:42                 ` Petteri Räty
2010-03-05 18:40             ` Duncan
2010-03-05 19:16       ` Mike Frysinger
2010-03-03 14:02   ` [gentoo-dev] " Jeremy Olexa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox