| 1 | [project] |
|---|
| 2 | name = "tahoe-lafs" |
|---|
| 3 | dynamic = ["version"] |
|---|
| 4 | description = "secure, decentralized, fault-tolerant file store" |
|---|
| 5 | readme = "README.rst" |
|---|
| 6 | requires-python = ">=3.9" |
|---|
| 7 | license = "GPL-2.0-or-later" # see README.rst -- there is an alternative licence |
|---|
| 8 | authors = [ |
|---|
| 9 | { name = "the Tahoe-LAFS project", email = "tahoe-dev@lists.tahoe-lafs.org" } |
|---|
| 10 | ] |
|---|
| 11 | #keywords = [ |
|---|
| 12 | # "privacy" |
|---|
| 13 | #] |
|---|
| 14 | classifiers = [ |
|---|
| 15 | "Development Status :: 5 - Production/Stable", |
|---|
| 16 | "Environment :: Console", |
|---|
| 17 | "Environment :: Web Environment", |
|---|
| 18 | "License :: OSI Approved :: GNU General Public License (GPL)", |
|---|
| 19 | "License :: DFSG approved", |
|---|
| 20 | "License :: Other/Proprietary License", |
|---|
| 21 | "Intended Audience :: Developers", |
|---|
| 22 | "Intended Audience :: End Users/Desktop", |
|---|
| 23 | "Intended Audience :: System Administrators", |
|---|
| 24 | "Operating System :: Microsoft", |
|---|
| 25 | "Operating System :: Microsoft :: Windows", |
|---|
| 26 | "Operating System :: Unix", |
|---|
| 27 | "Operating System :: POSIX :: Linux", |
|---|
| 28 | "Operating System :: POSIX", |
|---|
| 29 | "Operating System :: MacOS :: MacOS X", |
|---|
| 30 | "Operating System :: OS Independent", |
|---|
| 31 | "Natural Language :: English", |
|---|
| 32 | "Programming Language :: C", |
|---|
| 33 | "Programming Language :: Python", |
|---|
| 34 | "Programming Language :: Python :: 3", |
|---|
| 35 | "Programming Language :: Python :: 3.9", |
|---|
| 36 | "Programming Language :: Python :: 3.10", |
|---|
| 37 | "Programming Language :: Python :: 3.11", |
|---|
| 38 | "Programming Language :: Python :: 3.12", |
|---|
| 39 | "Topic :: Utilities", |
|---|
| 40 | "Topic :: System :: Systems Administration", |
|---|
| 41 | "Topic :: System :: Filesystems", |
|---|
| 42 | "Topic :: System :: Distributed Computing", |
|---|
| 43 | "Topic :: Software Development :: Libraries", |
|---|
| 44 | "Topic :: System :: Archiving :: Backup", |
|---|
| 45 | "Topic :: System :: Archiving :: Mirroring", |
|---|
| 46 | "Topic :: System :: Archiving", |
|---|
| 47 | ] |
|---|
| 48 | dependencies = [ |
|---|
| 49 | "zfec >= 1.1.0", |
|---|
| 50 | |
|---|
| 51 | # zope.interface >= 3.6.0 is required for Twisted >= 12.1.0. |
|---|
| 52 | "zope.interface >= 3.6.0", |
|---|
| 53 | |
|---|
| 54 | # * foolscap < 0.5.1 had a performance bug which spent O(N**2) CPU for |
|---|
| 55 | # transferring large mutable files of size N. |
|---|
| 56 | # * foolscap < 0.6 is incompatible with Twisted 10.2.0. |
|---|
| 57 | # * foolscap 0.6.1 quiets a DeprecationWarning. |
|---|
| 58 | # * foolscap < 0.6.3 is incompatible with Twisted 11.1.0 and newer. |
|---|
| 59 | # * foolscap 0.8.0 generates 2048-bit RSA-with-SHA-256 signatures, |
|---|
| 60 | # rather than 1024-bit RSA-with-MD5. This also allows us to work |
|---|
| 61 | # with a FIPS build of OpenSSL. |
|---|
| 62 | # * foolscap >= 0.12.3 provides tcp/tor/i2p connection handlers we need, |
|---|
| 63 | # and allocate_tcp_port |
|---|
| 64 | # * foolscap >= 0.12.5 has ConnectionInfo and ReconnectionInfo |
|---|
| 65 | # * foolscap >= 0.12.6 has an i2p.sam_endpoint() that takes kwargs |
|---|
| 66 | # * foolscap 0.13.2 drops i2p support completely |
|---|
| 67 | # * foolscap >= 21.7 is necessary for Python 3 with i2p support. |
|---|
| 68 | # * foolscap >= 23.3 is necessary for Python 3.11. |
|---|
| 69 | "foolscap >= 21.7.0", |
|---|
| 70 | "foolscap >= 23.3.0; python_version > '3.10'", |
|---|
| 71 | |
|---|
| 72 | # * cryptography 2.6 introduced some ed25519 APIs we rely on. Note that |
|---|
| 73 | # Twisted[conch] also depends on cryptography and Twisted[tls] |
|---|
| 74 | # transitively depends on cryptography. So it's anyone's guess what |
|---|
| 75 | # version of cryptography will *really* be installed. |
|---|
| 76 | "cryptography >= 2.6", |
|---|
| 77 | |
|---|
| 78 | # * Used for custom HTTPS validation |
|---|
| 79 | "pyOpenSSL >= 23.2.0", |
|---|
| 80 | |
|---|
| 81 | # * The SFTP frontend depends on Twisted 11.0.0 to fix the SSH server |
|---|
| 82 | # rekeying bug <https://twistedmatrix.com/trac/ticket/4395> |
|---|
| 83 | # * The SFTP frontend and manhole depend on the conch extra. However, we |
|---|
| 84 | # can't explicitly declare that without an undesirable dependency on gmpy, |
|---|
| 85 | # as explained in ticket #2740. |
|---|
| 86 | # * Due to a setuptools bug, we need to declare a dependency on the tls |
|---|
| 87 | # extra even though we only depend on it via foolscap. |
|---|
| 88 | # * Twisted >= 15.1.0 is the first version that provided the [tls] extra. |
|---|
| 89 | # * Twisted-16.1.0 fixes https://twistedmatrix.com/trac/ticket/8223, |
|---|
| 90 | # which otherwise causes test_system to fail (DirtyReactorError, due to |
|---|
| 91 | # leftover timers) |
|---|
| 92 | # * Twisted-16.4.0 introduces `python -m twisted.trial` which is needed |
|---|
| 93 | # for coverage testing |
|---|
| 94 | # * Twisted 16.6.0 drops the undesirable gmpy dependency from the conch |
|---|
| 95 | # extra, letting us use that extra instead of trying to duplicate its |
|---|
| 96 | # dependencies here. Twisted[conch] >18.7 introduces a dependency on |
|---|
| 97 | # bcrypt. It is nice to avoid that if the user ends up with an older |
|---|
| 98 | # version of Twisted. That's hard to express except by using the extra. |
|---|
| 99 | # |
|---|
| 100 | # * Twisted 18.4.0 adds `client` and `host` attributes to `Request` in the |
|---|
| 101 | # * initializer, needed by logic in our custom `Request` subclass. |
|---|
| 102 | # |
|---|
| 103 | # In a perfect world, Twisted[conch] would be a dependency of an "sftp" |
|---|
| 104 | # extra. However, pip fails to resolve the dependencies all |
|---|
| 105 | # dependencies when asked for Twisted[tls] *and* Twisted[conch]. |
|---|
| 106 | # Specifically, "Twisted[conch]" (as the later requirement) is ignored. |
|---|
| 107 | # If there were an Tahoe-LAFS sftp extra that dependended on |
|---|
| 108 | # Twisted[conch] and install_requires only included Twisted[tls] then |
|---|
| 109 | # `pip install tahoe-lafs[sftp]` would not install requirements |
|---|
| 110 | # specified by Twisted[conch]. Since this would be the *whole point* of |
|---|
| 111 | # an sftp extra in Tahoe-LAFS, there is no point in having one. |
|---|
| 112 | # * Twisted 19.10 introduces Site.getContentFile which we use to get |
|---|
| 113 | # temporary upload files placed into a per-node temporary directory. |
|---|
| 114 | # * Twisted 22.8.0 added support for coroutine-returning functions in many |
|---|
| 115 | # places (mainly via `maybeDeferred`) |
|---|
| 116 | "Twisted[tls,conch] >= 22.8.0", |
|---|
| 117 | |
|---|
| 118 | "PyYAML >= 3.11", |
|---|
| 119 | |
|---|
| 120 | # to be slowly removed from codebase |
|---|
| 121 | "six >= 1.10.0", |
|---|
| 122 | |
|---|
| 123 | # For 'tahoe invite' and 'tahoe join' |
|---|
| 124 | "magic-wormhole >= 0.10.2", |
|---|
| 125 | |
|---|
| 126 | # We want a new enough version to support custom JSON encoders. |
|---|
| 127 | "eliot >= 1.14.0", |
|---|
| 128 | |
|---|
| 129 | "pyrsistent", |
|---|
| 130 | |
|---|
| 131 | # A great way to define types of values. |
|---|
| 132 | "attrs >= 20.1.0", |
|---|
| 133 | |
|---|
| 134 | # WebSocket library for twisted and asyncio |
|---|
| 135 | "autobahn >= 22.4.3", |
|---|
| 136 | |
|---|
| 137 | # Discover local network configuration |
|---|
| 138 | "netifaces", |
|---|
| 139 | |
|---|
| 140 | # Utility code: |
|---|
| 141 | "pyutil >= 3.3.0", |
|---|
| 142 | |
|---|
| 143 | # Linux distribution detection: |
|---|
| 144 | "distro >= 1.4.0", |
|---|
| 145 | |
|---|
| 146 | # For the RangeMap datastructure. Need 2.0.2 at least for bugfixes. |
|---|
| 147 | "collections-extended >= 2.0.2", |
|---|
| 148 | |
|---|
| 149 | # HTTP server and client |
|---|
| 150 | # Latest version is necessary to work with latest werkzeug: |
|---|
| 151 | "klein >= 23.5.0", |
|---|
| 152 | # 2.2.0 has a bug: https://github.com/pallets/werkzeug/issues/2465 |
|---|
| 153 | "werkzeug != 2.2.0", |
|---|
| 154 | "treq", |
|---|
| 155 | # 5.6.0 excluded because https://github.com/agronholm/cbor2/issues/208 |
|---|
| 156 | "cbor2 != 5.6.0", |
|---|
| 157 | |
|---|
| 158 | # 0.6 adds the ability to decode CBOR. 0.6.1 fixes PyPy. |
|---|
| 159 | "pycddl >= 0.6.1", |
|---|
| 160 | |
|---|
| 161 | # Command-line parsing |
|---|
| 162 | "click >= 8.1.1", |
|---|
| 163 | |
|---|
| 164 | # for pid-file support |
|---|
| 165 | "psutil", |
|---|
| 166 | "filelock", |
|---|
| 167 | |
|---|
| 168 | # Duplicate the Twisted pywin32 dependency here. See |
|---|
| 169 | # https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2392 for some |
|---|
| 170 | # discussion. |
|---|
| 171 | "pywin32 != 226;sys_platform=='win32'", |
|---|
| 172 | |
|---|
| 173 | # Python 3.13 removed CGI from the standard library. |
|---|
| 174 | "legacy-cgi; python_version >= '3.13'", |
|---|
| 175 | ] |
|---|
| 176 | |
|---|
| 177 | |
|---|
| 178 | [project.scripts] |
|---|
| 179 | tahoe = "allmydata.scripts.runner:run" |
|---|
| 180 | grid-manager = "allmydata.cli.grid_manager:grid_manager" |
|---|
| 181 | |
|---|
| 182 | |
|---|
| 183 | [project.urls] |
|---|
| 184 | Homepage = "https://tahoe-lafs.org/" |
|---|
| 185 | Documentation = "https://tahoe-lafs.readthedocs.org/" |
|---|
| 186 | "Source code" = "https://github.com/tahoe-lafs/tahoe-lafs/" |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | [project.optional-dependencies] |
|---|
| 190 | tor = [ |
|---|
| 191 | # 23.5 added support for custom TLS contexts in web_agent(), which is |
|---|
| 192 | # needed for the HTTP storage client to run over Tor. |
|---|
| 193 | "txtorcon >= 23.5.0", |
|---|
| 194 | ] |
|---|
| 195 | i2p = [ |
|---|
| 196 | # txi2p has Python 3 support in master branch, but it has not been |
|---|
| 197 | # released -- see https://github.com/str4d/txi2p/issues/10. We |
|---|
| 198 | # could use a fork for Python 3 until txi2p's maintainers are back |
|---|
| 199 | # in action. For Python 2, we could continue using the txi2p |
|---|
| 200 | # version about which no one has complained to us so far. |
|---|
| 201 | "txi2p; python_version < '3.0'", |
|---|
| 202 | "txi2p-tahoe >= 0.3.5; python_version > '3.0'", |
|---|
| 203 | ] |
|---|
| 204 | build = [ |
|---|
| 205 | "dulwich", |
|---|
| 206 | "gpg", |
|---|
| 207 | "hatchling", |
|---|
| 208 | "hatch-vcs" |
|---|
| 209 | ] |
|---|
| 210 | |
|---|
| 211 | testenv = [ |
|---|
| 212 | # Pin all of these versions for the same reason you ever want to |
|---|
| 213 | # pin anything: to prevent new releases with regressions from |
|---|
| 214 | # introducing spurious failures into CI runs for whatever |
|---|
| 215 | # development work is happening at the time. The versions |
|---|
| 216 | # selected here are just the current versions at the time. |
|---|
| 217 | # Bumping them to keep up with future releases is fine as long |
|---|
| 218 | # as those releases are known to actually work. |
|---|
| 219 | "pip==23.3.1", |
|---|
| 220 | "wheel==0.41.3", |
|---|
| 221 | "subunitreporter==23.8.0", |
|---|
| 222 | "python-subunit==1.4.2", |
|---|
| 223 | "junitxml==0.7", |
|---|
| 224 | "coverage==7.2.5", |
|---|
| 225 | ] |
|---|
| 226 | |
|---|
| 227 | # Here are the library dependencies of the test suite. |
|---|
| 228 | test = [ |
|---|
| 229 | "mock", |
|---|
| 230 | "tox", |
|---|
| 231 | "pytest", |
|---|
| 232 | "pytest-twisted", |
|---|
| 233 | "tox >= 4.0.0", |
|---|
| 234 | "hypothesis >= 3.6.1", |
|---|
| 235 | "towncrier", |
|---|
| 236 | "testtools", |
|---|
| 237 | "fixtures", |
|---|
| 238 | "beautifulsoup4", |
|---|
| 239 | "html5lib", |
|---|
| 240 | # Pin old version until |
|---|
| 241 | # https://github.com/paramiko/paramiko/issues/1961 is fixed. |
|---|
| 242 | "paramiko < 2.9", |
|---|
| 243 | "pytest-timeout", |
|---|
| 244 | # Does our OpenMetrics endpoint adhere to the spec: |
|---|
| 245 | "prometheus-client == 0.11.0", |
|---|
| 246 | |
|---|
| 247 | "tahoe-lafs[tor]", # our own "tor" extra |
|---|
| 248 | "tahoe-lafs[i2p]", # our own "i2p" extra |
|---|
| 249 | # Chutney with recent additions to make it a Python package: |
|---|
| 250 | "chutney @ git+https://gitlab.torproject.org/tpo/core/chutney@f25094db31fbbec7e88ae5801dd2dcf2d6d9ae5d" |
|---|
| 251 | ] |
|---|
| 252 | |
|---|
| 253 | |
|---|
| 254 | |
|---|
| 255 | |
|---|
| 256 | [tool.hatch.version] |
|---|
| 257 | source = "vcs" |
|---|
| 258 | tag-pattern = "tahoe-lafs-(.*)" |
|---|
| 259 | |
|---|
| 260 | [tool.hatch.build.hooks.vcs] |
|---|
| 261 | version-file = "src/allmydata/_version.py" |
|---|
| 262 | |
|---|
| 263 | |
|---|
| 264 | [build-system] |
|---|
| 265 | requires = ["hatchling", "hatch-vcs"] |
|---|
| 266 | build-backend = "hatchling.build" |
|---|
| 267 | |
|---|
| 268 | # https://github.com/ofek/hatch-vcs/issues/35#issuecomment-1452025896 |
|---|
| 269 | [tool.hatch.build] |
|---|
| 270 | include = [ |
|---|
| 271 | "src/", |
|---|
| 272 | "COPYING.GPL", |
|---|
| 273 | "COPYING.TGPPL.rst", |
|---|
| 274 | "CREDITS", |
|---|
| 275 | "Makefile", |
|---|
| 276 | "NEWS.rst", |
|---|
| 277 | "Tahoe.home", |
|---|
| 278 | "relnotes.txt", |
|---|
| 279 | "Dockerfile", |
|---|
| 280 | "tox.ini", |
|---|
| 281 | ".appveyor.yml", |
|---|
| 282 | ".travis.yml", |
|---|
| 283 | ".coveragerc", |
|---|
| 284 | "*.xhtml", |
|---|
| 285 | "*.png", |
|---|
| 286 | "*.css", |
|---|
| 287 | "*.svg", |
|---|
| 288 | "docs/", |
|---|
| 289 | "misc/", |
|---|
| 290 | "static/", |
|---|
| 291 | "integration/", |
|---|
| 292 | "src/allmydata/test/data/*.txt", |
|---|
| 293 | "src/allmydata/test/data/*.yaml" |
|---|
| 294 | ] |
|---|
| 295 | exclude = [ |
|---|
| 296 | "*~", |
|---|
| 297 | "*.pyc", |
|---|
| 298 | "#*#", |
|---|
| 299 | "venv*/", |
|---|
| 300 | ".tox/" |
|---|
| 301 | ] |
|---|
| 302 | |
|---|
| 303 | [tool.hatch.build.targets.wheel] |
|---|
| 304 | packages = ["src/allmydata"] |
|---|
| 305 | |
|---|
| 306 | [tool.hatch.metadata] |
|---|
| 307 | allow-direct-references = true |
|---|
| 308 | |
|---|