Foolscap

Latest version: v23.11.0

Safety actively analyzes 618874 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 11

20.7.0

* update to use+require py3 (py3.5 or higher)
* switch to CalVer

20.4.0

Foolscap has finally been ported to py3 (specifically py3.5+). It currently
still works under py2.7 as well, although support may go away at any time.

Several features were removed to support the transition:

* The SOCKS connection handler has been removed: the `txsocksx` library it
required does not yet work under py3. The `[socks]` extra has been removed.
* The I2P connection handler has been removed, as `txi2p` is still py2-only.
The `[i2p]` extra has been removed.
* The `UnsafeBanana` utility has been removed. This worked like stdlib
"pickle", and was just as unsafe, and nobody used it.

Most APIs now accept either bytes or text, and return native strings
(`str`/`bytes` on py2, `str`/`unicode` on py3).

To maintain wire-level compatibility between foolscap-based programs across
heterogeneous peers, you must keep careful track of the types sent as
arguments inside `callRemote` messages. Programs which casually sent native
strings (bytes) on py2 will continue to send those bytes over the wire, so a
py3 port of the same program will receive bytes, even though the same
(unmodified) code will send unicode instances to the py2 program. When
porting, I recommend first making all string types explicit (`b"for bytes"`
and `u"for text"`), and make sure a py2 version with these changes can
interoperate with the original py2 version. Then a py3 version has a stronger
chance of working. You may be stuck with these awkward `bytes` markers for a
long time.

Some features may no longer work very well. Hopefully these will be fixed
soon:

* logging: Foolscap's extensive logging system stores data in JSON "incident"
files, and has multiple tools to deliver log events over the wire, some of
which might rely upon implicit string conversion. Several of these may now
display spurious `b''` wrappers around the data they display, especially if
a py2 emitter sends events to a py3 follower
* appserver: the `flappserver` and `flappclient` tools have not been
extensively tested following the conversion

See docs/py2-3-porting.rst for details and porting recommendations.

Other fixes:

* `callRemote()` did not accept a keyword argument named `f` (65)
* switch release numbers to [CalVer](https://calver.org/), following the
[Twisted](https://github.com/twisted/twisted/blob/twisted-20.3.0/docs/core/development/policy/release-process.rst#version-numbers)
standard of YY.MM.patch

15.3.0

of log messages when run under `twistd`. This release fixes that bug, and
slightly changes the semantics of calling `log.msg()` with additional
parameters. (244)

Foolscap no longer claims compatibility with python-2.6.x . Twisted-15.5.0
was the last release to offer 2.6 support, and subsequent releases actively
throw errors when run against 2.6, so we've turned off Foolscap's automated
testing for 2.6. It may remain compatible by accident for a while. (245)

0.13.2

NOTE: This is the last release to support Python-2.x. The Python3 porting
effort is underway, and the next release will only support Python3.

As the official end-of-life date for Python 2.7 is January 1st 2020, you have
nine days to use this release. Enjoy!

Other fixes:

Allow connection attempts to take up to 120s, since some connectors (Tor/I2P)
require spinning up a daemon and letting it connect to the network first.

Tolerate the latest Twisted and txtorcon dependencies.

The `flappserver --help` command now recommends the correct syntax for the
`--location` option (`tcp:example.org:3116` rather than `example.org:3116`).

0.13.1

This release adds a minor feature to "flappclient": it now pays attention to
a pair of environment variables named $FOOLSCAP_TOR_CONTROL_PORT and
$FOOLSCAP_TOR_SOCKS_PORT. If set, the client will install a connection
handler that routes "tor:" -type FURLs through a Tor daemon at the given
ports (both of which are endpoint descriptors, e.g. "tcp:localhost:9050").

To use this, install the "tor" extra, like "pip install foolscap[tor]". If
this extra was not installed (e.g. "txtorcon" is not importable), the
environment variables will be ignored.

This release also improves the reliability of the unit test suite
(specifically test_reconnector) on slower systems.

0.13.0

This release fixes compatibility with the latest Twisted-17.9.0 and changes
the way logfiles are encoded.

Foolscap's "flogtool" event-logging system can be configured to serialize log
events into "Incident Files". In previous versions, these were serialized
with the stdlib "pickle" module. However a recent change to Twisted's
"Failure" class made them unpickleable, causing Foolscap's unit test suite to
fail, and also affect applications which foolscap.logging.log.msg() with
Failures as arguments. And untrusted pickles were unsafe to load anyways.

This release replaces pickle with JSON, making it safe to use "flogtool"
utilities on untrusted incident files. All new incident files created by this
version will use JSON, and all tools (e.g. "flogtool dump") can only handle
JSON-based files. 247

This also resolves a problem with tox-2.9.0, which caused tests to not run at
all because nothing was installed into the test environment.

Page 1 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.