Changeset c09fee64 in trunk


Ignore:
Timestamp:
2021-07-25T14:03:11Z (4 years ago)
Author:
Sajith Sasidharan <sajith@…>
Branches:
master
Children:
0e58f0c
Parents:
0f7e37d (diff), 6a91a10 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into 3636.doc-toc-reorg

Files:
25 added
5 deleted
20 edited
3 moved

Legend:

Unmodified
Added
Removed
  • TabularUnified .github/workflows/ci.yml

    r0f7e37d rc09fee64  
    2020        os:
    2121          - windows-latest
    22           - macos-latest
    2322          - ubuntu-latest
    2423        python-version:
     
    2827          - 3.8
    2928          - 3.9
     29        include:
     30          # On macOS don't bother with 3.6-3.8, just to get faster builds.
     31          - os: macos-latest
     32            python-version: 2.7
     33          - os: macos-latest
     34            python-version: 3.9
    3035
    3136    steps:
     
    3843
    3944      - name: Set up Python ${{ matrix.python-version }}
    40         if: ${{ matrix.os != 'windows-latest' }}
    4145        uses: actions/setup-python@v2
    4246        with:
    4347          python-version: ${{ matrix.python-version }}
    44 
    45       # See note below about need for using 32-bit Python 2.7 on
    46       # Windows.
    47       - name: Set up Python ${{ matrix.python-version }} [Windows x64]
    48         if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version != '2.7' ) }}
    49         uses: actions/setup-python@v2
    50         with:
    51           python-version: ${{ matrix.python-version }}
    52           architecture: 'x64'
    53 
    54       # We use netifaces, which does not ship a 64-bit wheel for the
    55       # Python 2.7 + Windows combination, but it ships a 32-bit wheel.
    56       # Since MS has removed vcpython27 compiler downloads from their
    57       # usual download site, building a netifaces wheel locally is not
    58       # an option anymore.  So let us just test with 32-bit Python on
    59       # Windows.
    60       - name: Set up Python ${{ matrix.python-version }} [Windows x86]
    61         if: ${{ ( matrix.os == 'windows-latest' ) && ( matrix.python-version == '2.7' ) }}
    62         uses: actions/setup-python@v1
    63         with:
    64           python-version: ${{ matrix.python-version }}
    65           architecture: 'x86'
    6648
    6749      # To use pip caching with GitHub Actions in an OS-independent
     
    174156      matrix:
    175157        os:
    176           - macos-latest
    177158          - windows-latest
     159          - ubuntu-latest
    178160        python-version:
    179161          - 2.7
     162          - 3.6
     163          - 3.9
    180164        include:
    181           - os: ubuntu-latest
    182             python-version: 3.6
     165          # On macOS don't bother with 3.6, just to get faster builds.
     166          - os: macos-latest
     167            python-version: 2.7
     168          - os: macos-latest
     169            python-version: 3.9
    183170
    184171    steps:
     
    187174        if: matrix.os == 'ubuntu-latest'
    188175        run: sudo apt install tor
    189 
    190       - name: Install Tor [macOS]
    191         if: matrix.os == 'macos-latest'
    192         run: brew install tor
     176       
     177      # TODO: See https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3744.
     178      # We have to use an older version of Tor for running integration
     179      # tests on macOS.
     180      - name: Install Tor [macOS, ${{ matrix.python-version }} ]
     181        if: ${{ matrix.os == 'macos-latest' }}
     182        run: |
     183          brew extract --version 0.4.5.8 tor homebrew/cask
     184          brew install tor@0.4.5.8
     185          brew link --overwrite tor@0.4.5.8
    193186
    194187      - name: Install Tor [Windows]
     
    204197
    205198      - name: Set up Python ${{ matrix.python-version }}
    206         if: ${{ matrix.os != 'windows-latest' }}
    207199        uses: actions/setup-python@v1
    208200        with:
    209201          python-version: ${{ matrix.python-version }}
    210 
    211       # See this step under coverage job.
    212       - name: Set up Python ${{ matrix.python-version }} [Windows x86]
    213         if: ${{ matrix.os == 'windows-latest' }}
    214         uses: actions/setup-python@v1
    215         with:
    216           python-version: ${{ matrix.python-version }}
    217           architecture: 'x86'
    218202
    219203      - name: Get pip cache directory
     
    273257
    274258      - name: Set up Python ${{ matrix.python-version }}
    275         if: ${{ matrix.os != 'windows-latest' }}
    276259        uses: actions/setup-python@v1
    277260        with:
    278261          python-version: ${{ matrix.python-version }}
    279 
    280       # See this step under coverage job.
    281       - name: Set up Python ${{ matrix.python-version }} [Windows x86]
    282         if: ${{ matrix.os == 'windows-latest' }}
    283         uses: actions/setup-python@v1
    284         with:
    285           python-version: ${{ matrix.python-version }}
    286           architecture: 'x86'
    287262
    288263      - name: Get pip cache directory
  • TabularUnified docs/Installation/install-on-desert-island.rst

    r0f7e37d rc09fee64  
    1 ******************************************
    2 How To Build Tahoe-LAFS On A Desert Island
    3 ******************************************
     1***************************************
     2Building Tahoe-LAFS On A Desert Island
     3***************************************
    44
    55(or an airplane, or anywhere else without internet connectivity)
  • TabularUnified docs/about-tahoe.rst

    r0f7e37d rc09fee64  
    128128===========
    129129
    130 To use Tahoe-LAFS, please see :doc:`INSTALL`.
     130To use Tahoe-LAFS, please see :doc:`Installing Tahoe-LAFS <../Installation/install-tahoe>`.
    131131
    132132License
  • TabularUnified docs/index.rst

    r0f7e37d rc09fee64  
    2323
    2424   INSTALL
     25
     26   about-tahoe
     27   Installation/install-tahoe
     28   Installation/install-on-windows
     29   Installation/install-on-linux
     30   Installation/install-on-desert-island
     31
    2532   running
    2633   configuration
     
    5158   logging
    5259   stats
     60   debian
     61   build/build-pyOpenSSL
    5362
    5463.. toctree::
  • TabularUnified docs/release-checklist.rst

    r0f7e37d rc09fee64  
    7171
    7272- update "docs/known_issues.rst" if appropriate
    73 - update "docs/INSTALL.rst" references to the new release
     73- update "docs/Installation/install-tahoe.rst" references to the new release
    7474- Push the branch to github
    7575- Create a (draft) PR; this should trigger CI (note that github
  • TabularUnified docs/running.rst

    r0f7e37d rc09fee64  
    1111This is how to run a Tahoe-LAFS client or a complete Tahoe-LAFS grid.
    1212First you have to install the Tahoe-LAFS software, as documented in
    13 :doc:`INSTALL`.
     13:doc:`Installing Tahoe-LAFS <../Installation/install-tahoe>`.
    1414
    1515The ``tahoe`` program in your virtualenv's ``bin`` directory is used to
  • TabularUnified misc/coding_tools/check-debugging.py

    r0f7e37d rc09fee64  
    11#! /usr/bin/python
    22
    3 # ./check-debugging.py src
     3"""
     4Checks for defer.setDebugging().
     5
     6Runs on Python 3.
     7
     8Usage: ./check-debugging.py src
     9"""
    410
    511from __future__ import print_function
     
    814
    915ok = True
    10 umids = {}
    1116
    1217for starting_point in sys.argv[1:]:
  • TabularUnified misc/coding_tools/check-umids.py

    r0f7e37d rc09fee64  
    1 #! /usr/bin/python
     1#! /usr/bin/python3
     2
     3"""
     4Ensure UMIDS are unique.
     5
     6This runs on Python 3.
     7"""
    28
    39# ./check-umids.py src
  • TabularUnified misc/operations_helpers/cpu-watcher.tac

    r0f7e37d rc09fee64  
    202202                log.err()
    203203        try:
    204             pickle.dump(self.history, open("history.pickle.tmp", "wb"))
     204            # Newer protocols won't work in Python 2; when it is dropped,
     205            # protocol v4 can be used (added in Python 3.4).
     206            pickle.dump(self.history, open("history.pickle.tmp", "wb"), protocol=2)
    205207            os.rename("history.pickle.tmp", "history.pickle")
    206208        except:
  • TabularUnified setup.py

    r0f7e37d rc09fee64  
    5555    # * foolscap >= 0.12.6 has an i2p.sam_endpoint() that takes kwargs
    5656    # * foolscap 0.13.2 drops i2p support completely
    57     # * foolscap >= 20.4 is necessary for Python 3
     57    # * foolscap >= 21.7 is necessary for Python 3 with i2p support.
    5858    "foolscap == 0.13.1 ; python_version < '3.0'",
    59     "foolscap >= 20.4.0 ; python_version > '3.0'",
     59    "foolscap >= 21.7.0 ; python_version > '3.0'",
    6060
    6161    # * cryptography 2.6 introduced some ed25519 APIs we rely on.  Note that
     
    115115    # Pyrsistent 0.17.0 (which we use by way of Eliot) has dropped
    116116    # Python 2 entirely; stick to the version known to work for us.
    117     # XXX: drop this bound: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3404
    118     "pyrsistent < 0.17.0",
     117    "pyrsistent < 0.17.0 ; python_version < '3.0'",
     118    "pyrsistent ; python_version > '3.0'",
    119119
    120120    # A great way to define types of values.
    121     # XXX: drop the upper bound: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3390
    122     "attrs >= 18.2.0, < 20",
     121    "attrs >= 18.2.0",
    123122
    124123    # WebSocket library for twisted and asyncio
  • TabularUnified src/allmydata/frontends/auth.py

    r0f7e37d rc09fee64  
     1"""
     2Authentication for frontends.
     3"""
     4from __future__ import unicode_literals
     5from __future__ import absolute_import
     6from __future__ import division
     7from __future__ import print_function
     8
     9from future.utils import PY2
     10if PY2:
     11    from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min  # noqa: F401
     12
    113from zope.interface import implementer
    214from twisted.internet import defer
  • TabularUnified src/allmydata/scripts/common_http.py

    r0f7e37d rc09fee64  
    9595
    9696def format_http_success(resp):
    97     return "%s %s" % (resp.status, quote_output(resp.reason, quotemarks=False))
     97    # ensure_text() shouldn't be necessary when Python 2 is dropped.
     98    return quote_output(
     99        "%s %s" % (resp.status, six.ensure_text(resp.reason)),
     100        quotemarks=False)
    98101
    99102def format_http_error(msg, resp):
    100     return "%s: %s %s\n%s" % (msg, resp.status, quote_output(resp.reason, quotemarks=False),
    101                               quote_output(resp.read(), quotemarks=False))
     103    # ensure_text() shouldn't be necessary when Python 2 is dropped.
     104    return quote_output(
     105        "%s: %s %s\n%s" % (msg, resp.status, six.ensure_text(resp.reason),
     106                           six.ensure_text(resp.read())),
     107        quotemarks=False)
    102108
    103109def check_http_error(resp, stderr):
  • TabularUnified src/allmydata/scripts/runner.py

    r0f7e37d rc09fee64  
    205205    # can we put this _setup_coverage call after we hit
    206206    # argument-parsing?
    207     if '--coverage' not in sys.argv:
     207    # ensure_str() only necessary on Python 2.
     208    if six.ensure_str('--coverage') not in sys.argv:
    208209        return
    209210    sys.argv.remove('--coverage')
  • TabularUnified src/allmydata/storage/crawler.py

    r0f7e37d rc09fee64  
    253253        tmpfile = self.statefile + ".tmp"
    254254        with open(tmpfile, "wb") as f:
    255             pickle.dump(self.state, f)
     255            # Newer protocols won't work in Python 2; when it is dropped,
     256            # protocol v4 can be used (added in Python 3.4).
     257            pickle.dump(self.state, f, protocol=2)
    256258        fileutil.move_into_place(tmpfile, self.statefile)
    257259
  • TabularUnified src/allmydata/storage/expirer.py

    r0f7e37d rc09fee64  
    9696            history = {} # cyclenum -> dict
    9797            with open(self.historyfile, "wb") as f:
    98                 pickle.dump(history, f)
     98                # Newer protocols won't work in Python 2; when it is dropped,
     99                # protocol v4 can be used (added in Python 3.4).
     100                pickle.dump(history, f, protocol=2)
    99101
    100102    def create_empty_cycle_dict(self):
     
    320322            del history[oldcycles[0]]
    321323        with open(self.historyfile, "wb") as f:
    322             pickle.dump(history, f)
     324            # Newer protocols won't work in Python 2; when it is dropped,
     325            # protocol v4 can be used (added in Python 3.4).
     326            pickle.dump(history, f, protocol=2)
    323327
    324328    def get_state(self):
  • TabularUnified src/allmydata/test/cli/test_cp.py

    r0f7e37d rc09fee64  
    5454
    5555        d.addCallback(lambda res: self.do_cli("get", "tahoe:" + artonwall_arg))
     56        d.addCallback(lambda rc_out_err: self.assertEqual(rc_out_err[1], DATA1))
     57
     58        # Version where destination filename is explicitly Unicode too.
     59        d.addCallback(lambda res: self.do_cli("cp", fn1, "tahoe:" + artonwall_arg + "-2"))
     60        d.addCallback(lambda res: self.do_cli("get", "tahoe:" + artonwall_arg + "-2"))
    5661        d.addCallback(lambda rc_out_err: self.assertEqual(rc_out_err[1], DATA1))
    5762
     
    7580                if PY2:
    7681                    out = out.decode(get_io_encoding())
    77                 self.failUnlessReallyEqual(out, u"Metallica\n\u00C4rtonwall\n")
     82                self.failUnlessReallyEqual(out, u"Metallica\n\u00C4rtonwall\n\u00C4rtonwall-2\n")
    7883                self.assertEqual(len(err), 0, err)
    7984        d.addCallback(_check)
  • TabularUnified src/allmydata/test/test_auth.py

    r0f7e37d rc09fee64  
    4040
    4141DUMMY_ACCOUNTS = u"""\
    42 alice password URI:DIR2:aaaaaaaaaaaaaaaaaaaaaaaaaa:1111111111111111111111111111111111111111111111111111
     42alice herpassword URI:DIR2:aaaaaaaaaaaaaaaaaaaaaaaaaa:1111111111111111111111111111111111111111111111111111
    4343bob sekrit URI:DIR2:bbbbbbbbbbbbbbbbbbbbbbbbbb:2222222222222222222222222222222222222222222222222222
     44
     45# dennis password URI:DIR2:aaaaaaaaaaaaaaaaaaaaaaaaaa:1111111111111111111111111111111111111111111111111111
    4446carol {key} URI:DIR2:cccccccccccccccccccccccccc:3333333333333333333333333333333333333333333333333333
    4547""".format(key=str(DUMMY_KEY.public().toString("openssh"), "ascii")).encode("ascii")
     
    5557        self.checker = auth.AccountFileChecker(None, abspath)
    5658
    57     def test_unknown_user(self):
     59    def test_unknown_user_ssh(self):
    5860        """
    5961        AccountFileChecker.requestAvatarId returns a Deferred that fires with
     
    6567        avatarId = self.checker.requestAvatarId(key_credentials)
    6668        return self.assertFailure(avatarId, error.UnauthorizedLogin)
     69
     70    def test_unknown_user_password(self):
     71        """
     72        AccountFileChecker.requestAvatarId returns a Deferred that fires with
     73        UnauthorizedLogin if called with an SSHPrivateKey object with a
     74        username not present in the account file.
     75
     76        We use a commented out user, so we're also checking that comments are
     77        skipped.
     78        """
     79        key_credentials = credentials.UsernamePassword(b"dennis", b"password")
     80        d = self.checker.requestAvatarId(key_credentials)
     81        return self.assertFailure(d, error.UnauthorizedLogin)
    6782
    6883    def test_password_auth_user_with_ssh_key(self):
     
    8297        the user if the correct password is given.
    8398        """
    84         key_credentials = credentials.UsernamePassword(b"alice", b"password")
     99        key_credentials = credentials.UsernamePassword(b"alice", b"herpassword")
     100        d = self.checker.requestAvatarId(key_credentials)
     101        def authenticated(avatarId):
     102            self.assertEqual(
     103                (b"alice",
     104                 b"URI:DIR2:aaaaaaaaaaaaaaaaaaaaaaaaaa:1111111111111111111111111111111111111111111111111111"),
     105                (avatarId.username, avatarId.rootcap))
     106        return d
     107
     108    def test_password_auth_user_with_correct_hashed_password(self):
     109        """
     110        AccountFileChecker.requestAvatarId returns a Deferred that fires with
     111        the user if the correct password is given in hashed form.
     112        """
     113        key_credentials = credentials.UsernameHashedPassword(b"alice", b"herpassword")
    85114        d = self.checker.requestAvatarId(key_credentials)
    86115        def authenticated(avatarId):
  • TabularUnified src/allmydata/util/_python3.py

    r0f7e37d rc09fee64  
    5353    "allmydata.dirnode",
    5454    "allmydata.frontends",
     55    "allmydata.frontends.auth",
    5556    "allmydata.frontends.sftpd",
    5657    "allmydata.hashtree",
  • TabularUnified src/allmydata/util/jsonbytes.py

    r0f7e37d rc09fee64  
    2929
    3030
    31 def _bytes_to_unicode(any_bytes, obj):
    32     """Create a function that recursively converts bytes to unicode.
     31def bytes_to_unicode(any_bytes, obj):
     32    """Convert bytes to unicode.
    3333
    3434    :param any_bytes: If True, also support non-UTF-8-encoded bytes.
     
    6464    def encode(self, o, **kwargs):
    6565        return json.JSONEncoder.encode(
    66             self, _bytes_to_unicode(False, o), **kwargs)
     66            self, bytes_to_unicode(False, o), **kwargs)
    6767
    6868    def iterencode(self, o, **kwargs):
    6969        return json.JSONEncoder.iterencode(
    70             self, _bytes_to_unicode(False, o), **kwargs)
     70            self, bytes_to_unicode(False, o), **kwargs)
    7171
    7272
     
    8080    def encode(self, o, **kwargs):
    8181        return json.JSONEncoder.encode(
    82             self, _bytes_to_unicode(True, o), **kwargs)
     82            self, bytes_to_unicode(True, o), **kwargs)
    8383
    8484    def iterencode(self, o, **kwargs):
    8585        return json.JSONEncoder.iterencode(
    86             self, _bytes_to_unicode(True, o), **kwargs)
     86            self, bytes_to_unicode(True, o), **kwargs)
    8787
    8888
  • TabularUnified src/allmydata/util/log.py

    r0f7e37d rc09fee64  
    1919from twisted.python import log as tw_log
    2020
     21if PY2:
     22    def bytes_to_unicode(ign, obj):
     23        return obj
     24else:
     25    # We want to convert bytes keys to Unicode, otherwise JSON serialization
     26    # inside foolscap will fail (for details see
     27    # https://github.com/warner/foolscap/issues/88)
     28    from .jsonbytes import bytes_to_unicode
     29
     30
    2131NOISY = log.NOISY # 10
    2232OPERATIONAL = log.OPERATIONAL # 20
     
    2939
    3040
    31 msg = log.msg
     41def msg(*args, **kwargs):
     42    return log.msg(*args, **bytes_to_unicode(True, kwargs))
    3243
    3344# If log.err() happens during a unit test, the unit test should fail. We
     
    4051    if 'level' not in kwargs:
    4152        kwargs['level'] = log.UNUSUAL
    42     return log.err(failure, _why, **kwargs)
     53    return log.err(failure, _why, **bytes_to_unicode(True, kwargs))
    4354
    4455class LogMixin(object):
     
    5869                pmsgid = self._grandparentmsgid
    5970        kwargs = {ensure_str(k): v for (k, v) in kwargs.items()}
    60         msgid = log.msg(msg, facility=facility, parent=pmsgid, *args, **kwargs)
     71        msgid = log.msg(msg, facility=facility, parent=pmsgid, *args,
     72                        **bytes_to_unicode(True, kwargs))
    6173        if self._parentmsgid is None:
    6274            self._parentmsgid = msgid
  • TabularUnified src/allmydata/web/common.py

    r0f7e37d rc09fee64  
    9191from allmydata.util.encodingutil import (
    9292    quote_output,
     93    quote_output_u,
    9394    to_bytes,
    9495)
     
    325326                "to not replace it.", http.CONFLICT)
    326327    if isinstance(exc, NoSuchChildError):
    327         quoted_name = quote_output(exc.args[0], encoding="utf-8", quotemarks=False)
     328        quoted_name = quote_output_u(exc.args[0], quotemarks=False)
    328329        return ("No such child: %s" % quoted_name, http.NOT_FOUND)
    329330    if isinstance(exc, NotEnoughSharesError):
  • TabularUnified tox.ini

    r0f7e37d rc09fee64  
    105105         python --version
    106106         # NOTE: 'run with "py.test --keep-tempdir -s -v integration/" to debug failures'
    107          python3 -b -m pytest --timeout=1800 --coverage -v {posargs:integration}
     107         py.test --timeout=1800 --coverage -v {posargs:integration}
    108108         coverage combine
    109109         coverage report
    110110
    111111
     112# Once 2.7 is dropped, this can be removed. It just does flake8 with Python 2
     113# since that can give different results than flake8 on Python 3.
    112114[testenv:codechecks]
    113115basepython = python2.7
    114 # On macOS, git inside of towncrier needs $HOME.
    115 passenv = HOME
    116 whitelist_externals =
    117          /bin/mv
    118116setenv =
    119117         # Workaround an error when towncrier is run under the VCS hook,
     
    129127commands =
    130128         flake8 {posargs:{env:DEFAULT_FILES}}
     129
     130
     131[testenv:codechecks3]
     132basepython = python3
     133deps =
     134     # Newer versions of PyLint have buggy configuration
     135     # (https://github.com/PyCQA/pylint/issues/4574), so stick to old version
     136     # for now.
     137     pylint < 2.5
     138# On macOS, git inside of towncrier needs $HOME.
     139passenv = HOME
     140setenv =
     141         # If no positional arguments are given, try to run the checks on the
     142         # entire codebase, including various pieces of supporting code.
     143         DEFAULT_FILES=src integration static misc setup.py
     144commands =
     145         flake8 {posargs:{env:DEFAULT_FILES}}
    131146         python misc/coding_tools/check-umids.py {posargs:{env:DEFAULT_FILES}}
    132147         python misc/coding_tools/check-debugging.py {posargs:{env:DEFAULT_FILES}}
    133148         python misc/coding_tools/find-trailing-spaces.py -r {posargs:{env:DEFAULT_FILES}}
    134          python misc/coding_tools/check-miscaptures.py {posargs:{env:DEFAULT_FILES}}
     149         # PyLint has other useful checks, might want to enable them:
     150         # http://pylint.pycqa.org/en/latest/technical_reference/features.html
     151         pylint --disable=all --enable=cell-var-from-loop {posargs:{env:DEFAULT_FILES}}
    135152
    136153         # If towncrier.check fails, you forgot to add a towncrier news
    137154         # fragment explaining the change in this branch.  Create one at
    138155         # `newsfragments/<ticket>.<change type>` with some text for the news
    139          # file.  See towncrier.pyproject.toml for legal <change type> values.
    140          python -m towncrier.check --config towncrier.pyproject.toml
    141 
    142 
    143 [testenv:codechecks3]
    144 basepython = python3
    145 setenv =
    146          # If no positional arguments are given, try to run the checks on the
    147          # entire codebase, including various pieces of supporting code.
    148          DEFAULT_FILES=src integration static misc setup.py
    149 commands =
    150          flake8 {posargs:{env:DEFAULT_FILES}}
     156         # file.  See towncrier.toml for legal <change type> values.
     157         python -m towncrier.check --config towncrier.toml
    151158
    152159
     
    156163deps =
    157164    mypy
    158     git+https://github.com/Shoobx/mypy-zope
     165    mypy-zope
     166    types-mock
     167    types-six
     168    types-PyYAML
     169    types-pkg_resources
    159170    git+https://github.com/warner/foolscap
    160171    # Twisted 21.2.0 introduces some type hints which we are not yet
     
    167178[testenv:draftnews]
    168179passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH
    169 # see comment in [testenv] about "certifi"
    170 whitelist_externals = mv
    171 deps =
    172      certifi
    173      towncrier >= 19.2
    174 commands =
    175          # With pip >= 10 the existence of pyproject.toml (which we are
    176          # required to have to configure towncrier) triggers a "build
    177          # isolation" mode which prevents anything from working.  Avoid
    178          # triggering that pip behavior by keeping the towncrier configuration
    179          # somewhere else and only bringing it in when it's actually needed
    180          # (after pip is done).
    181          #
    182          # Some discussion is available at
    183          # https://github.com/pypa/pip/issues/5696
    184          #
    185          # towncrier post 19.2 (unreleased as of this writing) adds a --config
    186          # option that can be used instead of this file shuffling.
    187          mv towncrier.pyproject.toml pyproject.toml
    188 
    189          # towncrier 19.2 + works with python2.7
    190          python -m towncrier --draft
    191 
    192          # put it back
    193          mv pyproject.toml towncrier.pyproject.toml
     180deps =
     181    # see comment in [testenv] about "certifi"
     182    certifi
     183    towncrier==21.3.0
     184commands =
     185    python -m towncrier --draft --config towncrier.toml
    194186
    195187[testenv:news]
    196 passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH
    197 # see comment in [testenv] about "certifi"
    198 whitelist_externals = mv
    199 deps =
    200      certifi
    201      towncrier >= 19.2
    202 commands =
    203          # With pip >= 10 the existence of pyproject.toml (which we are
    204          # required to have to configure towncrier) triggers a "build
    205          # isolation" mode which prevents anything from working.  Avoid
    206          # triggering that pip behavior by keeping the towncrier configuration
    207          # somewhere else and only bringing it in when it's actually needed
    208          # (after pip is done).
    209          #
    210          # Some discussion is available at
    211          # https://github.com/pypa/pip/issues/5696
    212          #
    213          # towncrier post 19.2 (unreleased as of this writing) adds a --config
    214          # option that can be used instead of this file shuffling.
    215          mv towncrier.pyproject.toml pyproject.toml
    216 
    217          # towncrier 19.2 + works with python2.7
    218          python -m towncrier --yes
    219 
    220          # put it back
    221          mv pyproject.toml towncrier.pyproject.toml
    222 
    223          # commit the changes
    224          git commit -m "update NEWS.txt for release"
     188# On macOS, git invoked from Tox needs $HOME.
     189passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH HOME
     190whitelist_externals =
     191    git
     192deps =
     193    # see comment in [testenv] about "certifi"   
     194    certifi
     195    towncrier==21.3.0
     196commands =
     197    python -m towncrier --yes --config towncrier.toml
     198    # commit the changes
     199    git commit -m "update NEWS.txt for release"
    225200
    226201[testenv:deprecations]
     
    282257    # Python 3 we can reconsider this constraint.
    283258    pyinstaller < 4.0
    284     # 2021.5.13 broke on Windows. See https://github.com/erocarrera/pefile/issues/318
    285     pefile < 2021.5.13 ; platform_system == "Windows"
     259    pefile ; platform_system == "Windows"
    286260# Setting PYTHONHASHSEED to a known value assists with reproducible builds.
    287261# See https://pyinstaller.readthedocs.io/en/stable/advanced-topics.html#creating-a-reproducible-build
Note: See TracChangeset for help on using the changeset viewer.