]> granicus.if.org Git - python/log
python
14 years agoRemove compatibility code for Python < 2.1, < 2.2 and < 2.4.
Georg Brandl [Sat, 11 Sep 2010 06:41:30 +0000 (06:41 +0000)]
Remove compatibility code for Python < 2.1, < 2.2 and < 2.4.

14 years agoAdd new generated file to ignoreds.
Georg Brandl [Sat, 11 Sep 2010 06:39:58 +0000 (06:39 +0000)]
Add new generated file to ignoreds.

14 years agoIssue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on
Victor Stinner [Sat, 11 Sep 2010 00:54:47 +0000 (00:54 +0000)]
Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on
a non-ASCII byte in the format string.

Document also the encoding.

14 years agoFix incorrect comment regarding MAGIC and TAG in import.c
Nick Coghlan [Sat, 11 Sep 2010 00:39:25 +0000 (00:39 +0000)]
Fix incorrect comment regarding MAGIC and TAG in import.c

14 years agoIssue #767645: fix os.path.supports_unicode_filenames definition
Victor Stinner [Sat, 11 Sep 2010 00:22:12 +0000 (00:22 +0000)]
Issue #767645: fix os.path.supports_unicode_filenames definition

os.listdir(str) always returns unicode and it can return non-ascii filenames
even if supports_unicode_filenames is False.

14 years agoSeparate positional arguments from localized globals.
Raymond Hettinger [Sat, 11 Sep 2010 00:05:44 +0000 (00:05 +0000)]
Separate positional arguments from localized globals.

14 years agotypo
Benjamin Peterson [Fri, 10 Sep 2010 23:53:14 +0000 (23:53 +0000)]
typo

14 years agouse Py_REFCNT
Benjamin Peterson [Fri, 10 Sep 2010 23:52:42 +0000 (23:52 +0000)]
use Py_REFCNT

14 years agoIssue #9579, #9580: Oops, add the author of the patch
Victor Stinner [Fri, 10 Sep 2010 23:50:31 +0000 (23:50 +0000)]
Issue #9579, #9580: Oops, add the author of the patch

14 years agoIssue #9579, #9580: Fix os.confstr() for value longer than 255 bytes and encode
Victor Stinner [Fri, 10 Sep 2010 23:49:04 +0000 (23:49 +0000)]
Issue #9579, #9580: Fix os.confstr() for value longer than 255 bytes and encode
the value with filesystem encoding and surrogateescape (instead of utf-8 in
strict mode).

14 years agoadd reduce and partial to __all__
Benjamin Peterson [Fri, 10 Sep 2010 23:35:52 +0000 (23:35 +0000)]
add reduce and partial to __all__

14 years agoIssue #8589: surrogateescape error handler is not available at startup
Victor Stinner [Fri, 10 Sep 2010 23:13:52 +0000 (23:13 +0000)]
Issue #8589: surrogateescape error handler is not available at startup

Py_Main() uses _Py_wchar2char() + PyUnicode_FromWideChar() instead of
PyUnicode_DecodeFSDefault(), because the PyCodec machinery is not ready yet.

14 years agoremove gil_drop_request in --without-threads
Benjamin Peterson [Fri, 10 Sep 2010 22:47:02 +0000 (22:47 +0000)]
remove gil_drop_request in --without-threads

14 years agoIssue #9402: pyexpat uses Py_DECREF() instead of PyObject_DEL()
Victor Stinner [Fri, 10 Sep 2010 22:25:19 +0000 (22:25 +0000)]
Issue #9402: pyexpat uses Py_DECREF() instead of PyObject_DEL()

Fix a crash if Python is compiled in pydebug mode.

14 years agoIssue #8603: Environ.data is now protected -> Environ._data
Victor Stinner [Fri, 10 Sep 2010 22:18:16 +0000 (22:18 +0000)]
Issue #8603: Environ.data is now protected -> Environ._data

os.environ.data was a str dict in Python 3.1. In Python 3.2 on UNIX/BSD,
os.environ.data is now a bytes dict: mark it as protected to avoid confusion.

14 years agouse DISPATCH() instead of continue
Benjamin Peterson [Fri, 10 Sep 2010 22:02:31 +0000 (22:02 +0000)]
use DISPATCH() instead of continue

14 years agoadd newline
Benjamin Peterson [Fri, 10 Sep 2010 21:59:21 +0000 (21:59 +0000)]
add newline

14 years agoIssue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
Victor Stinner [Fri, 10 Sep 2010 21:57:59 +0000 (21:57 +0000)]
Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.

14 years agobump magic number for DELETE_DEREF
Benjamin Peterson [Fri, 10 Sep 2010 21:51:44 +0000 (21:51 +0000)]
bump magic number for DELETE_DEREF

14 years ago#4617: Previously it was illegal to delete a name from the local
Amaury Forgeot d'Arc [Fri, 10 Sep 2010 21:39:53 +0000 (21:39 +0000)]
#4617: Previously it was illegal to delete a name from the local
namespace if it occurs as a free variable in a nested block.  This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).

This sample was valid in 2.6, but fails to compile in 3.x without this change::

   >>> def f():
   ...     def print_error():
   ...        print(e)
   ...     try:
   ...        something
   ...     except Exception as e:
   ...        print_error()
   ...        # implicit "del e" here

This sample has always been invalid in Python, and now works::

   >>> def outer(x):
   ...     def inner():
   ...        return x
   ...     inner()
   ...     del x

There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.

14 years agorelease() is probably not the most important method
Georg Brandl [Fri, 10 Sep 2010 20:43:53 +0000 (20:43 +0000)]
release() is probably not the most important method

14 years agoThe "if 1": trick seems cleaner that the one with regular expressions.
Amaury Forgeot d'Arc [Fri, 10 Sep 2010 19:47:43 +0000 (19:47 +0000)]
The "if 1": trick seems cleaner that the one with regular expressions.
Use it here again.

14 years agoIssue #941346: Improve the build process under AIX and allow Python to
Antoine Pitrou [Fri, 10 Sep 2010 19:44:44 +0000 (19:44 +0000)]
Issue #941346: Improve the build process under AIX and allow Python to
be built as a shared library.  Patch by Sébastien Sablé.

14 years agoUse the "if 1:" prefix so that quoted code appears nicely
Amaury Forgeot d'Arc [Fri, 10 Sep 2010 19:40:52 +0000 (19:40 +0000)]
Use the "if 1:" prefix so that quoted code appears nicely
nested inside the test suite.

def test_me():
    exec("""if 1:
        ...code...
        """)

No other change here.

14 years agoadd reference to file object
Benjamin Peterson [Fri, 10 Sep 2010 18:50:38 +0000 (18:50 +0000)]
add reference to file object

14 years agoFollowup to #4026: better patch for flock detection.
Antoine Pitrou [Fri, 10 Sep 2010 18:39:00 +0000 (18:39 +0000)]
Followup to #4026: better patch for flock detection.

14 years agoUntabify file.
Amaury Forgeot d'Arc [Fri, 10 Sep 2010 18:11:45 +0000 (18:11 +0000)]
Untabify file.

14 years agoAs per python-dev discussion with Eli, properly document and publish dis.show_code
Nick Coghlan [Fri, 10 Sep 2010 14:08:04 +0000 (14:08 +0000)]
As per python-dev discussion with Eli, properly document and publish dis.show_code

14 years agoLeave show_code out of __all__ and make it clear that its lack of documentation is...
Nick Coghlan [Fri, 10 Sep 2010 12:32:58 +0000 (12:32 +0000)]
Leave show_code out of __all__ and make it clear that its lack of documentation is deliberate

14 years agoFix dis.__all__ for new additions to module in 3.2(spotted by Eli Bendersky)
Nick Coghlan [Fri, 10 Sep 2010 12:24:24 +0000 (12:24 +0000)]
Fix dis.__all__ for new additions to module in 3.2(spotted by Eli Bendersky)

14 years agoIssue #9819: fix TESTFN_UNENCODABLE for japanese code page
Victor Stinner [Fri, 10 Sep 2010 11:19:59 +0000 (11:19 +0000)]
Issue #9819: fix TESTFN_UNENCODABLE for japanese code page

14 years agologging: Added threading interlock in basicConfig().
Vinay Sajip [Fri, 10 Sep 2010 08:25:13 +0000 (08:25 +0000)]
logging: Added threading interlock in basicConfig().

14 years agoFix Issue #9752: MSVC compiler warning due to undefined function
Daniel Stutzbach [Thu, 9 Sep 2010 21:18:04 +0000 (21:18 +0000)]
Fix Issue #9752: MSVC compiler warning due to undefined function
(Patch by Jon Anglin)

14 years agoSkip socket tests that require the network, if the network resource is not enabled
Daniel Stutzbach [Thu, 9 Sep 2010 21:17:58 +0000 (21:17 +0000)]
Skip socket tests that require the network, if the network resource is not enabled

14 years agoRemove workaround
Antoine Pitrou [Thu, 9 Sep 2010 20:40:28 +0000 (20:40 +0000)]
Remove workaround

14 years agoIssue #9804: ascii() now always represents unicode surrogate pairs as
Antoine Pitrou [Thu, 9 Sep 2010 20:30:23 +0000 (20:30 +0000)]
Issue #9804: ascii() now always represents unicode surrogate pairs as
a single `\UXXXXXXXX`, regardless of whether the character is printable
or not.  Also, the "backslashreplace" error handler now joins surrogate
pairs into a single character on UCS-2 builds.

14 years agoIssue #9410: Various optimizations to the pickle module, leading to
Antoine Pitrou [Thu, 9 Sep 2010 18:33:21 +0000 (18:33 +0000)]
Issue #9410: Various optimizations to the pickle module, leading to
speedups up to 4x (depending on the benchmark).  Mostly ported from
Unladen Swallow; initial patch by Alexandre Vassalotti.

14 years agoUse transient_internet() where appropriate in test_ssl
Antoine Pitrou [Thu, 9 Sep 2010 13:31:46 +0000 (13:31 +0000)]
Use transient_internet() where appropriate in test_ssl
(svn.python.org is sometimes unavailable)

14 years agoIssue #9757: memoryview objects get a release() method to release the
Antoine Pitrou [Thu, 9 Sep 2010 12:59:39 +0000 (12:59 +0000)]
Issue #9757: memoryview objects get a release() method to release the
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.

14 years agoHave pprint() respect the order in an OrderedDict.
Raymond Hettinger [Thu, 9 Sep 2010 12:31:00 +0000 (12:31 +0000)]
Have pprint() respect the order in an OrderedDict.

14 years agoA little bit more readable repr method.
Raymond Hettinger [Thu, 9 Sep 2010 08:29:05 +0000 (08:29 +0000)]
A little bit more readable repr method.

14 years agoExperiment: Let collections.namedtuple() do the work. This should work now that...
Raymond Hettinger [Thu, 9 Sep 2010 07:15:18 +0000 (07:15 +0000)]
Experiment: Let collections.namedtuple() do the work.  This should work now that _collections is pre-built.  The buildbots will tell us shortly.

14 years agoPCBuild cosmetic fixes.
Hirokazu Yamamoto [Thu, 9 Sep 2010 06:24:43 +0000 (06:24 +0000)]
PCBuild cosmetic fixes.
* pythoncore.vcproj: Fixed indentation
* _multiprocessing.vcproj: Converted ProjectGUID to uppercase. Otherwise,
  VS8 _multiprocessing.vcproj created by vs9to8.py was modified every time
  loads it in VS8 IDE.

14 years agoUpdated VS7.1 project file. (I cannot test this file because I don't have VS7.1)
Hirokazu Yamamoto [Thu, 9 Sep 2010 06:14:23 +0000 (06:14 +0000)]
Updated VS7.1 project file. (I cannot test this file because I don't have VS7.1)

14 years agoUpdated VC6 files.
Hirokazu Yamamoto [Thu, 9 Sep 2010 06:08:36 +0000 (06:08 +0000)]
Updated VC6 files.
* pythoncore.dsp: updated project file
* readme.txt: removed dead link
* tcl852.patch: fixed patch. it was doubled.

14 years agoImprove the repr for the TokenInfo named tuple.
Raymond Hettinger [Thu, 9 Sep 2010 04:32:39 +0000 (04:32 +0000)]
Improve the repr for the TokenInfo named tuple.

14 years agoAdd docstring to cmd.Cmd.do_help()
Raymond Hettinger [Thu, 9 Sep 2010 03:53:22 +0000 (03:53 +0000)]
Add docstring to cmd.Cmd.do_help()

14 years agoAdd a working example for the cmd module.
Raymond Hettinger [Thu, 9 Sep 2010 01:40:50 +0000 (01:40 +0000)]
Add a working example for the cmd module.

14 years agoFix issue 9794: adds context manager protocol to socket.socket so that socket.create_...
Giampaolo Rodolà [Wed, 8 Sep 2010 22:44:12 +0000 (22:44 +0000)]
Fix issue 9794: adds context manager protocol to socket.socket so that socket.create_connection() can be used with the 'with' statement.

14 years agogdb: fix representation of non-printable surrogate pairs, and workaround
Antoine Pitrou [Wed, 8 Sep 2010 21:57:37 +0000 (21:57 +0000)]
gdb: fix representation of non-printable surrogate pairs, and workaround
a bug in ascii().

14 years agoAdd a safety limit to the number of unicode characters we fetch
Antoine Pitrou [Wed, 8 Sep 2010 21:07:40 +0000 (21:07 +0000)]
Add a safety limit to the number of unicode characters we fetch
(followup to r84635, suggested by Dave Malcolm).

14 years agoIssue #9188: The gdb extension now handles correctly narrow (UCS2) as well
Antoine Pitrou [Wed, 8 Sep 2010 20:57:48 +0000 (20:57 +0000)]
Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well
as wide (UCS4) unicode builds for both the host interpreter (embedded
inside gdb) and the interpreter under test.

14 years agoImprove variable name (don't shadow a builtin).
Raymond Hettinger [Wed, 8 Sep 2010 19:27:59 +0000 (19:27 +0000)]
Improve variable name (don't shadow a builtin).

14 years agoOne more conversion from pow() to **.
Raymond Hettinger [Wed, 8 Sep 2010 18:58:33 +0000 (18:58 +0000)]
One more conversion from pow() to **.

14 years ago* Remove dependency on binascii.hexlify by using int.from_bytes().
Raymond Hettinger [Wed, 8 Sep 2010 18:48:21 +0000 (18:48 +0000)]
* Remove dependency on binascii.hexlify by using int.from_bytes().
* Use the new super() with no arguments.
* Replace pow() call with the ** operator.
* Increase urandom seeding from 16 bytes to 32 bytes.
* Clean-up docstring.

14 years agoPEP 3149: Try to load the extension with the SOABI before trying
Matthias Klose [Wed, 8 Sep 2010 16:22:10 +0000 (16:22 +0000)]
PEP 3149: Try to load the extension with the SOABI before trying
to load the one without the SOABI in the name.

14 years agoRevert the doc change done in r83880. str.replace with negative count value is not...
Senthil Kumaran [Wed, 8 Sep 2010 12:50:29 +0000 (12:50 +0000)]
Revert the doc change done in r83880. str.replace with negative count value is not a feature.

14 years agoIssue #9797: pystate.c wrongly assumed that zero couldn't be a valid
Antoine Pitrou [Wed, 8 Sep 2010 12:37:10 +0000 (12:37 +0000)]
Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid
thread-local storage key.

14 years agologging: Added QueueHandler.
Vinay Sajip [Wed, 8 Sep 2010 10:46:15 +0000 (10:46 +0000)]
logging: Added QueueHandler.

14 years agoAdd Lukasz.
Georg Brandl [Wed, 8 Sep 2010 10:43:45 +0000 (10:43 +0000)]
Add Lukasz.

14 years agoIn the case where only a user supplied random() method is available,
Raymond Hettinger [Wed, 8 Sep 2010 00:30:28 +0000 (00:30 +0000)]
In the case where only a user supplied random() method is available,
adopt a strategy that makes the fewest calls to random().

14 years agoFollow-up to #9199: Fix str.join use, add newlines.
Éric Araujo [Wed, 8 Sep 2010 00:00:45 +0000 (00:00 +0000)]
Follow-up to #9199: Fix str.join use, add newlines.

Thanks to Konrad Delong for writing a test for upload_docs
--show-response in distutils2, letting me catch my mistake.

14 years agoFix incorrect use of Command.announce (#9199)
Éric Araujo [Tue, 7 Sep 2010 23:08:57 +0000 (23:08 +0000)]
Fix incorrect use of Command.announce (#9199)

14 years agoFix eon-old bug in build_clib options (#1718574)
Éric Araujo [Tue, 7 Sep 2010 22:11:52 +0000 (22:11 +0000)]
Fix eon-old bug in build_clib options (#1718574)

14 years agoIssue #9707: Rewritten reference implementation of threading.local which
Antoine Pitrou [Tue, 7 Sep 2010 22:06:17 +0000 (22:06 +0000)]
Issue #9707: Rewritten reference implementation of threading.local which
is friendlier towards reference cycles.  This change is not normally
visible since an optimized C implementation (_thread._local) is used
instead.

14 years agoAlso catch some gaierrors
Antoine Pitrou [Tue, 7 Sep 2010 21:43:31 +0000 (21:43 +0000)]
Also catch some gaierrors

14 years agoFix typo in whatsnew (#9793)
Éric Araujo [Tue, 7 Sep 2010 21:35:35 +0000 (21:35 +0000)]
Fix typo in whatsnew (#9793)

14 years ago#6394: Add os.getppid() support for Windows.
Amaury Forgeot d'Arc [Tue, 7 Sep 2010 21:31:17 +0000 (21:31 +0000)]
#6394: Add os.getppid() support for Windows.

14 years agoImprove transient_internet() again to detect more network errors,
Antoine Pitrou [Tue, 7 Sep 2010 21:09:09 +0000 (21:09 +0000)]
Improve transient_internet() again to detect more network errors,
and use it in test_robotparser. Fixes #8574.

14 years agoIssue #9792: In case of connection failure, socket.create_connection()
Antoine Pitrou [Tue, 7 Sep 2010 21:05:49 +0000 (21:05 +0000)]
Issue #9792: In case of connection failure, socket.create_connection()
would swallow the exception and raise a new one, making it impossible
to fetch the original errno, or to filter timeout errors.  Now the
original error is re-raised.

14 years agoIssue #8574: better implementation of test.support.transient_internet().
Antoine Pitrou [Tue, 7 Sep 2010 20:42:19 +0000 (20:42 +0000)]
Issue #8574: better implementation of test.support.transient_internet().
Original patch by Victor.

14 years agoNeaten-up comments and warning message.
Raymond Hettinger [Tue, 7 Sep 2010 20:04:42 +0000 (20:04 +0000)]
Neaten-up comments and warning message.

14 years agoMinor refactoring and cleanup. Extend looping randrange() technique to subclasses.
Raymond Hettinger [Tue, 7 Sep 2010 19:19:33 +0000 (19:19 +0000)]
Minor refactoring and cleanup.  Extend looping randrange() technique to subclasses.

14 years agoUpdate nntplib examples to use a public news server.
Antoine Pitrou [Tue, 7 Sep 2010 18:44:12 +0000 (18:44 +0000)]
Update nntplib examples to use a public news server.
The example still doesn't work as-is under py3k, due to incomplete
or buggy porting of the nntplib module.

14 years agoIssue #9758: When fcntl.ioctl() was called with mutable_flag set to True,
Antoine Pitrou [Tue, 7 Sep 2010 16:30:09 +0000 (16:30 +0000)]
Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True,
and the passed buffer was exactly 1024 bytes long, the buffer wouldn't
be updated back after the system call.  Original patch by Brian Brazil.

14 years agoRemove invalid test (it was supposed to fail on 64-bit machines.).
Raymond Hettinger [Tue, 7 Sep 2010 15:38:33 +0000 (15:38 +0000)]
Remove invalid test (it was supposed to fail on 64-bit machines.).

14 years agoFix test that depends on a particular implementation of random.choice().
Raymond Hettinger [Tue, 7 Sep 2010 15:00:15 +0000 (15:00 +0000)]
Fix test that depends on a particular implementation of random.choice().

14 years agoIssue #4026: Make the fcntl extension build under AIX.
Antoine Pitrou [Tue, 7 Sep 2010 14:52:42 +0000 (14:52 +0000)]
Issue #4026: Make the fcntl extension build under AIX.
Patch by Sébastien Sablé.

14 years agoAdjust #8956 to add the bad signal number to the exception message.
Brian Curtin [Tue, 7 Sep 2010 13:24:38 +0000 (13:24 +0000)]
Adjust #8956 to add the bad signal number to the exception message.

14 years agoFix corner case for Random.choice() and add tests.
Raymond Hettinger [Tue, 7 Sep 2010 10:06:56 +0000 (10:06 +0000)]
Fix corner case for Random.choice() and add tests.

14 years agoSmall clean-ups.
Raymond Hettinger [Tue, 7 Sep 2010 09:32:57 +0000 (09:32 +0000)]
Small clean-ups.

14 years agoAdd stub entry for argparse.
Georg Brandl [Tue, 7 Sep 2010 08:18:26 +0000 (08:18 +0000)]
Add stub entry for argparse.

14 years agotypo
Raymond Hettinger [Tue, 7 Sep 2010 05:35:10 +0000 (05:35 +0000)]
typo

14 years agoRemove outdated reference to Wichmann-Hill algorithm.
Raymond Hettinger [Tue, 7 Sep 2010 05:32:49 +0000 (05:32 +0000)]
Remove outdated reference to Wichmann-Hill algorithm.

14 years agoIssues #7889, #9025 and #9379: Improvements to the random module.
Raymond Hettinger [Tue, 7 Sep 2010 04:44:52 +0000 (04:44 +0000)]
Issues #7889, #9025 and #9379:  Improvements to the random module.

14 years agoMinor code cleanup
Raymond Hettinger [Tue, 7 Sep 2010 00:48:40 +0000 (00:48 +0000)]
Minor code cleanup

14 years agoDocument which part of the random module module are guaranteed.
Raymond Hettinger [Tue, 7 Sep 2010 00:38:15 +0000 (00:38 +0000)]
Document which part of the random module module are guaranteed.

14 years agoDocument which part of the random module module are guaranteed.
Raymond Hettinger [Mon, 6 Sep 2010 23:36:31 +0000 (23:36 +0000)]
Document which part of the random module module are guaranteed.

14 years agoMore docstring updates
Amaury Forgeot d'Arc [Mon, 6 Sep 2010 22:31:52 +0000 (22:31 +0000)]
More docstring updates

14 years agoChange docstrings to match the implementation
Amaury Forgeot d'Arc [Mon, 6 Sep 2010 22:23:13 +0000 (22:23 +0000)]
Change docstrings to match the implementation

14 years agoUpdated information on logging contextual information.
Vinay Sajip [Mon, 6 Sep 2010 22:18:20 +0000 (22:18 +0000)]
Updated information on logging contextual information.

14 years agoAdd method to OrderedDict for repositioning keys to the ends.
Raymond Hettinger [Mon, 6 Sep 2010 21:26:09 +0000 (21:26 +0000)]
Add method to OrderedDict for repositioning keys to the ends.

14 years agotypo
Florent Xicluna [Mon, 6 Sep 2010 20:27:55 +0000 (20:27 +0000)]
typo

14 years agotypo
Florent Xicluna [Mon, 6 Sep 2010 20:27:15 +0000 (20:27 +0000)]
typo

14 years agoFix markup nits
Raymond Hettinger [Mon, 6 Sep 2010 19:55:51 +0000 (19:55 +0000)]
Fix markup nits

14 years agoFix some errors that #7566 introduced on non-Windows platforms due to
Brian Curtin [Mon, 6 Sep 2010 19:46:17 +0000 (19:46 +0000)]
Fix some errors that #7566 introduced on non-Windows platforms due to
an ImportError. Rearranged the import, faked out the implementation when
the import fails, and reorganized a test that depends on Win32 behavior.

14 years agoIssue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest
Antoine Pitrou [Mon, 6 Sep 2010 19:25:46 +0000 (19:25 +0000)]
Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest
test cases now also have assertWarns and assertWarnsRegexp methods to
check that a given warning type was triggered by the code under test.

14 years agoIssue #5506: BytesIO objects now have a getbuffer() method exporting a
Antoine Pitrou [Mon, 6 Sep 2010 18:48:21 +0000 (18:48 +0000)]
Issue #5506: BytesIO objects now have a getbuffer() method exporting a
view of their contents without duplicating them.  The view is both readable
and writable.

14 years agoImplement #7566 - os.path.sameopenfile for Windows.
Brian Curtin [Mon, 6 Sep 2010 17:07:27 +0000 (17:07 +0000)]
Implement #7566 - os.path.sameopenfile for Windows.

This uses the GetFileInformationByHandle function to return a tuple of values
to identify a file, then ntpath.sameopenfile compares file tuples, which
is exposed as os.path.sameopenfile.

14 years agoFix #8956. ValueError message was only mentioning one signal.
Brian Curtin [Mon, 6 Sep 2010 16:29:29 +0000 (16:29 +0000)]
Fix #8956. ValueError message was only mentioning one signal.

Rather than list out the three signals (or more over time), the message was
made less specific but still descriptive.