public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Arfrever Frehtes Taifersar Arahesis <Arfrever@gentoo.org>
To: Gentoo Development <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] Deprecation of python_version(), python_mod_exists(), python_tkinter_exists(), distutils_python_version() and distutils_python_tkinter() in EAPI <=2
Date: Tue, 2 Mar 2010 19:27:17 +0100	[thread overview]
Message-ID: <201003021927.18379.Arfrever@gentoo.org> (raw)


[-- 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 --]

             reply	other threads:[~2010-03-02 18:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 18:27 Arfrever Frehtes Taifersar Arahesis [this message]
2010-03-03  6:52 ` [gentoo-dev] Deprecation of python_version(), python_mod_exists(), python_tkinter_exists(), distutils_python_version() and distutils_python_tkinter() in EAPI <=2 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003021927.18379.Arfrever@gentoo.org \
    --to=arfrever@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox