List of commits:
Subject Hash Author Date (UTC)
bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041) 4c0d9ea995da595e90e08813b89510de59907802 Serhiy Storchaka 2017-04-12 13:03:23
bpo-30047: Fix a typo in Doc/library/select.rst (#1086) 3e0f1fc4e0ffcfcc706015fa3d67c262948ef171 NAKAMURA Osamu 2017-04-12 10:30:40
Remove two legacy constants which hopefully have no consumers (#1087) c7cc14a825ec156c76329f65bed0d0bd6e03d035 Alex Gaynor 2017-04-12 02:41:42
Reimplement tempfile._RandomNameSequence using a generator function. (#1075) f50354adaaafebe95ad09d09b825804a686ea843 Serhiy Storchaka 2017-04-11 19:45:59
bpo-29692: Add missing ACKS entry (#1079) e8a6bb4f3936123f3eca0b6cea05e2875a2722bc Nick Coghlan 2017-04-11 09:47:39
bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949) 00c75e9a45ff0366c185e9e8a2e23af5a35481b0 svelankar 2017-04-11 09:11:13
Remove superfluous comment in urllib.error. (#1076) 6fab78e9027f9ebd6414995580781b480433e595 Senthil Kumaran 2017-04-11 04:08:35
Remove OSError related comment in urllib.request. (#1070) 6dfcc81f6b1c82a71a1c876e14424fb8b3573447 Senthil Kumaran 2017-04-10 02:49:34
bpo-29506: Clarify deep copy note in copy module 19e04942562a980ad2519f6ff79c455a7472783b Sanyam Khurana 2017-04-09 10:22:30
bpo-26187: Test that set_trace_callback() is not called multiple times (GH-461) 0e6cb2ea624570ed08c354f1ed1f595dab4192d6 Aviv Palivoda 2017-04-09 09:11:59
Issue #29798: Handle git worktree in patchcheck (#1058) 2abfdf5a81383d3b1ed6b7321903a9a168c373c5 Nick Coghlan 2017-04-09 08:33:03
bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` (#916) 64c8f705c0121a4b45ca2c3bc7b47b282e9efcd8 Michael Seifert 2017-04-09 07:47:12
Remove invalid comment in urllib.request. (#1054) a2a9ddd923a849124bdd1c484f70f02df6fde0e9 Senthil Kumaran 2017-04-09 06:27:25
Improvements to typing documentation (#967) 45d22c256bce3afcf57f49032a6b20fdec4f26ad Jelle Zijlstra 2017-04-08 16:09:14
bpo-29998: Pickling and copying ImportError now preserves name and path (#1010) b785396ab451b0c9d6ae9ee5a9e56c810209a6cb Serhiy Storchaka 2017-04-08 06:55:07
Expand the PySlice_GetIndicesEx macro. (#1023) b879fe82e7e5c3f7673c9a7fa4aad42bd05445d8 Serhiy Storchaka 2017-04-08 06:53:51
bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). (#843) 205e00c5cfd495a4dc6dae8e8fa0fb828fb3dca9 Serhiy Storchaka 2017-04-08 06:52:59
Fix a minor typo. (#1032) dd9a0a14c89d57e43898d4b866b8c161e4ff8506 Barry Warsaw 2017-04-07 18:18:14
bpo-29958: Minor improvements to zipfile and tarfile CLI. (#944) 150cd1916a59e750ce88c65325de9ef0c42c6cb5 Serhiy Storchaka 2017-04-07 15:56:12
Remove Invalid comment in test_urllib2.py (#1020) fd0cd07a5a3c964c084f4efc5bbcb89dd2193ee6 Senthil Kumaran 2017-04-07 07:19:08
Commit 4c0d9ea995da595e90e08813b89510de59907802 - bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041)
multiple times. Writing to closed zip entry writer object now always produce
a ValueError.
Author: Serhiy Storchaka
Author date (UTC): 2017-04-12 13:03
Committer name: GitHub
Committer date (UTC): 2017-04-12 13:03
Parent(s): 3e0f1fc4e0ffcfcc706015fa3d67c262948ef171
Signer:
Signing key:
Signing status: N
Tree: 1c6138fb627ad1f5b982cc67dafd230d50f8cc27
File Lines added Lines deleted
Lib/test/test_zipfile.py 42 0
Lib/zipfile.py 4 0
Misc/NEWS 3 0
File Lib/test/test_zipfile.py changed (mode: 100644) (index 46a67d5428..ff55e94e47)
... ... class LzmaTestZip64InSmallFiles(AbstractTestZip64InSmallFiles,
734 734 compression = zipfile.ZIP_LZMA compression = zipfile.ZIP_LZMA
735 735
736 736
737 class AbstractWriterTests:
738
739 def tearDown(self):
740 unlink(TESTFN2)
741
742 def test_close_after_close(self):
743 data = b'content'
744 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
745 w = zipf.open('test', 'w')
746 w.write(data)
747 w.close()
748 self.assertTrue(w.closed)
749 w.close()
750 self.assertTrue(w.closed)
751 self.assertEqual(zipf.read('test'), data)
752
753 def test_write_after_close(self):
754 data = b'content'
755 with zipfile.ZipFile(TESTFN2, "w", self.compression) as zipf:
756 w = zipf.open('test', 'w')
757 w.write(data)
758 w.close()
759 self.assertTrue(w.closed)
760 self.assertRaises(ValueError, w.write, b'')
761 self.assertEqual(zipf.read('test'), data)
762
763 class StoredWriterTests(AbstractWriterTests, unittest.TestCase):
764 compression = zipfile.ZIP_STORED
765
766 @requires_zlib
767 class DeflateWriterTests(AbstractWriterTests, unittest.TestCase):
768 compression = zipfile.ZIP_DEFLATED
769
770 @requires_bz2
771 class Bzip2WriterTests(AbstractWriterTests, unittest.TestCase):
772 compression = zipfile.ZIP_BZIP2
773
774 @requires_lzma
775 class LzmaWriterTests(AbstractWriterTests, unittest.TestCase):
776 compression = zipfile.ZIP_LZMA
777
778
737 779 class PyZipFileTests(unittest.TestCase): class PyZipFileTests(unittest.TestCase):
738 780 def assertCompiledIn(self, name, namelist): def assertCompiledIn(self, name, namelist):
739 781 if name + 'o' not in namelist: if name + 'o' not in namelist:
File Lib/zipfile.py changed (mode: 100644) (index 550e64fd1a..988f39ed1b)
... ... class _ZipWriteFile(io.BufferedIOBase):
980 980 return True return True
981 981
982 982 def write(self, data): def write(self, data):
983 if self.closed:
984 raise ValueError('I/O operation on closed file.')
983 985 nbytes = len(data) nbytes = len(data)
984 986 self._file_size += nbytes self._file_size += nbytes
985 987 self._crc = crc32(data, self._crc) self._crc = crc32(data, self._crc)
 
... ... class _ZipWriteFile(io.BufferedIOBase):
990 992 return nbytes return nbytes
991 993
992 994 def close(self): def close(self):
995 if self.closed:
996 return
993 997 super().close() super().close()
994 998 # Flush any data from the compressor, and update header info # Flush any data from the compressor, and update header info
995 999 if self._compressor: if self._compressor:
File Misc/NEWS changed (mode: 100644) (index d8b1ccb43a..b6f8c7094c)
... ... Library
314 314 times when schema is changing. Indirectly fixed by switching to times when schema is changing. Indirectly fixed by switching to
315 315 use sqlite3_prepare_v2() in bpo-9303. Patch by Aviv Palivoda. use sqlite3_prepare_v2() in bpo-9303. Patch by Aviv Palivoda.
316 316
317 - bpo-30017: Allowed calling the close() method of the zip entry writer object
318 multiple times. Writing to a closed writer now always produces a ValueError.
319
317 320 - bpo-29998: Pickling and copying ImportError now preserves name and path - bpo-29998: Pickling and copying ImportError now preserves name and path
318 321 attributes. attributes.
319 322
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