Alexander Belopolsky
ef4a03fffe
Issue #5109 : array.array constructor will now use fast code when
...
initial data is provided in an array object with correct type.
2011-01-11 21:44:00 +00:00
Alexander Belopolsky
b7d40d1702
Issue #1726687 : time.mktime() will now correctly compute value one
...
second before epoch. Original patch by Peter Wang, reported by Martin
Blais.
2011-01-11 01:21:25 +00:00
Victor Stinner
7234479580
Issue #9611 : remove useless and dangerous explicit conversion to size_t
2011-01-11 00:04:12 +00:00
Victor Stinner
95f1dfc955
Issue #9566 : Fix pyparse.xmlparser.ParseFile()
...
Fix readinst() if file.read(n) returns a bytes object longer than n:
return -1 instead of the the buffer size to raise an exception.
Simplify also the function code.
2011-01-10 23:00:36 +00:00
Antoine Pitrou
a4815caa7c
Issue #10872 : The repr() of TextIOWrapper objects now includes the mode
...
if available.
(at Georg's request)
2011-01-09 20:38:15 +00:00
Victor Stinner
06ec45e2f8
Issue #10864 : limit year to [1; 9999] for strftime() on Solaris
2011-01-08 03:35:36 +00:00
Victor Stinner
301f1217ac
Issue #1777412 : Remove all limits on tm_year from time.strftime()
...
The buildbots will tell us which platform does support or not negative years.
2011-01-08 03:06:52 +00:00
Victor Stinner
73ea29cb03
Issue #1777412 : strftime() accepts year >= 1 instead of year >= 1900
...
* With Visual Studio, year have to be in [1; 9999]
* Add more tests on the year field
2011-01-08 01:56:31 +00:00
Alexander Belopolsky
0dd06f4082
Fixed error handling branches. Thanks
...
Victor Stinner for pointing this out.
2011-01-08 01:23:02 +00:00
Alexander Belopolsky
b8bb4664fc
Issue #1777412 : extended year range of strftime down to 1000.
2011-01-08 00:13:34 +00:00
Alexander Belopolsky
c64708ae48
Issue #10827 : Changed the rules for 2-digit years. The time.asctime
...
function will now format any year when time.accept2dyear is false and
will accept years >= 1000 otherwise. The year range accepted by
time.mktime and time.strftime is still system dependent, but
time.mktime will now accept full range supported by the OS. Conversion
of 2-digit years to 4-digit is deprecated.
2011-01-07 19:59:19 +00:00
Victor Stinner
89e3436606
Issue #10841 : set binary mode on files; the parser translates newlines
...
On Windows, set the binary mode on stdin, stdout, stderr and all
io.FileIO objects (to not translate newlines, \r\n <=> \n). The Python parser
translates newlines (\r\n => \n).
2011-01-07 18:47:22 +00:00
Alexander Belopolsky
610e544bf7
Further simplify gettmarg()
2011-01-06 21:57:06 +00:00
Antoine Pitrou
e85da7aa4f
Issue #7858 : Raise an error properly when os.utime() fails under Windows
...
on an existing file.
(this does not seem to be easily testable)
2011-01-06 18:25:55 +00:00
Alexander Belopolsky
ecbb8dc17a
Use PyOS_snprintf for better portability.
2011-01-06 16:45:25 +00:00
Alexander Belopolsky
a686725859
- time.accept2dyear = True is now equivalent to time.accept2dyear = 1
...
- removed unnecessary struct_time to tuple conversion
- added more unit tests
(See issue #10827 for discussion.)
2011-01-05 23:00:47 +00:00
Victor Stinner
358e11d928
Issue #10756 : atexit normalizes the exception before displaying it.
2011-01-05 03:54:25 +00:00
Victor Stinner
ca1e7ec344
test_unicode: use ctypes to test PyUnicode_FromFormat()
...
Instead of _testcapi.format_unicode() because it has a limited API: it requires
exactly one argument of type unicode.
2011-01-05 00:19:28 +00:00
Victor Stinner
9d6f9367ea
Issue #9566 : PyUnicode_FromFormatV() doesn't support %zi, use %zd instead
2011-01-04 22:00:04 +00:00
Victor Stinner
ed7e222454
Issue #9566 : explain why (int)len cannot underflow
2011-01-04 21:58:10 +00:00
Alexander Belopolsky
5da468f94a
Whitespace cleanup
2011-01-04 17:15:52 +00:00
Alexander Belopolsky
b9588b528a
Issue #8013 : time.asctime and time.ctime no longer call system asctime
...
and ctime functions. The year range for time.asctime is now 1900
through maxint. The range for time.ctime is the same as for
time.localtime. The string produced by these functions is longer than
24 characters when year is greater than 9999.
2011-01-04 16:34:30 +00:00
Victor Stinner
0fcab4a3ed
Issue #9566 : use Py_ssize_t instead of int
2011-01-04 12:59:15 +00:00
Victor Stinner
8848c7a37f
Issue #8650 : zlib.compress() and zlib.decompress() raise an OverflowError if
...
the input buffer length doesn't fit into an unsigned int (length bigger than
2^32-1 bytes).
2011-01-04 02:07:36 +00:00
Victor Stinner
e6edec2371
Issue #9015 , #9611 : FileIO.readinto(), FileIO.write() and os.write() clamp the
...
length to 2^31-1 on Windows.
2011-01-04 00:29:35 +00:00
Antoine Pitrou
23683ef26d
Issue #10333 : Remove ancient GC API, which has been deprecated since
...
Python 2.2.
2011-01-04 00:00:31 +00:00
Antoine Pitrou
c9c83ba896
Issue #10806 , issue #9905 : Fix subprocess pipes when some of the standard
...
file descriptors (0, 1, 2) are closed in the parent process. Initial
patch by Ross Lagerwall.
2011-01-03 18:23:55 +00:00
Raymond Hettinger
426e052a4f
Make C helper function more closely match the pure python version, and add tests.
2011-01-03 02:12:02 +00:00
Amaury Forgeot d'Arc
a251a853c7
#8278 : In the Windows implementation of stat() and utime(),
...
use time_t instead of int. This gives support for dates after 2038,
at least when compiled with VS2003 or later, where time_t is 64bit.
2011-01-03 00:19:11 +00:00
Georg Brandl
e10608cf5d
#8013 follow-up:
...
* In asctime and ctime, properly remove the newline if the year has more than four digits
* Consistent error message for both functions
* Fix the test comments and add a check for the removed newline
2011-01-02 22:33:43 +00:00
Gregory P. Smith
abcfcba61c
issue10802: fallback to pipe+fcntl when the pipe2 syscall fails with errno ENOSYS.
2011-01-02 20:52:48 +00:00
Alexander Belopolsky
e2dc082294
Issue #8013 : Fixed time.asctime segfault when OS's asctime fails
2011-01-02 20:48:22 +00:00
Georg Brandl
8aa7e999b5
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833 .
2010-12-28 18:30:18 +00:00
Brian Curtin
3b4499c5c7
Fix #9333 . The symlink function is always available now, raising OSError
...
when the user doesn't hold the symbolic link privilege rather than hiding it.
2010-12-28 14:31:47 +00:00
Victor Stinner
da9ec995f6
Issue #10783 : struct.pack() doesn't encode implicitly unicode to UTF-8
...
* Replace "bytes" by "bytes object" in struct error messages
* Document the API change in What's new in Python 3.2
* Fix test_wave
* Remove also ugly implicit conversions in test_struct
2010-12-28 13:26:42 +00:00
Alexander Belopolsky
86f65d5dbb
Issue #10254 : Fixed a crash and a regression introduced by the implementation of PRI 29.
2010-12-23 02:27:37 +00:00
Gregory P. Smith
14affb84ca
fix a compiler warning about err_msg potentially being used uninitialized.
2010-12-22 05:22:17 +00:00
Antoine Pitrou
7f8f41808b
Issue #10750 : The `raw` attribute of buffered IO objects is now read-only.
2010-12-21 21:20:59 +00:00
R. David Murray
52d1b4e62f
#9907 : call rl_initialize early when using editline on OSX
...
editline rl_initialize apparently discards any mappings done before it
is called, which makes tab revert to file completion instead of inserting
a tab. So now on OSX we call rl_initialize first if we are using
readline, and then re-read the users .editrc (if any) afterward so they
can still override our defaults.
Patch by Ned Deily, modified by Ronald Oussoren.
2010-12-18 03:48:32 +00:00
Antoine Pitrou
810023db3e
Issue #8844 : Regular and recursive lock acquisitions can now be interrupted
...
by signals on platforms using pthreads. Patch by Reid Kleckner.
2010-12-15 22:59:16 +00:00
Raymond Hettinger
96f3410ebe
Issue 10667: Fast path for collections.Counter
2010-12-15 16:30:37 +00:00
R. David Murray
ec07331eea
#775964 : skip YP/NIS entries instead of failing the test
...
Also includes doc updates mentioning that these entries may not
be retrievable via getgrnam and getgrgid.
Patch by Bobby Impollonia.
2010-12-14 16:20:53 +00:00
Gregory P. Smith
8edd99d085
Issue #6559 : fix the subprocess.Popen pass_fds implementation. Add a unittest.
...
Issue #7213 : Change the close_fds default on Windows to better match the new
default on POSIX. True when possible (False if stdin/stdout/stderr are
supplied).
Update the documentation to reflect all of the above.
2010-12-14 13:43:30 +00:00
R. David Murray
4d55bf9fcc
#10699 : fix docstring for tzset: it does not take a parameter
...
Thanks to Garrett Cooper for the fix.
2010-12-14 00:55:46 +00:00
Gregory P. Smith
51ee270876
issue7213: Open the pipes used by subprocesses with the FD_CLOEXEC flag from
...
the C code, using pipe2() when available. Adds unittests for close_fds and
cloexec behaviors.
2010-12-13 07:59:39 +00:00
Alexander Belopolsky
532d091d05
Reverted accidental commit (from r87159)
2010-12-10 18:14:16 +00:00
Alexander Belopolsky
fc55789cae
Updated UCD version and unicode.org links to Unicode 6.0.0
2010-12-10 18:11:24 +00:00
Hirokazu Yamamoto
524f10359b
Should call Py_INCREF for Py_None (Modules/_ssl.c: PySSL_cipher)
2010-12-09 10:49:00 +00:00
Alexander Belopolsky
e239d23e8c
Issue #6697 : Fixed instances of _PyUnicode_AsString() result not checked for NULL
2010-12-08 23:31:48 +00:00
Hirokazu Yamamoto
7ed117addf
Issue #10637 : Called CloseHandle twice in os.stat/os.lstat (Windows)
2010-12-07 10:24:37 +00:00