]> granicus.if.org Git - python/log
python
18 years agoAdd NEWS item for patch #1481079 (r54234).
Collin Winter [Fri, 9 Mar 2007 03:26:32 +0000 (03:26 +0000)]
Add NEWS item for patch #1481079 (r54234).

18 years agoPatch #1481079: Support of HTTP_REFERER in CGIHTTPServer.py
Collin Winter [Fri, 9 Mar 2007 03:15:56 +0000 (03:15 +0000)]
Patch #1481079: Support of HTTP_REFERER in CGIHTTPServer.py

18 years agoIntroduce test.test_support.TransientResource. It's a context manager to
Brett Cannon [Thu, 8 Mar 2007 23:58:11 +0000 (23:58 +0000)]
Introduce test.test_support.TransientResource.  It's a context manager to
surround calls to resources that may or may not be available.  Specifying the
expected exception and attributes to be raised if the resource is not available
prevents overly broad catching of exceptions.

This is meant to help suppress spurious failures by raising
test.test_support.ResourceDenied if the exception matches.  It would probably
be good to go through the various network tests and surround the calls to catch
connection timeouts (as done with test_socket_ssl in this commit).

18 years agoPatch #1668482: don't use '-' in mkstemp
Collin Winter [Thu, 8 Mar 2007 22:16:25 +0000 (22:16 +0000)]
Patch #1668482: don't use '-' in mkstemp

18 years agoSF #1637850: make_table in difflib did not work with unicode
Raymond Hettinger [Thu, 8 Mar 2007 21:33:47 +0000 (21:33 +0000)]
SF #1637850:  make_table in difflib did not work with unicode

18 years agoBackported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 highe...
Collin Winter [Thu, 8 Mar 2007 19:58:14 +0000 (19:58 +0000)]
Backported r54226 from p3yk: Move test_unittest, test_doctest and test_doctest2 higher up in the testing order.

18 years agoSF 1676321: empty() returned wrong result
Raymond Hettinger [Thu, 8 Mar 2007 19:24:27 +0000 (19:24 +0000)]
SF 1676321:  empty() returned wrong result

18 years agoAdd a NEWS entry for rev. 54207,8.
Georg Brandl [Thu, 8 Mar 2007 18:37:31 +0000 (18:37 +0000)]
Add a NEWS entry for rev. 54207,8.

18 years agoFix #1676656: \em is different from \emph...
Georg Brandl [Thu, 8 Mar 2007 17:49:06 +0000 (17:49 +0000)]
Fix #1676656: \em is different from \emph...

18 years agoAdd missing ) in parenthical remark.
Martin v. Löwis [Thu, 8 Mar 2007 13:42:43 +0000 (13:42 +0000)]
Add missing ) in parenthical remark.

18 years agoWindows doesn't support negative timestamps. Skip the tests involving them
Guido van Rossum [Wed, 7 Mar 2007 15:16:29 +0000 (15:16 +0000)]
Windows doesn't support negative timestamps.  Skip the tests involving them
if os.name == "nt".

18 years agoAdd some sanity checks to unittest.TestSuite's addTest(s) methods.
Georg Brandl [Wed, 7 Mar 2007 11:54:49 +0000 (11:54 +0000)]
Add some sanity checks to unittest.TestSuite's addTest(s) methods.
Fixes #878275.

18 years agoPatch #1675471: convert test_pty to unittest.
Georg Brandl [Wed, 7 Mar 2007 11:37:42 +0000 (11:37 +0000)]
Patch #1675471: convert test_pty to unittest.

18 years agoBug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
Martin v. Löwis [Wed, 7 Mar 2007 11:04:33 +0000 (11:04 +0000)]
Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').

18 years agoPatch #1669331: clarify shutil.copyfileobj() behavior wrt. file position.
Georg Brandl [Wed, 7 Mar 2007 09:34:45 +0000 (09:34 +0000)]
Patch #1669331: clarify shutil.copyfileobj() behavior wrt. file position.

18 years agoPatch #787789: allow to pass custom TestRunner instances to unittest's
Georg Brandl [Wed, 7 Mar 2007 09:21:06 +0000 (09:21 +0000)]
Patch #787789: allow to pass custom TestRunner instances to unittest's
main() function.

18 years agoPatches #1550273, #1550272: fix a few bugs in unittest and add a
Georg Brandl [Wed, 7 Mar 2007 09:09:40 +0000 (09:09 +0000)]
Patches #1550273, #1550272: fix a few bugs in unittest and add a
comprehensive test suite for the module.

18 years agoPatch #1001604: glob.glob() now returns unicode filenames if it was
Georg Brandl [Wed, 7 Mar 2007 08:31:51 +0000 (08:31 +0000)]
Patch #1001604: glob.glob() now returns unicode filenames if it was
given a unicode argument and os.listdir() returns unicode filenames.

18 years agoPatch #812285: allow multiple auth schemes in AbstractBasicAuthHandler.
Georg Brandl [Wed, 7 Mar 2007 07:39:06 +0000 (07:39 +0000)]
Patch #812285: allow multiple auth schemes in AbstractBasicAuthHandler.

18 years agoadd versionadded info
George Yoshida [Wed, 7 Mar 2007 04:21:18 +0000 (04:21 +0000)]
add versionadded info

18 years agoPatch #703779: unset __file__ in __main__ after running a file. This
Georg Brandl [Wed, 7 Mar 2007 00:40:28 +0000 (00:40 +0000)]
Patch #703779: unset __file__ in __main__ after running a file. This
makes the filenames the warning module prints much more sensible when
a PYTHONSTARTUP file is used.

18 years agoVariant of patch #697613: don't exit the interpreter on a SystemExit
Georg Brandl [Wed, 7 Mar 2007 00:34:46 +0000 (00:34 +0000)]
Variant of patch #697613: don't exit the interpreter on a SystemExit
exception if the -i command line option or PYTHONINSPECT environment
variable is given, but break into the interactive interpreter just like
on other exceptions or normal program exit.
 (backport)

18 years agoDocument change to curses.
Walter Dörwald [Tue, 6 Mar 2007 21:15:24 +0000 (21:15 +0000)]
Document change to curses.

18 years agoPatch for bug #1633621: if curses.resizeterm() or
Walter Dörwald [Tue, 6 Mar 2007 20:38:57 +0000 (20:38 +0000)]
Patch for bug #1633621: if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.

18 years agoPatch #1654417: make operator.{get,set,del}slice use the full range
Georg Brandl [Tue, 6 Mar 2007 18:59:11 +0000 (18:59 +0000)]
Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.

18 years agoPatch #1673121: update README wrt. OSX default shell.
Georg Brandl [Tue, 6 Mar 2007 18:47:31 +0000 (18:47 +0000)]
Patch #1673121: update README wrt. OSX default shell.

18 years agoPatch #1638879: don't accept strings with embedded NUL bytes in long().
Georg Brandl [Tue, 6 Mar 2007 18:41:12 +0000 (18:41 +0000)]
Patch #1638879: don't accept strings with embedded NUL bytes in long().

18 years agoPatch #1602128: clarify that richcmp methods can return NotImplemented
Georg Brandl [Tue, 6 Mar 2007 18:29:58 +0000 (18:29 +0000)]
Patch #1602128: clarify that richcmp methods can return NotImplemented
and should return True or False otherwise.

18 years agoSmall nit, found by Neal.
Georg Brandl [Tue, 6 Mar 2007 18:21:32 +0000 (18:21 +0000)]
Small nit, found by Neal.

18 years agoFix cmp vs. key argument for list.sort.
Georg Brandl [Tue, 6 Mar 2007 17:49:14 +0000 (17:49 +0000)]
Fix cmp vs. key argument for list.sort.

18 years agoPatch #1646728: datetime.fromtimestamp fails with negative
Guido van Rossum [Tue, 6 Mar 2007 15:50:01 +0000 (15:50 +0000)]
Patch #1646728: datetime.fromtimestamp fails with negative
fractional times.  With unittest.

Somebody please backport to 2.5.

18 years agopatch 1673619 - identify extension modules which cannot be built
Skip Montanaro [Tue, 6 Mar 2007 15:41:38 +0000 (15:41 +0000)]
patch 1673619 - identify extension modules which cannot be built

18 years agoPatch #912410: Replace HTML entity references for attribute values
Martin v. Löwis [Tue, 6 Mar 2007 14:43:00 +0000 (14:43 +0000)]
Patch #912410: Replace HTML entity references for attribute values
in HTMLParser.

18 years agoPatch #1663234: you can now run doctest on test files and modules
Georg Brandl [Tue, 6 Mar 2007 13:37:45 +0000 (13:37 +0000)]
Patch #1663234: you can now run doctest on test files and modules
using "python -m doctest [-v] filename ...".

18 years agoA test case for the defaultdict KeyError bug.
Georg Brandl [Tue, 6 Mar 2007 13:35:00 +0000 (13:35 +0000)]
A test case for the defaultdict KeyError bug.

18 years agoFix another reincarnation of bug #1576657 in defaultdict.
Georg Brandl [Tue, 6 Mar 2007 13:32:52 +0000 (13:32 +0000)]
Fix another reincarnation of bug #1576657 in defaultdict.

18 years agoBug #1674503: close the file opened by execfile() in an error condition.
Georg Brandl [Tue, 6 Mar 2007 12:17:50 +0000 (12:17 +0000)]
Bug #1674503: close the file opened by execfile() in an error condition.

18 years agoPatch #1672481: fix bug in idlelib.MultiCall.
Georg Brandl [Tue, 6 Mar 2007 11:52:24 +0000 (11:52 +0000)]
Patch #1672481: fix bug in idlelib.MultiCall.

18 years agoA test case for the fix in #1674228.
Georg Brandl [Tue, 6 Mar 2007 11:51:14 +0000 (11:51 +0000)]
A test case for the fix in #1674228.

18 years agoPatch #1121142: Implement ZipFile.open.
Martin v. Löwis [Tue, 6 Mar 2007 10:41:24 +0000 (10:41 +0000)]
Patch #1121142: Implement ZipFile.open.

18 years agoPatch #1671450: add a section about subclassing builtin types to the
Georg Brandl [Tue, 6 Mar 2007 10:02:47 +0000 (10:02 +0000)]
Patch #1671450: add a section about subclassing builtin types to the
"extending and embedding" tutorial.

18 years agoNit: a struct field is set to GenericAlloc, not GenericAlloc().
Georg Brandl [Tue, 6 Mar 2007 09:33:01 +0000 (09:33 +0000)]
Nit: a struct field is set to GenericAlloc, not GenericAlloc().

18 years agoPatch #1674228: when assigning a slice (old-style), check for the
Georg Brandl [Mon, 5 Mar 2007 22:28:08 +0000 (22:28 +0000)]
Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot.

18 years agoMinor corrections to docs, and an explanation comentary
Facundo Batista [Mon, 5 Mar 2007 16:31:54 +0000 (16:31 +0000)]
Minor corrections to docs, and an explanation comentary

18 years agoAdded Pete for 3101 too
Neal Norwitz [Mon, 5 Mar 2007 07:52:01 +0000 (07:52 +0000)]
Added Pete for 3101 too

18 years agonote MacPorts/BerkDB change in setup.py
Skip Montanaro [Sun, 4 Mar 2007 20:54:12 +0000 (20:54 +0000)]
note MacPorts/BerkDB change in setup.py

18 years agoTeach setup.py how to find Berkeley DB on Macs using MacPorts.
Skip Montanaro [Sun, 4 Mar 2007 20:52:28 +0000 (20:52 +0000)]
Teach setup.py how to find Berkeley DB on Macs using MacPorts.

18 years agoFix a bug in test_dict and test_userdict, found at the PyPy sprint.
Georg Brandl [Sun, 4 Mar 2007 17:18:54 +0000 (17:18 +0000)]
Fix a bug in test_dict and test_userdict, found at the PyPy sprint.

18 years agoBugs #1668032, #1668036, #1669304: clarify behavior of PyMem_Realloc and _Resize.
Georg Brandl [Fri, 2 Mar 2007 20:30:14 +0000 (20:30 +0000)]
Bugs #1668032, #1668036, #1669304: clarify behavior of PyMem_Realloc and _Resize.

18 years agoFix embarrassing typo and fix constantification of None
Raymond Hettinger [Fri, 2 Mar 2007 19:20:46 +0000 (19:20 +0000)]
Fix embarrassing typo and fix constantification of None

18 years agoBug #1628895: some better tries to find HTML documentation in pydoc.
Georg Brandl [Fri, 2 Mar 2007 14:37:12 +0000 (14:37 +0000)]
Bug #1628895: some better tries to find HTML documentation in pydoc.

18 years agoAdd NamedTuple
Andrew M. Kuchling [Thu, 1 Mar 2007 14:36:12 +0000 (14:36 +0000)]
Add NamedTuple

18 years agoAdd Pat and Eric for work on PEP 3101 in the sandbox
Neal Norwitz [Thu, 1 Mar 2007 07:04:41 +0000 (07:04 +0000)]
Add Pat and Eric for work on PEP 3101 in the sandbox

18 years agoAdd collections.NamedTuple
Raymond Hettinger [Thu, 1 Mar 2007 06:16:43 +0000 (06:16 +0000)]
Add collections.NamedTuple

18 years agoPrepare collections module for pure python code entries.
Raymond Hettinger [Wed, 28 Feb 2007 18:37:52 +0000 (18:37 +0000)]
Prepare collections module for pure python code entries.

18 years agoDocstring nit.
Raymond Hettinger [Wed, 28 Feb 2007 18:27:41 +0000 (18:27 +0000)]
Docstring nit.

18 years agoAdd a test for instantiating SyntaxError with no arguments.
Brett Cannon [Wed, 28 Feb 2007 18:15:00 +0000 (18:15 +0000)]
Add a test for instantiating SyntaxError with no arguments.

18 years agoModify the segfaulting example to show why r53997 is not a solution to
Armin Rigo [Wed, 28 Feb 2007 09:25:29 +0000 (09:25 +0000)]
Modify the segfaulting example to show why r53997 is not a solution to
it.

18 years agoAdd news about changes to metaclasses and __bases__ error checking.
Jeremy Hylton [Tue, 27 Feb 2007 18:33:31 +0000 (18:33 +0000)]
Add news about changes to metaclasses and __bases__ error checking.

18 years agoAdd checking for a number of metaclass error conditions.
Jeremy Hylton [Tue, 27 Feb 2007 18:29:45 +0000 (18:29 +0000)]
Add checking for a number of metaclass error conditions.

We add some new rules that are required for preserving internal
invariants of types.

1.  If type (or a subclass of type) appears in bases, it must appear
    before any non-type bases.  If a non-type base (like a regular
    new-style class) occurred first, it could trick type into
    allocating the new class an __dict__ which must be impossible.

2. There are several checks that are made of bases when creating a
   type.  Those checks are now repeated when assigning to __bases__.
   We also add the restriction that assignment to __bases__ may not
   change the metaclass of the type.

Add new tests for these cases and for a few other oddball errors that
were no previously tested.  Remove a crasher test that was fixed.

Also some internal refactoring:  Extract the code to find the most
derived metaclass of a type and its bases.  It is now needed in two
places.  Rewrite the TypeError checks in test_descr to use doctest.
The tests now clearly show what exception they expect to see.

18 years agowhitespace normalization
Jeremy Hylton [Tue, 27 Feb 2007 17:24:48 +0000 (17:24 +0000)]
whitespace normalization

18 years agotabify
Jeremy Hylton [Tue, 27 Feb 2007 16:13:23 +0000 (16:13 +0000)]
tabify

Note that ast.c still has a mix of tabs and spaces, because it
attempts to use four-space indents for more of the new code.

18 years agotabify
Jeremy Hylton [Tue, 27 Feb 2007 16:00:06 +0000 (16:00 +0000)]
tabify

18 years agoFix long-standing bug in name mangling for package imports
Jeremy Hylton [Tue, 27 Feb 2007 01:01:59 +0000 (01:01 +0000)]
Fix long-standing bug in name mangling for package imports

Reported by Mike Verdone.

18 years agoAdd some items
Andrew M. Kuchling [Mon, 26 Feb 2007 23:54:17 +0000 (23:54 +0000)]
Add some items

18 years agoSF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions
Neal Norwitz [Mon, 26 Feb 2007 23:48:27 +0000 (23:48 +0000)]
SF #1669182, 2.5 was already fixed.  Just assert in 2.6 since string exceptions
are gone.

18 years agoMarkup fix
Andrew M. Kuchling [Mon, 26 Feb 2007 23:02:47 +0000 (23:02 +0000)]
Markup fix

18 years agoWhen printing an unraisable error, don't print exceptions. before the name.
Neal Norwitz [Mon, 26 Feb 2007 22:41:45 +0000 (22:41 +0000)]
When printing an unraisable error, don't print exceptions. before the name.
This duplicates the behavior whening normally printing exceptions.

18 years agoFix assertion.
Jeremy Hylton [Mon, 26 Feb 2007 19:00:20 +0000 (19:00 +0000)]
Fix assertion.

18 years agoDo not copy free variables to locals in class namespaces.
Jeremy Hylton [Mon, 26 Feb 2007 18:41:18 +0000 (18:41 +0000)]
Do not copy free variables to locals in class namespaces.

Fixes bug 1569356, but at the cost of a minor incompatibility in
locals().  Add test that verifies that the class namespace is not
polluted.  Also clarify the behavior in the library docs.

Along the way, cleaned up the dict_to_map and map_to_dict
implementations and added some comments that explain what they do.

18 years agoFix a couple of problems in generating the AST code:
Neal Norwitz [Mon, 26 Feb 2007 18:10:47 +0000 (18:10 +0000)]
Fix a couple of problems in generating the AST code:
 * use %r instead of backticks since backticks are going away in Py3k
 * PyArena_Malloc() already sets PyErr_NoMemory so we don't need to do it again
 * the signature for ast2obj_int incorrectly used a bool, rather than a long

18 years agoFix typo.
Georg Brandl [Mon, 26 Feb 2007 17:09:03 +0000 (17:09 +0000)]
Fix typo.

18 years agoAdd Steven Bethard to help out with patches.
Neal Norwitz [Mon, 26 Feb 2007 17:01:08 +0000 (17:01 +0000)]
Add Steven Bethard to help out with patches.

18 years agoReformat long lines.
Jeremy Hylton [Mon, 26 Feb 2007 16:14:51 +0000 (16:14 +0000)]
Reformat long lines.

18 years agoBackport from Py3k branch: fix refleak in PyString_Format.
Georg Brandl [Mon, 26 Feb 2007 13:51:29 +0000 (13:51 +0000)]
Backport from Py3k branch: fix refleak in PyString_Format.

18 years agoBackported r51621 from p3yk:
Thomas Wouters [Sun, 25 Feb 2007 22:12:31 +0000 (22:12 +0000)]
Backported r51621 from p3yk:

Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
Should be backported to 2.5.

18 years agoVariation of patch # 1624059 to speed up checking if an object is a subclass
Neal Norwitz [Sun, 25 Feb 2007 19:44:48 +0000 (19:44 +0000)]
Variation of patch # 1624059 to speed up checking if an object is a subclass
of some of the common builtin types.

Use a bit in tp_flags for each common builtin type.  Check the bit
to determine if any instance is a subclass of these common types.
The check avoids a function call and O(n) search of the base classes.
The check is done in the various Py*_Check macros rather than calling
PyType_IsSubtype().

All the bits are set in tp_flags when the type is declared
in the Objects/*object.c files because PyType_Ready() is not called
for all the types.  Should PyType_Ready() be called for all types?
If so and the change is made, the changes to the Objects/*object.c files
can be reverted (remove setting the tp_flags).  Objects/typeobject.c
would also have to be modified to add conditions
for Py*_CheckExact() in addition to each the PyType_IsSubtype check.

18 years ago- SF patch #1657613: add documentation for the Element interface
Fred Drake [Sun, 25 Feb 2007 17:56:27 +0000 (17:56 +0000)]
- SF patch #1657613: add documentation for the Element interface
- clean up bogus use of the {datadescni} environment everywhere

18 years agoPut declarations before code.
Jeremy Hylton [Sun, 25 Feb 2007 16:01:58 +0000 (16:01 +0000)]
Put declarations before code.

18 years agoFix crash in exec when unicode filename can't be decoded.
Jeremy Hylton [Sun, 25 Feb 2007 15:57:45 +0000 (15:57 +0000)]
Fix crash in exec when unicode filename can't be decoded.

I can't think of an easy way to test this behavior.  It only occurs
when the file system default encoding and the interpreter default
encoding are different, such that you can open the file but not decode
its name.

18 years agoWhitespace only changes
Neal Norwitz [Sun, 25 Feb 2007 15:53:36 +0000 (15:53 +0000)]
Whitespace only changes

18 years agoAdd more details when releasing interned strings
Neal Norwitz [Sun, 25 Feb 2007 15:52:27 +0000 (15:52 +0000)]
Add more details when releasing interned strings

18 years agoRefactor PEP 352 tests to make it easier in the future to make sure certain
Brett Cannon [Fri, 23 Feb 2007 14:28:25 +0000 (14:28 +0000)]
Refactor PEP 352 tests to make it easier in the future to make sure certain
things cannot be raised or caught.

18 years agoFix typo in comment
Neal Norwitz [Fri, 23 Feb 2007 00:22:39 +0000 (00:22 +0000)]
Fix typo in comment

18 years agoRemove filler struct item and fix leak.
Raymond Hettinger [Wed, 21 Feb 2007 17:22:05 +0000 (17:22 +0000)]
Remove filler struct item and fix leak.

18 years agoAdd itertools.izip_longest().
Raymond Hettinger [Wed, 21 Feb 2007 05:20:38 +0000 (05:20 +0000)]
Add itertools.izip_longest().

18 years agoFixup set/dict interoperability.
Raymond Hettinger [Mon, 19 Feb 2007 20:44:04 +0000 (20:44 +0000)]
Fixup set/dict interoperability.

18 years agoFixup docstrings for merge().
Raymond Hettinger [Mon, 19 Feb 2007 18:15:04 +0000 (18:15 +0000)]
Fixup docstrings for merge().

18 years agoPatch #1490190: posixmodule now includes os.chflags() and os.lchflags()
Martin v. Löwis [Mon, 19 Feb 2007 10:55:19 +0000 (10:55 +0000)]
Patch #1490190: posixmodule now includes os.chflags() and os.lchflags()
functions on platforms where the underlying system calls are available.

18 years agoMoved misplaced news item.
Lars Gustäbel [Mon, 19 Feb 2007 09:54:47 +0000 (09:54 +0000)]
Moved misplaced news item.

18 years agoProvide an example of defaultdict with non-zero constant factory function.
Raymond Hettinger [Mon, 19 Feb 2007 09:14:10 +0000 (09:14 +0000)]
Provide an example of defaultdict with non-zero constant factory function.

18 years agoAdd test for merge stability
Raymond Hettinger [Mon, 19 Feb 2007 07:30:21 +0000 (07:30 +0000)]
Add test for merge stability

18 years agoUse C heapreplace() instead of slower _siftup() in pure python.
Raymond Hettinger [Mon, 19 Feb 2007 06:59:32 +0000 (06:59 +0000)]
Use C heapreplace() instead of slower _siftup() in pure python.

18 years agoAdd tie-breaker count to preserve sort stability.
Raymond Hettinger [Mon, 19 Feb 2007 05:28:28 +0000 (05:28 +0000)]
Add tie-breaker count to preserve sort stability.

18 years agoAdd merge() function to heapq.
Raymond Hettinger [Mon, 19 Feb 2007 04:08:43 +0000 (04:08 +0000)]
Add merge() function to heapq.

18 years agoExtend work on revision 52962: Eliminate redundant calls to PyObject_Hash().
Raymond Hettinger [Mon, 19 Feb 2007 02:03:19 +0000 (02:03 +0000)]
Extend work on revision 52962:  Eliminate redundant calls to PyObject_Hash().

18 years agoMinor fix for currentframe (SF #1652788).
Vinay Sajip [Fri, 16 Feb 2007 22:36:24 +0000 (22:36 +0000)]
Minor fix for currentframe (SF #1652788).

18 years agoMake the __import__ call in encodings.__init__ absolute with a level 0 call.
Brett Cannon [Fri, 16 Feb 2007 19:33:01 +0000 (19:33 +0000)]
Make the __import__ call in encodings.__init__ absolute with a level 0 call.

18 years agoUpdate the encoding package's search function to use absolute imports when
Brett Cannon [Thu, 15 Feb 2007 22:54:39 +0000 (22:54 +0000)]
Update the encoding package's search function to use absolute imports when
calling __import__.  This helps make the expected search locations for encoding
modules be more explicit.

One could use an explicit value for __path__ when making the call to __import__
to force the exact location searched for encodings.  This would give the most
strict search path possible if one is worried about malicious code being
imported.  The unfortunate side-effect of that is that if __path__ was modified
on 'encodings' on purpose in a safe way it would not be picked up in future
__import__ calls.

18 years agoAdd missing \versionadded.
Georg Brandl [Thu, 15 Feb 2007 11:29:55 +0000 (11:29 +0000)]
Add missing \versionadded.