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: Getting rid of string, types and stat
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: doerwalter Nosy List: doerwalter, nnorwitz
Priority: normal Keywords: patch

Created on 2002-05-30 14:18 by doerwalter, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
diff.txt doerwalter, 2002-05-30 14:18
Messages (6)
msg40180 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-05-30 14:18
This patch gets rid of some of the "import string",
"import types" or "import stat" statements in the
standard library (many still remain, I didn't touch the
tools or Demos directory). I hope I didn't touch any of
the modules that must stay backwards compatible (like
inspect, distutils, sre, anything else?)

Maybe the rest of the function in stat should be made
methods too?
msg40181 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-05-31 19:37
Logged In: YES 
user_id=33168

Note some of these have already been fixed (sorry).
Hopefully there won't be conflicts.

return st.st_atim should be st_atime in ntpath.

Note, string will be changed to basestring per discussion on
python-dev.

At one point, unittest was supposed to remain compatible
with 1.5.2.
I'm not sure if this is still the case.  You should probably
hold off
on that one file.

Once I finish the basestring change, I'll assign the patch
back to
Walter.
msg40182 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-05-31 20:03
Logged In: YES 
user_id=33168

Making other functions in stat methods may be a good idea,
bring it up on python-dev.

I have made the change string -> basestring.
So once you make the changes mentioned in my previous
comment and run the tests, go ahead and check in.

I'm not sure if the code being changed has unit tests.
It would be nice to add those too.
msg40183 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-04 17:26
Logged In: YES 
user_id=89016

string and types is done. Should I check in the os.stat
changes too?
msg40184 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-06-04 17:41
Logged In: YES 
user_id=33168

Yes, do the stat changes too (make sure to fix the a_tim
noted below in ntpath).
Also, could you update the PEP 42 section
which discusses os.stat()/os.statvfs() using attributes.
If the bug referenced is fixed, that should be closed too.
Thanks.
msg40185 - (view) Author: Walter Dörwald (doerwalter) * (Python committer) Date: 2002-06-06 09:53
Logged In: YES 
user_id=89016

Raymond Hettinger has fixed most of the stat stuff already.
Only Lib/fileinput.py and Lib/shutil.py remained. The
versions checked in are:

Lib/fileinput.py 1.13
Lib/shutil.py 1.21
History
Date User Action Args
2022-04-10 16:05:22adminsetgithub: 36667
2002-05-30 14:18:22doerwaltercreate