This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: posix module lacks several DeprecationWarning's
Type: Stage: resolved
Components: 2to3 (2.x to 3.x conversion tool) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, loewis, mishok13, pitrou, sandro.tosi
Priority: normal Keywords: patch

Created on 2008-12-14 17:34 by mishok13, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
posixmodule.patch mishok13, 2008-12-14 20:47 posixmodule.c patch
issue4662-rel2.7.patch sandro.tosi, 2011-01-02 09:22
Messages (9)
msg77810 - (view) Author: Andrii V. Mishkovskyi (mishok13) Date: 2008-12-14 17:34
posix module lacks DeprecationWarning for the functions listed below:
tempnam, tmpfile, fdopen, getcwdu, popen, tmpnam
All of these are absent in 3.0, so I think adding DeprecationWarning to
all of them would be useful.
Attaching a straight-forward patch against latest trunk checkout.
msg77820 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-12-14 20:09
I don't think a DeprecationWarning is appropriate. Instead, there could
be a -3 warning.
msg77821 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-12-14 20:10
Well, it's trivial to use PyErr_WarnPy3k in place of PyErr_Warn.
msg77823 - (view) Author: Andrii V. Mishkovskyi (mishok13) Date: 2008-12-14 20:47
I've missed one simple thing -- posix.getcwdu has been renamed to
posix.getcwd in 3.0, so adding Py3k deprecation warning to this function
is not really needed. Instead a fix for this should be added to the list
of 2to3 fixes.
I've also fixed the warnings according to Martin's proposal and updated
the patch.
msg125011 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-01-01 22:32
The patch no longer applies cleanly to 2.7 head (but it should be trivial to update it).

Martin, Benjamin: as this targets 2.7, do you think the patch is acceptable in that branch or it's too late?
msg125015 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2011-01-01 22:58
I think the policy is that it is ok to add more 3k warnings to 2.7; these are not considered new features (or explicitly exempted, or some such).
msg125016 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-01-01 23:29
Some of these warnings are incorrect, too; os.popen() and fdopen() remain in Python 3.
msg125038 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-01-02 09:22
I've refreshed the patch to only add DeprecationWarning for tempnam, tmpnam and tmpfile.
msg125087 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-01-02 20:07
Patch committed in r87643, thank you.
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48912
2011-01-02 20:07:11pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg125087

resolution: fixed
stage: patch review -> resolved
2011-01-02 09:22:10sandro.tosisetfiles: + issue4662-rel2.7.patch

messages: + msg125038
nosy: loewis, benjamin.peterson, mishok13, sandro.tosi
stage: patch review
2011-01-01 23:29:02benjamin.petersonsetnosy: loewis, benjamin.peterson, mishok13, sandro.tosi
messages: + msg125016
2011-01-01 22:58:58loewissetnosy: loewis, benjamin.peterson, mishok13, sandro.tosi
messages: + msg125015
2011-01-01 22:32:26sandro.tosisetnosy: loewis, benjamin.peterson, mishok13, sandro.tosi
versions: + Python 2.7, - Python 2.6
2011-01-01 22:32:17sandro.tosisetnosy: loewis, benjamin.peterson, mishok13, sandro.tosi
versions: - Python 2.7
2011-01-01 22:32:03sandro.tosisetnosy: + sandro.tosi
messages: + msg125011
2010-04-10 22:12:14loewissetnosy: loewis, benjamin.peterson, mishok13
components: + 2to3 (2.x to 3.x conversion tool)
2008-12-14 20:47:25mishok13setfiles: + posixmodule.patch
messages: + msg77823
2008-12-14 20:46:08mishok13setfiles: - posixmodule.patch
2008-12-14 20:10:23benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg77821
2008-12-14 20:09:31loewissetnosy: + loewis
messages: + msg77820
2008-12-14 17:34:42mishok13create