This is the version history for the sysv_ipc module.
ftok()
now raises OSError
if it fails so the particulars of the failure are visible to the caller. Thanks to James Williams for the suggestion. (Previously the function just returned -1 if it failed.)
SharedMemory.write()
that only occurred under Python 3. Thanks to Andy for reporting!
I'm bumping the version number to 1.0.0 because I now consider this feature complete. That doesn't mean I won't add features, but I don't feel like I need to.
memoryview
and bytearray
objects to be created from a SharedMemory
instance.
Version 0.7.0 is finally out now that this package is 7 years old...
SharedMemory.write()
. On an
attempt to write outside of the segment, the code raises
ValueError
. The documentation had incorrectly stated that
write()
would silently
discard the data that overflowed the segment.
SharedMemory.write()
that
incorrectly interpreted offsets > LONG_MAX
.
SharedMemory.write()
that
didn’t always generate a ValueError
for negative
offsets.
SharedMemory.attach()
was
documented to accept keyword arguments but did not. Now it does.
PY_SSIZE_T_CLEAN
. Thanks to Tilman Koschnick for
bringing this to my attention.
SHM_RDONLY
as a module-level constant.
prober.py
where prober would fail
on systems where Python's include file was not named
pyconfig.h
. (RHEL 6 is one such system.) Thanks to
Joshua Harlow for the bug report and patch.
Spasibo to Yuriy Taraday for reporting some doc errors corrected in this version.
Added the ability to use Semaphores in context managers. Thanks to Matt Ruffalo for the suggestion and patch.
Fixed a bug where SharedMemory.write() claimed to accept keyword arguments but didn't actually do so. Thanks to Matt Ruffalo for the bug report and patch.
attach()
method based on a
suggestion by Vladimír Včelák.
ftok()
method along with dire warnings about
its use.
write()
that occurred any time
an offset was passed. This was introduced in v0.6.0.
Tack to Johan Bernhardtson for the bug report.
MessageQueue.send()
. Obrigado
to Álvaro Justen and Ronald Kaiser for the bug report and
patch.
key_t
as a
short
. I don't think such a system exists, though.
No code changes in this version.
sysv_ipc_module.c
that
still referred to the GPL license.
__version
, __author__
,
__license__
and __copyright__
.
file()
from setup.py
in favor
of open()
.
No code changes in this version.
No code changes in this version.
str()
and repr()
support to all
objects.SharedMemory.write()
that could cause
a spurious error of "Attempt to write past end of memory
segment". This bug only occurred on platforms using
different sizes for long
and int
, or
long
and py_size_t
(depending on Python version). Tack to Jesper
for debug help.
MessageQueue.receive()
.key
attribute of SharedMemory objects
returned garbage.
help()
command).
This version features a rename of classes and errors (sorry about breaking the names), some modifications to semaphore timeouts, and many small fixes.
A semaphore's .block
flag now consistently trumps the
timeout. When False
, the timeout is irrelevant -- calls
will never block. In prior versions, the flag was ignored
when the timeout was non-zero.
Also, on platforms (such as OS X) where semtimedop()
is
not supported, all timeouts are now treated as None
.
In other words, when .block
is True, all calls
wait as long as necessary.
Other fixes –
key_t
, pid_t
, etc.
attach()
function
that would set an error string but not return an error
value if the passed address was not None
or a long.
acquire()
and
release()
delta to be between SHORT_MIN and
SHORT_MAX since
it
is a short in the SUSv2 spec.
acquire()
or
release()
with a delta of 0
would call
.Z()
instead.
0
in
SharedMemory.read()
SharedMemory
init code that
could, under vanishingly rare circumstances, return failure
without setting the error code.
.seq
member
of the sem_perm
and shm_perm
structs.
key
(a.k.a. _key
and __key
) element of the
ipc_perm
struct.
ExistentialError
, etc.) from
being visible in the module.
IPC_CREAT
was specified
and an existing segment was opened.
PAGE_SIZE
. Updated code and
documentation to use intelligent defaults. Tack to
Jesper for the bug report.
shm.remove()
on shared
memory that was already removed would cause a SystemError.
(I wasn't setting the Python error before returning.)
IPC_CREX
.MAX_KEY
to KEY_MAX
and
MAX_SEMAPHORE_VALUE
to SEMAPHORE_VALUE_MAX
to be consistent with the C naming convention in limits.h.
SEMAPHORE_VALUE_MAX
to 32767 until I can
find a reliable way to determine it at install time.