List of commits:
Subject Hash Author Date (UTC)
test_locale now ignores the DeprecationWarning (#977) 9acc6a03f1fd684fce2755b3b22f7448ad4c1dd6 Victor Stinner 2017-04-03 16:09:55
Fix misleading documentation for math.exp. (#951) 734125938d4653459593ebd28a0aec086efb1f27 Mark Dickinson 2017-04-02 15:30:04
bpo-19225: Add a table of warning names and missed exception names in C API doc (#881) e8c763128fb459c5c98194e4312f31493c0f12df cocoatomo 2017-04-02 10:45:40
bpo-29654 : Support If-Modified-Since HTTP header (browser cache) (#298) 351adda54bed3afbbf6db7725699679e68722d7d Pierre Quentel 2017-04-02 10:26:12
Minor spell fix and formatting fixes in urllib tests. (#959) efbd4ea65dbb9f87b1afeec6a760802756badee5 Senthil Kumaran 2017-04-02 06:47:35
bpo-29957: change LBYL key lookup to dict.setdefault (#938) 11fa3c7cd1b151e302d4eee0369cafbaf151c8fb Michael Selik 2017-04-02 06:02:31
bpo-26947: DOC: clarify wording on hashable in glossary (#948) 64c887ab3a400cf91bde4f0c5ef69eacc88bc5e1 csabella 2017-04-02 02:50:47
bpo-29949: Fix set memory usage regression (GH-943) e82cf8675bacd7a03de508ed11865fc2701dcef5 INADA Naoki 2017-04-01 08:20:25
Revert "bpo-29763: Use unittest cleanup in test_site (GH-841)" (GH-942) cd815edf012dc6dd20dfeef91951270e96607616 Zachary Ware 2017-04-01 06:29:31
bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (#879) 7bd8d3e794782582a4ad1c9749424fff86802c3e s-sanjay 2017-04-01 06:09:53
Add helpful explaination to test_password_manager tests. (#936) 1f5425ff69ea0531d869b4f9fa28bd3f66ca3de7 Senthil Kumaran 2017-04-01 05:27:27
bpo-29763: Use unittest cleanup in test_site (GH-841) b94d7fd4efa877d649cea9c8125c8869ffe0c32d Zachary Ware 2017-04-01 05:18:23
Link to the devguide's PR guidelines (GH-932) 1e5766ff436cea8871042d3b3be571e04b4058f9 Brett Cannon 2017-03-31 21:19:04
bpo-29953: Fix memory leaks in the replace() method of datetime and time (#927) 314d6fca36a4eaa0541218431d14804fadec6488 Serhiy Storchaka 2017-03-31 19:48:16
Fix spurious MemoryError introduced by PR #886. (#930) 06bb4873d6a9ac303701d08a851d6cd9a51e02a3 T. Wouters 2017-03-31 17:10:19
bpo-29941: Assert fixes (#886) a00c3fd12d421e41b769debd7df717d17b0deed5 T. Wouters 2017-03-31 16:14:41
suppress compiler warnings in _ctypes_test (#902) 164d30eb1e66575dafee6af4fca4cbf52c7fbe6a Benjamin Peterson 2017-03-31 11:05:25
bpo-29952: Use usual terminology of dict (GH-917) cdcac039fb447f2ab04efcacbe663751bb2cb4ec cocoatomo 2017-03-31 05:48:49
Remove catching OSError in ftphandler test. Only URLError is raised in urllib.request module. (#918) ed3dd1c02af6872bd0748f7b9a5dadb89f7b830f Senthil Kumaran 2017-03-31 05:43:05
bpo-29928: Add f-string to the Glossary (GH-864) 33db068dac7686e37736f7ecf8abb2aee0345cf2 Mariatta 2017-03-30 19:12:18
Commit 9acc6a03f1fd684fce2755b3b22f7448ad4c1dd6 - test_locale now ignores the DeprecationWarning (#977)
Don't fail anymore if test run with python3 -Werror.

Fix also deprecation message: add a space.
Author: Victor Stinner
Author date (UTC): 2017-04-03 16:09
Committer name: GitHub
Committer date (UTC): 2017-04-03 16:09
Parent(s): 734125938d4653459593ebd28a0aec086efb1f27
Signer:
Signing key:
Signing status: N
Tree: 7b984278c7f7b147e73775e8dda81914c4af3e2d
File Lines added Lines deleted
Lib/locale.py 1 1
Lib/test/test_locale.py 13 11
File Lib/locale.py changed (mode: 100644) (index 50cd652574..73fc94d936)
... ... def format_string(f, val, grouping=False, monetary=False):
245 245 def format(percent, value, grouping=False, monetary=False, *additional): def format(percent, value, grouping=False, monetary=False, *additional):
246 246 """Deprecated, use format_string instead.""" """Deprecated, use format_string instead."""
247 247 warnings.warn( warnings.warn(
248 "This method will be removed in a future version of Python."
248 "This method will be removed in a future version of Python. "
249 249 "Use 'locale.format_string()' instead.", "Use 'locale.format_string()' instead.",
250 250 DeprecationWarning, stacklevel=2 DeprecationWarning, stacklevel=2
251 251 ) )
File Lib/test/test_locale.py changed (mode: 100644) (index 06d286622a..4dd300ed11)
1 from test.support import verbose, is_android
1 from test.support import verbose, is_android, check_warnings
2 2 import unittest import unittest
3 3 import locale import locale
4 4 import sys import sys
 
... ... class BaseFormattingTest(object):
144 144 func(format, value, **format_opts), out) func(format, value, **format_opts), out)
145 145
146 146 def _test_format(self, format, value, out, **format_opts): def _test_format(self, format, value, out, **format_opts):
147 self._test_formatfunc(format, value, out,
148 func=locale.format, **format_opts)
147 with check_warnings(('', DeprecationWarning)):
148 self._test_formatfunc(format, value, out,
149 func=locale.format, **format_opts)
149 150
150 151 def _test_format_string(self, format, value, out, **format_opts): def _test_format_string(self, format, value, out, **format_opts):
151 152 self._test_formatfunc(format, value, out, self._test_formatfunc(format, value, out,
 
... ... class TestFormatPatternArg(unittest.TestCase):
232 233 # Test handling of pattern argument of format # Test handling of pattern argument of format
233 234
234 235 def test_onlyOnePattern(self): def test_onlyOnePattern(self):
235 # Issue 2522: accept exactly one % pattern, and no extra chars.
236 self.assertRaises(ValueError, locale.format, "%f\n", 'foo')
237 self.assertRaises(ValueError, locale.format, "%f\r", 'foo')
238 self.assertRaises(ValueError, locale.format, "%f\r\n", 'foo')
239 self.assertRaises(ValueError, locale.format, " %f", 'foo')
240 self.assertRaises(ValueError, locale.format, "%fg", 'foo')
241 self.assertRaises(ValueError, locale.format, "%^g", 'foo')
242 self.assertRaises(ValueError, locale.format, "%f%%", 'foo')
236 with check_warnings(('', DeprecationWarning)):
237 # Issue 2522: accept exactly one % pattern, and no extra chars.
238 self.assertRaises(ValueError, locale.format, "%f\n", 'foo')
239 self.assertRaises(ValueError, locale.format, "%f\r", 'foo')
240 self.assertRaises(ValueError, locale.format, "%f\r\n", 'foo')
241 self.assertRaises(ValueError, locale.format, " %f", 'foo')
242 self.assertRaises(ValueError, locale.format, "%fg", 'foo')
243 self.assertRaises(ValueError, locale.format, "%^g", 'foo')
244 self.assertRaises(ValueError, locale.format, "%f%%", 'foo')
243 245
244 246
245 247 class TestLocaleFormatString(unittest.TestCase): class TestLocaleFormatString(unittest.TestCase):
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using git:
git clone git://git.rocketgit.com/user/benf_wspdigital/cpython

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main