Victor Stinner
92f0113701
Close #24784 : Fix compilation without thread support
...
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
2015-10-11 09:54:42 +02:00
Victor Stinner
647dac9d6f
Close #25368 : Fix test_eintr when Python is compiled without thread support
2015-10-11 09:47:17 +02:00
Benjamin Peterson
6da624098f
merge 3.5 ( #25375 )
2015-10-10 23:24:53 -07:00
Benjamin Peterson
b16e12aaaa
merge 3.4
2015-10-10 23:24:39 -07:00
Benjamin Peterson
0071b3dfcb
don't mention Python 2.2 ( closes #25375 )
2015-10-10 23:23:55 -07:00
Raymond Hettinger
a7f63009d6
Minor tweak. Make the maxlen comparisons a little more clear and consistent.
2015-10-10 23:56:02 -04:00
Benjamin Peterson
10dcff7a04
merge 3.5 ( #25362 )
2015-10-10 19:36:51 -07:00
Benjamin Peterson
062f4cec5e
merge 3.4 ( #25362 )
2015-10-10 19:36:40 -07:00
Benjamin Peterson
414918a939
use the with statement for locking the internal condition ( closes #25362 )
...
Patch by Nir Soffer.
2015-10-10 19:34:46 -07:00
Benjamin Peterson
90ccccf9ed
merge 3.5 ( #25371 )
2015-10-10 19:32:41 -07:00
Benjamin Peterson
e5df40727c
merge 3.4 ( #25371 )
2015-10-10 19:32:33 -07:00
Benjamin Peterson
b397e3b526
add a missing comma ( closes #25371 )
2015-10-10 19:32:20 -07:00
Serhiy Storchaka
0d554d7ef1
Issue #24164 : Objects that need calling `__new__
` with keyword arguments,
...
can now be pickled using pickle protocols older than protocol version 4.
2015-10-10 22:42:18 +03:00
Serhiy Storchaka
4e96df3b59
Null merge
2015-10-10 20:27:52 +03:00
Serhiy Storchaka
ea620465a5
Null merge
2015-10-10 20:27:28 +03:00
Serhiy Storchaka
0289155b72
Correct Misc/NEWS.
2015-10-10 20:26:16 +03:00
Serhiy Storchaka
ca4265de8d
Issue #25365 : test_pickle now works in threads disabled builds.
2015-10-10 20:11:13 +03:00
Serhiy Storchaka
456a27013e
Issue #25365 : test_pickle now works in threads disabled builds.
2015-10-10 20:10:54 +03:00
Serhiy Storchaka
7b2cfc4465
Issue #25365 : test_pickle now works in threads disabled builds.
2015-10-10 20:10:07 +03:00
Serhiy Storchaka
f98a24eecc
Issue #25364 : zipfile now works in threads disabled builds.
2015-10-10 19:44:23 +03:00
Serhiy Storchaka
9e777730eb
Issue #25364 : zipfile now works in threads disabled builds.
2015-10-10 19:43:32 +03:00
Martin Panter
4df3b1a195
Issue #25322 : Merge contextlib.suppress test fix from 3.5
2015-10-10 11:06:05 +00:00
Martin Panter
05da525e55
Issue #25322 : Merge contextlib.suppress test fix from 3.4 into 3.5
2015-10-10 11:05:47 +00:00
Martin Panter
7c6420a552
Issue #25322 : Fix test for nested contextlib.suppress
2015-10-10 11:04:44 +00:00
Martin Panter
430f657c67
Issue #25161 : Merge full stops from 3.5
2015-10-10 10:45:00 +00:00
Martin Panter
84835ab1cb
Issue #25161 : Merge full stops from 3.4 into 3.5
2015-10-10 10:44:25 +00:00
Martin Panter
d21e0b52f1
Issue #25161 : Add full stops in documentation; patch by Takase Arihiro
2015-10-10 10:36:22 +00:00
Martin Panter
a6d5038226
Issue #22413 : Merge StringIO doc from 3.5
2015-10-10 10:20:25 +00:00
Martin Panter
f264416093
Issue #22413 : Remove comment made out of date by Argument Clinic
2015-10-10 10:17:57 +00:00
Martin Panter
994815e1d7
Issue #22413 : Merge StringIO doc from 3.4 into 3.5
2015-10-10 10:15:21 +00:00
Martin Panter
1431c5af94
Issue #24402 : Merge potential test fix from 3.5
2015-10-10 05:29:19 +00:00
Martin Panter
3cae757772
Issue #24402 : Merge potential test fix from 3.4 into 3.5
2015-10-10 05:28:17 +00:00
Martin Panter
e44dba3b4f
Issue #24402 : Factor out PtyTests.run_child() in input() tests
...
This reuses existing code to hopefully make the new test_input_no_stdout_
fileno() test work. It is hanging Free BSD 9 and OS X Tiger buildbots, and I
don't know why.
2015-10-10 05:27:15 +00:00
Martin Panter
cfad54344f
Issue #22413 : Document newline effect on StringIO initializer and getvalue
...
Also add to comment in the C code.
2015-10-10 03:01:20 +00:00
Martin Panter
5344da5c0d
Issue #24402 : Merge input() fix from 3.5
2015-10-10 02:09:41 +00:00
Martin Panter
e02f8fc44d
Issue #24402 : Merge input() fix from 3.4 into 3.5
2015-10-10 01:55:23 +00:00
Martin Panter
c9a6ab56cf
Issue #24402 : Fix input() when stdout.fileno() fails; diagnosed by Eryksun
...
Also factored out some test cases into a new PtyTests class.
2015-10-10 01:25:38 +00:00
Vinay Sajip
748cf9b66e
Closes #25344 : Merged fix from 3.5.
2015-10-10 00:54:18 +01:00
Vinay Sajip
09a00eb076
Closes #25344 : Merged fix from 3.4.
2015-10-10 00:53:37 +01:00
Vinay Sajip
ff1f3d9ff1
Closes #25344 : Added cookbook recipe to show buffering of logging events.
2015-10-10 00:52:35 +01:00
Brett Cannon
6381e06d97
Merge for issue #25099
2015-10-09 15:10:10 -07:00
Brett Cannon
89065d9fc7
Issue #25099 : Skip relevant tests in test_compileall when an entry on
...
sys.path has an unwritable __pycache__ directory.
This typically comes up when someone runs the test suite from an
administrative install of Python on Windows where the user does not
have write permissions to the stdlib's directory.
Thanks to Zachary Ware and Matthias Klose for reporting bugs related
to this issue.
(grafted from 34bbd537b3e688dfbb6498e9083445a6a72fc4b1)
2015-10-09 15:09:43 -07:00
Brett Cannon
65ed750375
Issue #25099 : Skip relevant tests in test_compileall when an entry on
...
sys.path has an unwritable __pycache__ directory.
This typically comes up when someone runs the test suite from an
administrative install of Python on Windows where the user does not
have write permissions to the stdlib's directory.
Thanks to Zachary Ware and Matthias Klose for reporting bugs related
to this issue.
2015-10-09 15:09:43 -07:00
Victor Stinner
0cdad1e2bc
Issue #25349 : Add fast path for b'%c' % int
...
Optimize also %% formater.
2015-10-09 22:50:36 +02:00
Victor Stinner
be75b8cf23
Issue #25349 : Optimize bytes % int
...
Optimize bytes.__mod__(args) for integere formats: %d (%i, %u), %o, %x and %X.
_PyBytesWriter is now used to format directly the integer into the writer
buffer, instead of using a temporary bytes object.
Formatting is between 30% and 50% faster on a microbenchmark.
2015-10-09 22:43:24 +02:00
R David Murray
aecf63ee3a
Merge #25328 : add missing raise keyword in decode_data+SMTPUTF8 check.
2015-10-09 10:20:58 -04:00
R David Murray
1a815389cc
#25328 : add missing raise keyword in decode_data+SMTPUTF8 check.
...
This is a relatively benign bug, since having both be true was correctly
rejected at in SMTPServer even before this patch.
Patch by Xiang Zhang.
2015-10-09 10:19:33 -04:00
Victor Stinner
6bd525b656
Optimize error handlers of ASCII and Latin1 encoders when the replacement
...
string is pure ASCII: use _PyBytesWriter_WriteBytes(), don't check individual
character.
Cleanup unicode_encode_ucs1():
* Rename repunicode to rep
* Clear rep object on error
* Factorize code between bytes and unicode path
2015-10-09 13:10:05 +02:00
Victor Stinner
ce179bf6ba
Add _PyBytesWriter_WriteBytes() to factorize the code
2015-10-09 12:57:22 +02:00
Victor Stinner
ad7715891e
_PyBytesWriter: simplify code to avoid "prealloc" parameters
...
Substract preallocate bytes from min_size before calling
_PyBytesWriter_Prepare().
2015-10-09 12:38:53 +02:00