Benjamin Peterson
e4c222c040
merge 3.5
2016-10-05 23:32:15 -07:00
Benjamin Peterson
8f1cdc65ee
ensure read size is initialized
2016-10-05 23:32:09 -07:00
Benjamin Peterson
43441c77b5
merge 3.5
2016-10-05 23:29:16 -07:00
Benjamin Peterson
3776836f67
do not leak buffer if mmap is not writable
2016-10-05 23:29:07 -07:00
Benjamin Peterson
87845bcb4d
merge 3.5
2016-10-05 22:54:19 -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
Steve Dower
940f33a50f
Issue #23524 : Finish removing _PyVerify_fd from sources
2016-09-08 11:21:54 -07:00
Benjamin Peterson
af580dff4a
replace PY_LONG_LONG with long long
2016-09-06 10:46:49 -07: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
Serhiy Storchaka
5c4064e8bd
Issue #25421 : __sizeof__ methods of builtin types now use dynamic basic size.
...
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
2015-12-19 20:05:25 +02:00
Benjamin Peterson
60e3f367a4
Merge 3.4 ( #24217 )
2015-08-02 12:16:45 -07:00
Benjamin Peterson
f6b5cad3c3
include fcntl.h on all *nix platforms ( closes #24217 )
...
Patch by Jeffrey Armstrong.
2015-08-02 12:15:30 -07:00
Steve Dower
8fc8980c96
Issue #23524 : Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
2015-04-12 00:26:27 -04:00
Victor Stinner
e134a7fe36
Issue #23752 : _Py_fstat() is now responsible to raise the Python exception
...
Add _Py_fstat_noraise() function when a Python exception is not welcome.
2015-03-30 10:09:31 +02:00
Victor Stinner
f329878e74
Issue #23753 : Python doesn't support anymore platforms without stat() or
...
fstat(), these functions are always required.
Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
2015-03-24 10:27:50 +01: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
Victor Stinner
e371b3d21a
Fix compiler warning in mmapmodule.c (compare signed/unsigned integers)
2015-03-18 15:04:34 +01:00
Victor Stinner
a555cfcb73
Issue #23694 : Enhance _Py_open(), it now raises exceptions
...
* _Py_open() now raises exceptions on error. If open() fails, it raises an
OSError with the filename.
* _Py_open() now releases the GIL while calling open()
* Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not
held
2015-03-18 00:22:14 +01:00
Steve Dower
f2f373f593
Issue #23152 : Implement _Py_fstat() to support files larger than 2 GB on Windows.
...
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
2015-02-21 08:44:05 -08:00
Serhiy Storchaka
76b47655ff
Issue #15696 : Add a __sizeof__ implementation for mmap objects on Windows.
2014-08-19 17:11:20 +03:00
Christian Heimes
af01f66817
Issue #16136 : Remove VMS support and VMS-related code
2013-12-21 16:19:10 +01:00
Victor Stinner
daf455554b
Issue #18571 : Implementation of the PEP 446: file descriptors and file handles
...
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
2013-08-28 00:53:59 +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
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
Jesus Cea
67bd81b867
MERGE: #15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2)
2012-09-10 22:58:35 +02:00
Jesus Cea
e8db356cf1
#15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2)
2012-09-10 22:58:07 +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
Stefan Krah
2318699f59
Whitespace.
2012-03-06 15:37:36 +01:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Antoine Pitrou
6b4883dec0
PEP 3151 / issue #12555 : reworking the OS and IO exception hierarchy.
2011-10-12 02:54:14 +02:00
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
...
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Ross Lagerwall
1db37f3248
Merge with 3.2 (Issue #12404 ).
2011-06-25 10:11:44 +02:00
Ross Lagerwall
dbfb9b89db
Issue 12404: Remove C89 incompatible code from mmap module.
...
Patch by Akira Kitada.
2011-06-25 10:02:37 +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
Brett Cannon
5fac8af22c
Checking if an unsigned long is < 0 is pointless.
...
Found by LLVM/clang 2.9.
2011-06-06 20:22:56 -07:00
Victor Stinner
8108e96bc8
(Merge 3.1) Issue #11277 : mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X
...
to get around a mmap bug with sparse files. Patch written by Steffen Daode
Nurpmeso.
2011-05-02 01:11:33 +02:00
Victor Stinner
a6cd0cf0f5
Issue #11277 : mmap calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around a
...
mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
2011-05-02 01:05:37 +02:00
Antoine Pitrou
80d3610bc3
Merge fix for issue #11391
2011-03-06 01:50:56 +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
Antoine Pitrou
305bc9e0e8
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:07:24 +00:00
Antoine Pitrou
50dc65f6ce
Merged revisions 88036 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88036 | antoine.pitrou | 2011-01-15 18:25:58 +0100 (sam., 15 janv. 2011) | 3 lines
Fix mmap and test_mmap under Windows too (followup to r88022)
........
2011-01-15 17:31:19 +00:00
Antoine Pitrou
d0ebc75e73
Fix mmap and test_mmap under Windows too (followup to r88022)
2011-01-15 17:25:58 +00:00
Antoine Pitrou
fb7bc3d2f0
Merged revisions 88022 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88022 | antoine.pitrou | 2011-01-15 17:17:07 +0100 (sam., 15 janv. 2011) | 7 lines
Issue #10916 : mmap should not segfault when a file is mapped using 0 as
length and a non-zero offset, and an attempt to read past the end of file
is made (IndexError is raised instead). Patch by Ross Lagerwall.
Requested by Georg.
........
2011-01-15 16:18:37 +00:00