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
--- 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 }
signature.asc
Description: This is a digitally signed message part.