| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a missing PyMem_Free(format) in time_strftime().
|
The actual fix here looks good to me, but I am fairly sure that this code is not hit by any of the tests, so I recommend adding a test that hits there. I think adding this to Lib/test/datetimetester.py under TestDate should work: @unittest.skipif(not (sys.platform.startswith('aix') or
sys.platform.startswith('win'))
"%y on Windows and AIX doesn't support years < 1900")
def test_strftime_aixwin_pre1900(self):
d = self.theclass(1, 1, 1)
self.assertRaises(ValueError, d.strftime, '%y') |
Sorry, something went wrong.
|
@pganssle This code is hit in test_y_before_1900() in Lib/test/test_strftime.py. |
Sorry, something went wrong.
|
@ZackerySpytz Ah, tricky tricky. There's a bunch of strftime-related tests in test_time and datetimetester so I didn't notice test_strftime.py. My bad. |
Sorry, something went wrong.
|
Thanks for the patch, @ZackerySpytz ! I'm not sure if my label adding and removing messed up our auto-merge. If it did I will try to merge this tomorrow. |
Sorry, something went wrong.
Sorry, something went wrong.
|
Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
Sorry, something went wrong.
There was a missing PyMem_Free(format) in time_strftime(). (cherry picked from commit 91e6c87) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-9469 is a backport of this pull request to the 3.7 branch. |
Sorry, something went wrong.
There was a missing PyMem_Free(format) in time_strftime(). (cherry picked from commit 91e6c87) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-9470 is a backport of this pull request to the 3.6 branch. |
Sorry, something went wrong.
|
Thank you, @brettcannon and @serhiy-storchaka. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The format string was not being freed when ValueError was raised for %y on certain platforms.