Zackery Spytz
14514d9084
bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)
...
The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.
Co-Authored-By: Martin Panter <vadmium+py@gmail.com>
2019-05-17 10:13:03 +03:00
Serhiy Storchaka
9e4861f523
bpo-22831: Use "with" to avoid possible fd leaks in tests (part 1). (GH-10928)
2019-03-05 10:05:57 +02:00
Anthony Sottile
8377cd4fcd
Clean up code which checked presence of os.{stat,lstat,chmod} ( #11643 )
2019-02-25 23:32:27 +01:00
Berker Peksag
bc85475058
bpo-34754: Fix test_flush_return_value on FreeBSD (GH-9451)
...
Apparently, FreeBSD doesn't raise OSError when offset is
not a multiple of mmap.PAGESIZE.
2018-09-20 19:53:06 +03:00
Berker Peksag
e7d4b2f205
bpo-2122: Make mmap.flush() behave same on all platforms (GH-8692)
...
Previously, its behavior was platform-dependent and there was no error checking
under Windows.
2018-08-22 21:21:05 +03:00
Zackery Spytz
e9e3976057
bpo-33767: Fix improper use of SystemError by mmap.mmap objects (GH-7381)
...
Raise TypeError instead of SystemError for unsupported operations.
2018-06-05 15:59:41 +03:00
Victor Stinner
8c663fd60e
Replace KB unit with KiB ( #4293 )
...
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.
Same change for MB and GB which become MiB and GiB.
Change the output of Tools/iobench/iobench.py.
Round also the size of the documentation from 5.5 MB to 5 MiB.
2017-11-08 14:44:44 -08:00
Benjamin Peterson
87845bcb4d
merge 3.5
2016-10-05 22:54:19 -07:00
Benjamin Peterson
4c8b2cd126
skip test on windows
2016-10-05 22:09:31 -07:00
Benjamin Peterson
cf0b9da988
fix bug in 48797808a302
2016-10-05 22:00:24 -07:00
Benjamin Peterson
e06cc67c19
skip test if resizing is not supported
2016-10-05 22:00:05 -07:00
Benjamin Peterson
cd04db03de
mmap: do all internal arithmetic with Py_ssize_t while being very careful about overflow
2016-10-05 21:45:48 -07:00
Serhiy Storchaka
8ec1175204
Issue #26927 : Fixed test_mmap on platforms with 32-bit off_t (like Android).
...
Patch by Xavier de Gaye.
2016-05-23 08:42:09 +03:00
Serhiy Storchaka
05d3921cc1
Issue #26927 : Fixed test_mmap on platforms with 32-bit off_t (like Android).
...
Patch by Xavier de Gaye.
2016-05-23 08:41:48 +03:00
Berker Peksag
6282e656e9
Issue #26335 : Make mmap.write() return the number of bytes written like
...
other write methods.
Patch by Jakub Stasiak.
2016-03-02 19:30:18 +02:00
Martin Panter
da19767b86
Issue #25004 : Merge 3.4 into 3.5
2015-09-07 04:04:40 +00:00
Martin Panter
e8d58d1f02
Issue #25004 : Handle out-of-disk-space error in LargeMmapTests
...
Patch from John Beck.
2015-09-07 02:57:47 +00:00
Serhiy Storchaka
8490f5acfe
Issue #23001 : Few functions in modules mmap, ossaudiodev, socket, ssl, and
...
codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too.
2015-03-20 09:00:36 +02:00
Serhiy Storchaka
996c3deafe
Fixed typo.
2014-08-19 18:20:23 +03:00
Serhiy Storchaka
76b47655ff
Issue #15696 : Add a __sizeof__ implementation for mmap objects on Windows.
2014-08-19 17:11:20 +03:00
Serhiy Storchaka
43767638a9
Issue #18702 : All skipped tests now reported as skipped.
2013-11-03 21:31:38 +02:00
Antoine Pitrou
c53204b947
Issue #4885 : Add weakref support to mmap objects. Patch by Valerie Lambert.
2013-08-05 23:17:30 +02:00
Richard Oudkerk
76450e6a84
Merge
2013-02-13 12:33:53 +00:00
Richard Oudkerk
6d40134eba
Merge
2013-02-13 12:32:32 +00:00
Richard Oudkerk
0d09ba8e0b
Issue #16743 : Fix mmap overflow check on 32 bit Windows
2013-02-13 12:18:03 +00:00
Andrew Svetlov
f7a17b48d7
Replace IOError with OSError ( #16715 )
2012-12-25 16:47:37 +02:00
Andrew Svetlov
2606a6f197
Issue #16719 : Get rid of WindowsError. Use OSError instead
...
Patch by Serhiy Storchaka.
2012-12-19 14:33:35 +02:00
Andrew Svetlov
6eda46de99
Replace mmap.error with OSError, #16705
2012-12-17 22:55:31 +02:00
Jesus Cea
4886d5b338
#15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete
2012-09-10 22:50:21 +02:00
Jesus Cea
1f2799bef4
#15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete
2012-09-10 22:49:50 +02:00
Jesus Cea
1b3f3b0316
Closes #15676 : mmap: add empty file check prior to offset check
2012-09-10 01:23:05 +02:00
Jesus Cea
941bfcc537
Closes #15676 : mmap: add empty file check prior to offset check
2012-09-10 00:27:55 +02:00
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
2011-10-12 02:54:14 +02:00
Victor Stinner
2f655b73e4
(merge 3.2) Issue #12451 : Open files in binary mode in some tests when the text
...
file is not needed.
Remove also an unused variable (blank) in test_threading.
2011-06-30 18:21:39 +02:00
Victor Stinner
a6d2c769fb
Issue #12451 : Open files in binary mode in some tests when the text file is not
...
needed.
Remove also an unused variable (blank) in test_threading.
2011-06-30 18:20:11 +02:00
Charles-François Natali
4dd453c6aa
Issue #12021 : Make mmap's read() method argument optional. Patch by Petri
...
Lehtinen.
2011-06-08 19:18:14 +02:00
Nadeem Vawda
b0b0579625
Merge: Fix potential resource leak in test_mmap.
2011-05-07 14:35:36 +02:00
Nadeem Vawda
7420b70240
Fix potential resource leak in test_mmap.
2011-05-07 14:35:05 +02:00
Nadeem Vawda
044dfadd1c
Merge: #11277 : Fix tests - crash will not trigger if the file is closed and reopened.
2011-05-07 14:16:50 +02:00
Nadeem Vawda
909f6d2fba
Issue #11277 : Fix tests - crash will not trigger if the file is closed and reopened.
2011-05-07 14:14:53 +02:00
Nadeem Vawda
c2bb073742
Merge: #11277 : Add tests for mmap crash when using large sparse files on OS X.
...
Also, reduce code duplication in LargeMmapTests.
Original patch by Steffen Daode Nurpmeso.
2011-05-07 13:08:54 +02:00
Nadeem Vawda
ced1056925
Issue #11277 : Add tests for mmap crash when using large sparse files on OS X.
...
Also, reduce code duplication in LargeMmapTests.
Original patch by Steffen Daode Nurpmeso.
2011-05-07 13:01:50 +02:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Antoine Pitrou
80d3610bc3
Merge fix for issue #11391
2011-03-06 01:50:56 +01:00
Antoine Pitrou
7b50c2c6ae
Fix buildbot failure following 97a5590b9291
2011-03-06 01:47:18 +01:00
Antoine Pitrou
16a0a0b0a0
Issue #11391 : Writing to a mmap object created with
...
`mmap.PROT_READ|mmap.PROT_EXEC` would segfault instead of raising a
TypeError. Patch by Charles-François Natali.
2011-03-06 01:11:03 +01:00
Antoine Pitrou
9e719b6eba
Merged revisions 88460,88464,88466,88486,88511,88652 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88460 | antoine.pitrou | 2011-02-21 19:03:13 +0100 (lun., 21 févr. 2011) | 4 lines
Issue #10276 : Fix the results of zlib.crc32() and zlib.adler32() on buffers
larger than 4GB. Patch by Nadeem Vawda.
........
r88464 | antoine.pitrou | 2011-02-21 20:05:08 +0100 (lun., 21 févr. 2011) | 3 lines
Fix issues on 32-bit systems introduced by r88460
........
r88466 | antoine.pitrou | 2011-02-21 20:28:40 +0100 (lun., 21 févr. 2011) | 3 lines
Fix compile error under MSVC introduced by r88460.
........
r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines
Issue #4681 : Allow mmap() to work on file sizes and offsets larger than
4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
........
r88511 | antoine.pitrou | 2011-02-22 22:42:56 +0100 (mar., 22 févr. 2011) | 4 lines
Issue #11277 : finally fix Snow Leopard crash following r88460.
(probably an OS-related issue with mmap)
........
r88652 | antoine.pitrou | 2011-02-26 16:58:05 +0100 (sam., 26 févr. 2011) | 4 lines
Issue #9931 : Fix hangs in GUI tests under Windows in certain conditions.
Patch by Hirokazu Yamamoto.
........
2011-02-28 23:48:16 +00:00
Antoine Pitrou
97696cbf36
Merged revisions 88486 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines
Issue #4681 : Allow mmap() to work on file sizes and offsets larger than
4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
........
2011-02-21 23:46:27 +00:00
Antoine Pitrou
6107a4e24a
Merged revisions 88131 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88131 | antoine.pitrou | 2011-01-20 22:07:24 +0100 (jeu., 20 janv. 2011) | 6 lines
Issue #10955 : Fix a potential crash when trying to mmap() a file past its
length. Initial patch by Ross Lagerwall.
This fixes a regression introduced by r88022.
........
2011-01-20 21:11:13 +00:00