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: Rewrite of site.py
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon
Priority: low Keywords: patch

Created on 2004-03-23 15:05 by brett.cannon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
site3.diff brett.cannon, 2004-06-03 04:57 Fix from site2.diff for missing import statement
test_site.py brett.cannon, 2004-06-03 04:58 Fix misuse of site.makepath results in tests
Messages (6)
msg45635 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-03-23 15:05
Brought to you by the PyCon core sprint, I rewrote Lib/site.py to 
clean it up and modernize it.  The biggest change is putting all the 
code into appropriate functions and defining a main() function that 
gets executed at import.  Cleans up the code and allows others to 
run the functions after import in case they want the functionality.

Also modernized it by using sets and universal newlines.

A new test suite is also being included in this tracker item.  You  
can partially run it against the original site.py, but some tests will 
fail since they call new functions.
msg45636 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-03-23 17:37
Logged In: YES 
user_id=357491

Just discovered one of  the regression tests fails if you run all the tests 
with regrtest.py.  Trying to fix now since it is a bug in the test.
msg45637 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-03-23 17:44
Logged In: YES 
user_id=357491

OK, now the test passes.  Problem test was not matching what the code 
did by creating a normalized, absolute path of what was in sys.path .
msg45638 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-05-31 23:39
Logged In: YES 
user_id=357491

Re-generated the diff for site.py; turned out it didn't apply cleanly.
msg45639 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-06-03 04:57
Logged In: YES 
user_id=357491

Thanks to Raymond, I have worked out a single bug in my code (left out 
an import that only shows up under Windows) and fixed some bad tests.  
Unless someone finds some bugs in this in a week or so I will check this 
in.
msg45640 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-06-05 20:36
Logged In: YES 
user_id=357491

Got impatient.  =)  Checked in both the changes to site.py and the 
addition of test_site.py (SF is not responding to ``cvs log`` to get the 
version numbers for the check-in).
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40066
2004-03-23 15:05:34brett.cannoncreate