diff --git a/.github/workflows/bootstrap-requirements.txt b/.github/workflows/bootstrap-requirements.txt new file mode 100644 index 00000000..dca9a909 --- /dev/null +++ b/.github/workflows/bootstrap-requirements.txt @@ -0,0 +1 @@ +click diff --git a/.github/workflows/ets-from-source.yml b/.github/workflows/ets-from-source.yml index cca74ae4..b22b04af 100644 --- a/.github/workflows/ets-from-source.yml +++ b/.github/workflows/ets-from-source.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: env: - INSTALL_EDM_VERSION: 3.2.3 + INSTALL_EDM_VERSION: 3.5.0 jobs: @@ -15,33 +15,34 @@ jobs: test-with-edm: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, windows-latest] + runtime: ['3.8'] + runs-on: ${{ matrix.os }} - env: - # Set root directory, mainly for Windows, so that the EDM Python - # environment lives in the same drive as the cloned source. Otherwise - # 'pip install' raises an error while trying to compute - # relative path between the site-packages and the source directory. - EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm steps: - - uses: actions/checkout@v2 + - name: Checkout the target commit + uses: actions/checkout@v3 + - name: Set up bootstrap Python (3.10) + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: 'pip' + cache-dependency-path: '.github/workflows/bootstrap-requirements.txt' + - name: Install necessary packages to the bootstrap environment + run: python -m pip install -r .github/workflows/bootstrap-requirements.txt - name: Cache EDM packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache - key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }} + key: ${{ runner.os }}-${{ matrix.runtime }}-${{ hashFiles('etstool.py') }} - name: Setup EDM - uses: enthought/setup-edm-action@v1 + uses: enthought/setup-edm-action@v2 with: edm-version: ${{ env.INSTALL_EDM_VERSION }} - - name: Install click to the default EDM environment - run: edm install -y wheel click coverage - name: Install test environment - run: edm run -- python etstool.py install --source + run: python etstool.py install --runtime=${{ matrix.runtime }} --source - name: Run tests - uses: GabrielBB/xvfb-action@v1 - with: - run: edm run -- python etstool.py test + run: python etstool.py test --runtime=${{ matrix.runtime }} notify-on-failure: needs: test-with-edm diff --git a/.github/workflows/publish-on-pypi.yml b/.github/workflows/publish-on-pypi.yml new file mode 100644 index 00000000..7766f36d --- /dev/null +++ b/.github/workflows/publish-on-pypi.yml @@ -0,0 +1,31 @@ +name: Publish release to PyPI + +on: + workflow_dispatch: + release: + types: [published] + +jobs: + build-and-upload: + runs-on: ubuntu-latest + + steps: + - name: Check out the release commit + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install Python packages needed for build and upload + run: | + python -m pip install build twine + - name: Build sdist and wheel + run: | + python -m build + - name: Publish to PyPI + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python -m twine check --strict dist/* + python -m twine upload dist/* diff --git a/.github/workflows/test-with-edm.yml b/.github/workflows/test-with-edm.yml index b1eb59b7..61a77ee8 100644 --- a/.github/workflows/test-with-edm.yml +++ b/.github/workflows/test-with-edm.yml @@ -4,10 +4,10 @@ name: Test with EDM -on: pull_request +on: [pull_request, workflow_dispatch] env: - INSTALL_EDM_VERSION: 3.2.3 + INSTALL_EDM_VERSION: 3.5.0 jobs: @@ -15,33 +15,34 @@ jobs: test-with-edm: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: ['ubuntu-latest', 'windows-latest'] + runtime: ['3.6', '3.8'] + runs-on: ${{ matrix.os }} - env: - # Set root directory, mainly for Windows, so that the EDM Python - # environment lives in the same drive as the cloned source. Otherwise - # 'pip install' raises an error while trying to compute - # relative path between the site-packages and the source directory. - EDM_ROOT_DIRECTORY: ${{ github.workspace }}/.edm steps: - - uses: actions/checkout@v2 + - name: Checkout the target commit + uses: actions/checkout@v3 + - name: Set up bootstrap Python (3.10) + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: 'pip' + cache-dependency-path: '.github/workflows/bootstrap-requirements.txt' + - name: Install necessary packages to the bootstrap environment + run: python -m pip install -r .github/workflows/bootstrap-requirements.txt - name: Cache EDM packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache - key: ${{ runner.os }}-${{ matrix.toolkit }}-${{ hashFiles('etstool.py') }} + key: ${{ runner.os }}-${{ matrix.runtime }}-${{ hashFiles('etstool.py') }} - name: Setup EDM - uses: enthought/setup-edm-action@v1 + uses: enthought/setup-edm-action@v2 with: edm-version: ${{ env.INSTALL_EDM_VERSION }} - - name: Install click to the default EDM environment - run: edm install -y wheel click coverage - name: Install test environment - run: edm run -- python etstool.py install - - name: Flake8 - run: edm run -- python etstool.py flake8 + run: python etstool.py install --runtime=${{ matrix.runtime }} + - name: Run style checks (only on Linux) + run: python etstool.py flake8 --runtime=${{ matrix.runtime }} if: startsWith(matrix.os, 'ubuntu') - name: Run tests - uses: GabrielBB/xvfb-action@v1 - with: - run: edm run -- python etstool.py test + run: python etstool.py test --runtime=${{ matrix.runtime }} diff --git a/.github/workflows/test-with-pip.yml b/.github/workflows/test-with-pip.yml new file mode 100644 index 00000000..38ceb699 --- /dev/null +++ b/.github/workflows/test-with-pip.yml @@ -0,0 +1,30 @@ +name: Test with pip + +on: +- pull_request +- workflow_dispatch + +jobs: + tests: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + + runs-on: ${{ matrix.os }} + + steps: + - name: Get apptools source + uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies and local packages + run: | + python -m pip install .[h5,preferences] + - name: Run tests + run: | + mkdir testdir + cd testdir + python -m unittest discover -v apptools diff --git a/CHANGES.txt b/CHANGES.txt index 4207aef3..aaf68c19 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,61 @@ Apptools CHANGELOG ================== +Version 5.2.0 +~~~~~~~~~~~~~ + +Released: 2022-08-16 + +This is a minor release, focusing primarily on Python 3.8 support and updating +of development workflows. + +Thanks to the following contributors: + +* Aaron Ayres +* Mark Dickinson +* Jonas Heinrich +* Robert T. McGibbon +* Sai Rahul Poruri +* Corran Webster + +Features +-------- +* Replace some uses of ``on_trait_change`` and ``depends_on`` with ``observe``. + (#285, #289) +* Use ``importlib.resources`` in preference to ``importlib_resources`` + on new enough Python versions. (#284) + +Fixes +----- +* Replace ``eval`` with ``ast.literal_eval`` in ``apptools.preferences``. + (#299) +* Use context managers to handle locks in ``apptools.preferences``. (#306) +* Fix test failures due to ``collections.abc`` changes in Python 3.10. (#313) +* Remove a redundant ``elif`` branch in ``preference_binding``. (#298) + +Documentation +------------- +* Copyrights have been updated for 2022. (#307) +* A Read the Docs configuration file has been added. (#296) +* A use of the deprecated ``contributes_to`` decorator in the documentation + has been fixed. (#286) + +Build +----- +* The default branch has been renamed from ``master`` to ``main``. (#297) +* ``etstool.py`` now supports Python 3.8 as well as Python 3.6, and test + workflows will run on both Python 3.6 and Python 3.8. (#316) +* Continuous integration now uses GitHub Actions instead of Travis CI + and Appveyor. (#288, #291, #292) +* Added a GitHub Actions test workflow that tests against PyPI packages instead + of EDM packages. (#314) +* Added a GitHub Actions workflow to automatically publish releases to PyPI. + (#315) +* Cron job failures are now reported to the main ETS Slack channel, not the + bots channel. (#295, #308) +* The cron job can now also be triggered manually. (#294) + + Version 5.1.0 ~~~~~~~~~~~~~ diff --git a/apptools/__init__.py b/apptools/__init__.py index 4fc044f5..4999985d 100644 --- a/apptools/__init__.py +++ b/apptools/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/_testing/__init__.py b/apptools/_testing/__init__.py index 0586629a..1cc9926a 100644 --- a/apptools/_testing/__init__.py +++ b/apptools/_testing/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2006-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2006-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/_testing/optional_dependencies.py b/apptools/_testing/optional_dependencies.py index a065e873..5994b6c1 100644 --- a/apptools/_testing/optional_dependencies.py +++ b/apptools/_testing/optional_dependencies.py @@ -1,4 +1,4 @@ -# (C) Copyright 2006-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2006-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/__init__.py b/apptools/io/__init__.py index 90868784..474e6d5c 100644 --- a/apptools/io/__init__.py +++ b/apptools/io/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/api.py b/apptools/io/api.py index b0d636b8..9663ddb1 100644 --- a/apptools/io/api.py +++ b/apptools/io/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/file.py b/apptools/io/file.py index 92c6a82c..2d32be9e 100644 --- a/apptools/io/file.py +++ b/apptools/io/file.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/__init__.py b/apptools/io/h5/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/io/h5/__init__.py +++ b/apptools/io/h5/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/dict_node.py b/apptools/io/h5/dict_node.py index f7cb6a41..d87cc6f1 100644 --- a/apptools/io/h5/dict_node.py +++ b/apptools/io/h5/dict_node.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/file.py b/apptools/io/h5/file.py index c3c0201a..cf4ae442 100644 --- a/apptools/io/h5/file.py +++ b/apptools/io/h5/file.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -7,7 +7,7 @@ # is also available online at http://www.enthought.com/licenses/BSD.txt # # Thanks for using Enthought open source! -from collections import Mapping, MutableMapping +from collections.abc import Mapping, MutableMapping from functools import partial import inspect diff --git a/apptools/io/h5/table_node.py b/apptools/io/h5/table_node.py index 6e79c54f..f246d33f 100644 --- a/apptools/io/h5/table_node.py +++ b/apptools/io/h5/table_node.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/tests/__init__.py b/apptools/io/h5/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/io/h5/tests/__init__.py +++ b/apptools/io/h5/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/tests/test_dict_node.py b/apptools/io/h5/tests/test_dict_node.py index ec7c532e..e447ae82 100644 --- a/apptools/io/h5/tests/test_dict_node.py +++ b/apptools/io/h5/tests/test_dict_node.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/tests/test_file.py b/apptools/io/h5/tests/test_file.py index 1304ad79..b4fb0680 100644 --- a/apptools/io/h5/tests/test_file.py +++ b/apptools/io/h5/tests/test_file.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/tests/test_table_node.py b/apptools/io/h5/tests/test_table_node.py index 96291324..62f48aed 100644 --- a/apptools/io/h5/tests/test_table_node.py +++ b/apptools/io/h5/tests/test_table_node.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/tests/utils.py b/apptools/io/h5/tests/utils.py index c1e2f208..c272a88e 100644 --- a/apptools/io/h5/tests/utils.py +++ b/apptools/io/h5/tests/utils.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/h5/utils.py b/apptools/io/h5/utils.py index 4dfe8e4f..ee50996e 100644 --- a/apptools/io/h5/utils.py +++ b/apptools/io/h5/utils.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/tests/__init__.py b/apptools/io/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/io/tests/__init__.py +++ b/apptools/io/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/tests/test_file.py b/apptools/io/tests/test_file.py index ee14ce59..7232cc61 100644 --- a/apptools/io/tests/test_file.py +++ b/apptools/io/tests/test_file.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/io/tests/test_folder.py b/apptools/io/tests/test_folder.py index 81e5d30e..f8e304c5 100644 --- a/apptools/io/tests/test_folder.py +++ b/apptools/io/tests/test_folder.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/__init__.py b/apptools/logger/__init__.py index 2320630e..d116ecc1 100644 --- a/apptools/logger/__init__.py +++ b/apptools/logger/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/agent/__init__.py b/apptools/logger/agent/__init__.py index 79d5d450..cdd6171e 100644 --- a/apptools/logger/agent/__init__.py +++ b/apptools/logger/agent/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/agent/attachments.py b/apptools/logger/agent/attachments.py index 15d1cb80..b47bb104 100644 --- a/apptools/logger/agent/attachments.py +++ b/apptools/logger/agent/attachments.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/agent/quality_agent_mailer.py b/apptools/logger/agent/quality_agent_mailer.py index dfd26f26..16708b07 100644 --- a/apptools/logger/agent/quality_agent_mailer.py +++ b/apptools/logger/agent/quality_agent_mailer.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/agent/quality_agent_view.py b/apptools/logger/agent/quality_agent_view.py index b9547799..19e09089 100644 --- a/apptools/logger/agent/quality_agent_view.py +++ b/apptools/logger/agent/quality_agent_view.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/agent/tests/__init__.py b/apptools/logger/agent/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/logger/agent/tests/__init__.py +++ b/apptools/logger/agent/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/agent/tests/test_attachments.py b/apptools/logger/agent/tests/test_attachments.py index 7a572c61..fb01d32c 100644 --- a/apptools/logger/agent/tests/test_attachments.py +++ b/apptools/logger/agent/tests/test_attachments.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/api.py b/apptools/logger/api.py index 85f42d17..8911b0b1 100644 --- a/apptools/logger/api.py +++ b/apptools/logger/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/custom_excepthook.py b/apptools/logger/custom_excepthook.py index 3faacee9..cee97847 100644 --- a/apptools/logger/custom_excepthook.py +++ b/apptools/logger/custom_excepthook.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/log_point.py b/apptools/logger/log_point.py index 16b3c177..ef7aa515 100644 --- a/apptools/logger/log_point.py +++ b/apptools/logger/log_point.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/log_queue_handler.py b/apptools/logger/log_queue_handler.py index 02117934..c6f3ceac 100644 --- a/apptools/logger/log_queue_handler.py +++ b/apptools/logger/log_queue_handler.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/logger.py b/apptools/logger/logger.py index d7bd5b37..f899edd9 100644 --- a/apptools/logger/logger.py +++ b/apptools/logger/logger.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -29,10 +29,24 @@ class LogFileHandler(RotatingFileHandler): """The default log file handler.""" def __init__( - self, path, maxBytes=1000000, backupCount=3, level=None, formatter=None + self, + path, + mode="a", + maxBytes=1000000, + backupCount=3, + level=None, + formatter=None, + encoding=None, + delay=False, ): RotatingFileHandler.__init__( - self, path, maxBytes=maxBytes, backupCount=3 + self, + filename=path, + mode=mode, + maxBytes=maxBytes, + backupCount=backupCount, + encoding=encoding, + delay=delay, ) if level is None: diff --git a/apptools/logger/plugin/__init__.py b/apptools/logger/plugin/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/logger/plugin/__init__.py +++ b/apptools/logger/plugin/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/logger_plugin.py b/apptools/logger/plugin/logger_plugin.py index 3083bad1..2025431c 100644 --- a/apptools/logger/plugin/logger_plugin.py +++ b/apptools/logger/plugin/logger_plugin.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/logger_preferences.py b/apptools/logger/plugin/logger_preferences.py index 7fbe1286..56d2808a 100644 --- a/apptools/logger/plugin/logger_preferences.py +++ b/apptools/logger/plugin/logger_preferences.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/logger_service.py b/apptools/logger/plugin/logger_service.py index 20ae28ef..bfeb86cc 100644 --- a/apptools/logger/plugin/logger_service.py +++ b/apptools/logger/plugin/logger_service.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/tests/__init__.py b/apptools/logger/plugin/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/logger/plugin/tests/__init__.py +++ b/apptools/logger/plugin/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/tests/test_logger_service.py b/apptools/logger/plugin/tests/test_logger_service.py index e40443ef..9c69d960 100644 --- a/apptools/logger/plugin/tests/test_logger_service.py +++ b/apptools/logger/plugin/tests/test_logger_service.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/view/__init__.py b/apptools/logger/plugin/view/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/logger/plugin/view/__init__.py +++ b/apptools/logger/plugin/view/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/view/logger_preferences_page.py b/apptools/logger/plugin/view/logger_preferences_page.py index d50fb5c3..c80651e7 100644 --- a/apptools/logger/plugin/view/logger_preferences_page.py +++ b/apptools/logger/plugin/view/logger_preferences_page.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/plugin/view/logger_view.py b/apptools/logger/plugin/view/logger_view.py index 3423367c..12c4a841 100644 --- a/apptools/logger/plugin/view/logger_view.py +++ b/apptools/logger/plugin/view/logger_view.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/logger/ring_buffer.py b/apptools/logger/ring_buffer.py index 3d3c26a0..4d13e549 100644 --- a/apptools/logger/ring_buffer.py +++ b/apptools/logger/ring_buffer.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/__init__.py b/apptools/naming/__init__.py index 23f90936..4ccfbd80 100644 --- a/apptools/naming/__init__.py +++ b/apptools/naming/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/address.py b/apptools/naming/address.py index 42c82844..b36a6316 100644 --- a/apptools/naming/address.py +++ b/apptools/naming/address.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/api.py b/apptools/naming/api.py index 4ba0d300..f3fc7593 100644 --- a/apptools/naming/api.py +++ b/apptools/naming/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/binding.py b/apptools/naming/binding.py index 54df6da6..8466d81e 100644 --- a/apptools/naming/binding.py +++ b/apptools/naming/binding.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/context.py b/apptools/naming/context.py index 53ae5ea8..e1dc3282 100644 --- a/apptools/naming/context.py +++ b/apptools/naming/context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/dir_context.py b/apptools/naming/dir_context.py index 78385862..6e96eefb 100644 --- a/apptools/naming/dir_context.py +++ b/apptools/naming/dir_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/dynamic_context.py b/apptools/naming/dynamic_context.py index 2cf10394..0e261ec4 100644 --- a/apptools/naming/dynamic_context.py +++ b/apptools/naming/dynamic_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/exception.py b/apptools/naming/exception.py index 45d0e263..93d9e308 100644 --- a/apptools/naming/exception.py +++ b/apptools/naming/exception.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/initial_context.py b/apptools/naming/initial_context.py index a494e05b..ae00671a 100644 --- a/apptools/naming/initial_context.py +++ b/apptools/naming/initial_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/initial_context_factory.py b/apptools/naming/initial_context_factory.py index 4afc41f7..b28dcdeb 100644 --- a/apptools/naming/initial_context_factory.py +++ b/apptools/naming/initial_context_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/naming_event.py b/apptools/naming/naming_event.py index 008ddbe7..52715f9e 100644 --- a/apptools/naming/naming_event.py +++ b/apptools/naming/naming_event.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/naming_manager.py b/apptools/naming/naming_manager.py index 11375040..3017a483 100644 --- a/apptools/naming/naming_manager.py +++ b/apptools/naming/naming_manager.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/object_factory.py b/apptools/naming/object_factory.py index f1dba1d7..93833fc3 100644 --- a/apptools/naming/object_factory.py +++ b/apptools/naming/object_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/object_serializer.py b/apptools/naming/object_serializer.py index 65d5b190..5ebb8d84 100644 --- a/apptools/naming/object_serializer.py +++ b/apptools/naming/object_serializer.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/py_context.py b/apptools/naming/py_context.py index eb00a073..b31f266e 100644 --- a/apptools/naming/py_context.py +++ b/apptools/naming/py_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/py_object_factory.py b/apptools/naming/py_object_factory.py index f2b1b928..40b28733 100644 --- a/apptools/naming/py_object_factory.py +++ b/apptools/naming/py_object_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/pyfs_context.py b/apptools/naming/pyfs_context.py index 87c2dda2..56972f12 100644 --- a/apptools/naming/pyfs_context.py +++ b/apptools/naming/pyfs_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/pyfs_context_factory.py b/apptools/naming/pyfs_context_factory.py index 735bd50f..e702a3d9 100644 --- a/apptools/naming/pyfs_context_factory.py +++ b/apptools/naming/pyfs_context_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/pyfs_initial_context_factory.py b/apptools/naming/pyfs_initial_context_factory.py index 6692576b..5be56a27 100644 --- a/apptools/naming/pyfs_initial_context_factory.py +++ b/apptools/naming/pyfs_initial_context_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/pyfs_object_factory.py b/apptools/naming/pyfs_object_factory.py index d69f4b0b..fa6f747c 100644 --- a/apptools/naming/pyfs_object_factory.py +++ b/apptools/naming/pyfs_object_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/pyfs_state_factory.py b/apptools/naming/pyfs_state_factory.py index 741c2cd7..182c84f3 100644 --- a/apptools/naming/pyfs_state_factory.py +++ b/apptools/naming/pyfs_state_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/reference.py b/apptools/naming/reference.py index 1dc23671..44a2b676 100644 --- a/apptools/naming/reference.py +++ b/apptools/naming/reference.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/referenceable.py b/apptools/naming/referenceable.py index 2a1e5515..a0ddd0f8 100644 --- a/apptools/naming/referenceable.py +++ b/apptools/naming/referenceable.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/referenceable_state_factory.py b/apptools/naming/referenceable_state_factory.py index 3e3d516c..3ca8226f 100644 --- a/apptools/naming/referenceable_state_factory.py +++ b/apptools/naming/referenceable_state_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/state_factory.py b/apptools/naming/state_factory.py index fd0fb2ab..06cf6866 100644 --- a/apptools/naming/state_factory.py +++ b/apptools/naming/state_factory.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/tests/__init__.py b/apptools/naming/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/naming/tests/__init__.py +++ b/apptools/naming/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/tests/test_context.py b/apptools/naming/tests/test_context.py index f72fbda4..1a1029b5 100644 --- a/apptools/naming/tests/test_context.py +++ b/apptools/naming/tests/test_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/tests/test_dir_context.py b/apptools/naming/tests/test_dir_context.py index 67ea855d..2f96b297 100644 --- a/apptools/naming/tests/test_dir_context.py +++ b/apptools/naming/tests/test_dir_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/tests/test_object_serializer.py b/apptools/naming/tests/test_object_serializer.py index 2cfe3c41..2ad2315e 100644 --- a/apptools/naming/tests/test_object_serializer.py +++ b/apptools/naming/tests/test_object_serializer.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/tests/test_py_context.py b/apptools/naming/tests/test_py_context.py index d6abafd6..43065ebd 100644 --- a/apptools/naming/tests/test_py_context.py +++ b/apptools/naming/tests/test_py_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/tests/test_pyfs_context.py b/apptools/naming/tests/test_pyfs_context.py index 409e1f70..115a9176 100644 --- a/apptools/naming/tests/test_pyfs_context.py +++ b/apptools/naming/tests/test_pyfs_context.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/trait_defs/__init__.py b/apptools/naming/trait_defs/__init__.py index 76b603bb..18992964 100644 --- a/apptools/naming/trait_defs/__init__.py +++ b/apptools/naming/trait_defs/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/trait_defs/api.py b/apptools/naming/trait_defs/api.py index 74fc2106..2f14cb18 100644 --- a/apptools/naming/trait_defs/api.py +++ b/apptools/naming/trait_defs/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/trait_defs/naming_traits.py b/apptools/naming/trait_defs/naming_traits.py index 1e990d90..54dcbba0 100644 --- a/apptools/naming/trait_defs/naming_traits.py +++ b/apptools/naming/trait_defs/naming_traits.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/naming/unique_name.py b/apptools/naming/unique_name.py index be0e630d..1831a439 100644 --- a/apptools/naming/unique_name.py +++ b/apptools/naming/unique_name.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/__init__.py b/apptools/persistence/__init__.py index cf8a21e1..e5a577b4 100644 --- a/apptools/persistence/__init__.py +++ b/apptools/persistence/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/file_path.py b/apptools/persistence/file_path.py index 6cb0cfc6..b3b0dd6a 100644 --- a/apptools/persistence/file_path.py +++ b/apptools/persistence/file_path.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/project_loader.py b/apptools/persistence/project_loader.py index 1f31b431..d2257133 100644 --- a/apptools/persistence/project_loader.py +++ b/apptools/persistence/project_loader.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/state_pickler.py b/apptools/persistence/state_pickler.py index 56bbd107..544f5e08 100644 --- a/apptools/persistence/state_pickler.py +++ b/apptools/persistence/state_pickler.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -393,11 +393,14 @@ def _do_instance(self, value): args = value.__getinitargs__() # Get the object state. + state = None if hasattr(value, "__get_pure_state__"): state = value.__get_pure_state__() elif hasattr(value, "__getstate__"): + # Note that __getstate__() may return None in Python >= 3.11 state = value.__getstate__() - else: + + if state is None: state = value.__dict__ state.pop("__traits_version__", None) diff --git a/apptools/persistence/tests/__init__.py b/apptools/persistence/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/persistence/tests/__init__.py +++ b/apptools/persistence/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/state_function_classes.py b/apptools/persistence/tests/state_function_classes.py index 855a6f34..7de3d5e6 100644 --- a/apptools/persistence/tests/state_function_classes.py +++ b/apptools/persistence/tests/state_function_classes.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/test_class_mapping.py b/apptools/persistence/tests/test_class_mapping.py index bb44884d..a074026c 100644 --- a/apptools/persistence/tests/test_class_mapping.py +++ b/apptools/persistence/tests/test_class_mapping.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/test_file_path.py b/apptools/persistence/tests/test_file_path.py index d8f90775..6993e839 100644 --- a/apptools/persistence/tests/test_file_path.py +++ b/apptools/persistence/tests/test_file_path.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/test_state_function.py b/apptools/persistence/tests/test_state_function.py index f75597c3..ed6d78b3 100644 --- a/apptools/persistence/tests/test_state_function.py +++ b/apptools/persistence/tests/test_state_function.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/test_state_pickler.py b/apptools/persistence/tests/test_state_pickler.py index 84f6cf02..2351449f 100644 --- a/apptools/persistence/tests/test_state_pickler.py +++ b/apptools/persistence/tests/test_state_pickler.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/test_two_stage_unpickler.py b/apptools/persistence/tests/test_two_stage_unpickler.py index 50a201d2..205d3b8f 100644 --- a/apptools/persistence/tests/test_two_stage_unpickler.py +++ b/apptools/persistence/tests/test_two_stage_unpickler.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/tests/test_version_registry.py b/apptools/persistence/tests/test_version_registry.py index a599b40a..29622065 100644 --- a/apptools/persistence/tests/test_version_registry.py +++ b/apptools/persistence/tests/test_version_registry.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/updater.py b/apptools/persistence/updater.py index 40faa0c8..a5da35a1 100644 --- a/apptools/persistence/updater.py +++ b/apptools/persistence/updater.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/version_registry.py b/apptools/persistence/version_registry.py index ac2b3eda..d7e67d97 100644 --- a/apptools/persistence/version_registry.py +++ b/apptools/persistence/version_registry.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/persistence/versioned_unpickler.py b/apptools/persistence/versioned_unpickler.py index 1c64bc43..5450a1b3 100644 --- a/apptools/persistence/versioned_unpickler.py +++ b/apptools/persistence/versioned_unpickler.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/__init__.py b/apptools/preferences/__init__.py index a63f645c..9c7d8df1 100644 --- a/apptools/preferences/__init__.py +++ b/apptools/preferences/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/api.py b/apptools/preferences/api.py index f44d307c..4eabbc99 100644 --- a/apptools/preferences/api.py +++ b/apptools/preferences/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/i_preferences.py b/apptools/preferences/i_preferences.py index de60a189..97cfbdb0 100644 --- a/apptools/preferences/i_preferences.py +++ b/apptools/preferences/i_preferences.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/package_globals.py b/apptools/preferences/package_globals.py index 68b6f932..571a2de8 100644 --- a/apptools/preferences/package_globals.py +++ b/apptools/preferences/package_globals.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/preference_binding.py b/apptools/preferences/preference_binding.py index 89cee809..e777f1e8 100644 --- a/apptools/preferences/preference_binding.py +++ b/apptools/preferences/preference_binding.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/preferences.py b/apptools/preferences/preferences.py index 07f4d44c..02360f03 100644 --- a/apptools/preferences/preferences.py +++ b/apptools/preferences/preferences.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -84,7 +84,7 @@ def __init__(self, **traits): self._lk = threading.Lock() # Base class constructor. - super(Preferences, self).__init__(**traits) + super().__init__(**traits) # If a filename has been specified then load the preferences from it. if len(self.filename) > 0: @@ -408,9 +408,8 @@ def save(self, file_or_filename=None): def _add_dictionary_to_node(self, node, dictionary): """ Add the contents of a dictionary to a node's preferences. """ - self._lk.acquire() - node._preferences.update(dictionary) - self._lk.release() + with self._lk: + node._preferences.update(dictionary) def _add_node_to_dictionary(self, node, dictionary): """ Add a node's preferences to a dictionary. """ @@ -429,32 +428,28 @@ def _add_node_to_dictionary(self, node, dictionary): def _add_preferences_listener(self, listener): """ Add a listener for changes to thisnode's preferences. """ - self._lk.acquire() - self._preferences_listeners.append(listener) - self._lk.release() + with self._lk: + self._preferences_listeners.append(listener) def _clear(self): """ Remove all preferences from this node. """ - self._lk.acquire() - self._preferences.clear() - self._lk.release() + with self._lk: + self._preferences.clear() def _create_child(self, name): """ Create a child of this node with the specified name. """ - self._lk.acquire() - child = self._children[name] = Preferences(name=name, parent=self) - self._lk.release() + with self._lk: + child = self._children[name] = Preferences(name=name, parent=self) return child def _get(self, key, default=None): """ Get the value of a preference in this node. """ - self._lk.acquire() - value = self._preferences.get(key, default) - self._lk.release() + with self._lk: + value = self._preferences.get(key, default) return value @@ -465,18 +460,16 @@ def _get_child(self, name): """ - self._lk.acquire() - child = self._children.get(name) - self._lk.release() + with self._lk: + child = self._children.get(name) return child def _keys(self): """ Return the preference keys of this node. """ - self._lk.acquire() - keys = list(self._preferences.keys()) - self._lk.release() + with self._lk: + keys = list(self._preferences.keys()) return keys @@ -496,27 +489,24 @@ def _node(self, name): def _node_names(self): """ Return the names of the children of this node. """ - self._lk.acquire() - node_names = list(self._children.keys()) - self._lk.release() + with self._lk: + node_names = list(self._children.keys()) return node_names def _remove(self, name): """ Remove a preference value from this node. """ - self._lk.acquire() - if name in self._preferences: - del self._preferences[name] - self._lk.release() + with self._lk: + if name in self._preferences: + del self._preferences[name] def _remove_preferences_listener(self, listener): """ Remove a listener for changes to the node's preferences. """ - self._lk.acquire() - if listener in self._preferences_listeners: - self._preferences_listeners.remove(listener) - self._lk.release() + with self._lk: + if listener in self._preferences_listeners: + self._preferences_listeners.remove(listener) def _set(self, key, value): """ Set the value of a preference in this node. """ @@ -526,17 +516,16 @@ def _set(self, key, value): # encoded. value = str(value) - self._lk.acquire() - old = self._preferences.get(key) - self._preferences[key] = value + with self._lk: + old = self._preferences.get(key) + self._preferences[key] = value - # If the value is unchanged then don't call the listeners! - if old == value: - listeners = [] + # If the value is unchanged then don't call the listeners! + if old == value: + listeners = [] - else: - listeners = self._preferences_listeners[:] - self._lk.release() + else: + listeners = self._preferences_listeners[:] for listener in listeners: listener(self, key, old, value) diff --git a/apptools/preferences/preferences_helper.py b/apptools/preferences/preferences_helper.py index 514b1a79..a6f5e584 100644 --- a/apptools/preferences/preferences_helper.py +++ b/apptools/preferences/preferences_helper.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/scoped_preferences.py b/apptools/preferences/scoped_preferences.py index 2c1953bb..1ef9a0a6 100644 --- a/apptools/preferences/scoped_preferences.py +++ b/apptools/preferences/scoped_preferences.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/__init__.py b/apptools/preferences/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/preferences/tests/__init__.py +++ b/apptools/preferences/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/py_config_file.py b/apptools/preferences/tests/py_config_file.py index 51573ec1..e1c9d8bd 100644 --- a/apptools/preferences/tests/py_config_file.py +++ b/apptools/preferences/tests/py_config_file.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/test_preference_binding.py b/apptools/preferences/tests/test_preference_binding.py index 53497368..d7d5372e 100644 --- a/apptools/preferences/tests/test_preference_binding.py +++ b/apptools/preferences/tests/test_preference_binding.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/test_preferences.py b/apptools/preferences/tests/test_preferences.py index 7dfe5418..de6d5cb2 100644 --- a/apptools/preferences/tests/test_preferences.py +++ b/apptools/preferences/tests/test_preferences.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/test_preferences_helper.py b/apptools/preferences/tests/test_preferences_helper.py index fce74f5a..1c27c21f 100644 --- a/apptools/preferences/tests/test_preferences_helper.py +++ b/apptools/preferences/tests/test_preferences_helper.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/test_py_config_file.py b/apptools/preferences/tests/test_py_config_file.py index 89c96c88..148cab94 100644 --- a/apptools/preferences/tests/test_py_config_file.py +++ b/apptools/preferences/tests/test_py_config_file.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/tests/test_scoped_preferences.py b/apptools/preferences/tests/test_scoped_preferences.py index 5370210e..c6b2c71e 100644 --- a/apptools/preferences/tests/test_scoped_preferences.py +++ b/apptools/preferences/tests/test_scoped_preferences.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/__init__.py b/apptools/preferences/ui/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/preferences/ui/__init__.py +++ b/apptools/preferences/ui/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/api.py b/apptools/preferences/ui/api.py index 9b21540d..47785669 100644 --- a/apptools/preferences/ui/api.py +++ b/apptools/preferences/ui/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/i_preferences_page.py b/apptools/preferences/ui/i_preferences_page.py index a72ed354..7c44c80d 100644 --- a/apptools/preferences/ui/i_preferences_page.py +++ b/apptools/preferences/ui/i_preferences_page.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/preferences_manager.py b/apptools/preferences/ui/preferences_manager.py index 0ee8caa3..1cfe48b9 100644 --- a/apptools/preferences/ui/preferences_manager.py +++ b/apptools/preferences/ui/preferences_manager.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/preferences_node.py b/apptools/preferences/ui/preferences_node.py index 3c5d08e0..be6f48df 100644 --- a/apptools/preferences/ui/preferences_node.py +++ b/apptools/preferences/ui/preferences_node.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/preferences_page.py b/apptools/preferences/ui/preferences_page.py index c1ef7899..62a6478d 100644 --- a/apptools/preferences/ui/preferences_page.py +++ b/apptools/preferences/ui/preferences_page.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/tests/__init__.py b/apptools/preferences/ui/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/preferences/ui/tests/__init__.py +++ b/apptools/preferences/ui/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/tests/test_preferences_page.py b/apptools/preferences/ui/tests/test_preferences_page.py index 329b3d16..41858132 100644 --- a/apptools/preferences/ui/tests/test_preferences_page.py +++ b/apptools/preferences/ui/tests/test_preferences_page.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/tree_item.py b/apptools/preferences/ui/tree_item.py index 6ff30aff..f35d8d1c 100644 --- a/apptools/preferences/ui/tree_item.py +++ b/apptools/preferences/ui/tree_item.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/preferences/ui/widget_editor.py b/apptools/preferences/ui/widget_editor.py index 2c7f0313..9bfc956a 100644 --- a/apptools/preferences/ui/widget_editor.py +++ b/apptools/preferences/ui/widget_editor.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/__init__.py b/apptools/scripting/__init__.py index 7d69c9af..1f9de6e9 100644 --- a/apptools/scripting/__init__.py +++ b/apptools/scripting/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/api.py b/apptools/scripting/api.py index 010f8897..e4166c39 100644 --- a/apptools/scripting/api.py +++ b/apptools/scripting/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/package_globals.py b/apptools/scripting/package_globals.py index f6ca6114..f9ecbe04 100644 --- a/apptools/scripting/package_globals.py +++ b/apptools/scripting/package_globals.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/recordable.py b/apptools/scripting/recordable.py index 569a5258..032378a7 100644 --- a/apptools/scripting/recordable.py +++ b/apptools/scripting/recordable.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/recorder.py b/apptools/scripting/recorder.py index a6a95509..9b9ea1c1 100644 --- a/apptools/scripting/recorder.py +++ b/apptools/scripting/recorder.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/recorder_with_ui.py b/apptools/scripting/recorder_with_ui.py index c919d818..3b77c0c0 100644 --- a/apptools/scripting/recorder_with_ui.py +++ b/apptools/scripting/recorder_with_ui.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/tests/__init__.py b/apptools/scripting/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/scripting/tests/__init__.py +++ b/apptools/scripting/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/tests/test_recorder.py b/apptools/scripting/tests/test_recorder.py index 9986de80..baaa594a 100644 --- a/apptools/scripting/tests/test_recorder.py +++ b/apptools/scripting/tests/test_recorder.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/scripting/util.py b/apptools/scripting/util.py index 9475e07d..f65fca64 100644 --- a/apptools/scripting/util.py +++ b/apptools/scripting/util.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/__init__.py b/apptools/selection/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/selection/__init__.py +++ b/apptools/selection/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/api.py b/apptools/selection/api.py index 4ae3b9f2..d3e0e50d 100644 --- a/apptools/selection/api.py +++ b/apptools/selection/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/errors.py b/apptools/selection/errors.py index e616e19f..75376c05 100644 --- a/apptools/selection/errors.py +++ b/apptools/selection/errors.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/i_selection.py b/apptools/selection/i_selection.py index 8a213dfc..9739ccac 100644 --- a/apptools/selection/i_selection.py +++ b/apptools/selection/i_selection.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/i_selection_provider.py b/apptools/selection/i_selection_provider.py index 1ec45e9f..2cbe53fe 100644 --- a/apptools/selection/i_selection_provider.py +++ b/apptools/selection/i_selection_provider.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/list_selection.py b/apptools/selection/list_selection.py index 3296ee21..d87dfba5 100644 --- a/apptools/selection/list_selection.py +++ b/apptools/selection/list_selection.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/selection_service.py b/apptools/selection/selection_service.py index 4d8c3589..1bf4b2cb 100644 --- a/apptools/selection/selection_service.py +++ b/apptools/selection/selection_service.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/tests/__init__.py b/apptools/selection/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/selection/tests/__init__.py +++ b/apptools/selection/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/tests/test_list_selection.py b/apptools/selection/tests/test_list_selection.py index 83b4b332..e6565b34 100644 --- a/apptools/selection/tests/test_list_selection.py +++ b/apptools/selection/tests/test_list_selection.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/selection/tests/test_selection_service.py b/apptools/selection/tests/test_selection_service.py index d527a423..b6dc3b61 100644 --- a/apptools/selection/tests/test_selection_service.py +++ b/apptools/selection/tests/test_selection_service.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/__init__.py b/apptools/type_registry/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/type_registry/__init__.py +++ b/apptools/type_registry/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/api.py b/apptools/type_registry/api.py index e7a04f2d..8f1be8a4 100644 --- a/apptools/type_registry/api.py +++ b/apptools/type_registry/api.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/tests/__init__.py b/apptools/type_registry/tests/__init__.py index 20ef4fab..aa2218ef 100644 --- a/apptools/type_registry/tests/__init__.py +++ b/apptools/type_registry/tests/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/tests/dummies.py b/apptools/type_registry/tests/dummies.py index c8205644..7c91b86e 100644 --- a/apptools/type_registry/tests/dummies.py +++ b/apptools/type_registry/tests/dummies.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/tests/test_lazy_registry.py b/apptools/type_registry/tests/test_lazy_registry.py index a25f8639..e95a1e29 100644 --- a/apptools/type_registry/tests/test_lazy_registry.py +++ b/apptools/type_registry/tests/test_lazy_registry.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/tests/test_type_registry.py b/apptools/type_registry/tests/test_type_registry.py index 075805c8..4799a4ba 100644 --- a/apptools/type_registry/tests/test_type_registry.py +++ b/apptools/type_registry/tests/test_type_registry.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/type_registry/type_registry.py b/apptools/type_registry/type_registry.py index a817e797..cb0fc9e8 100644 --- a/apptools/type_registry/type_registry.py +++ b/apptools/type_registry/type_registry.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/undo/__init__.py b/apptools/undo/__init__.py index 00cf196c..93072d4d 100644 --- a/apptools/undo/__init__.py +++ b/apptools/undo/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/apptools/undo/action/__init__.py b/apptools/undo/action/__init__.py index 1b5d0141..e09a6103 100644 --- a/apptools/undo/action/__init__.py +++ b/apptools/undo/action/__init__.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/docs/releases/upcoming/285.feature.rst b/docs/releases/upcoming/285.feature.rst deleted file mode 100644 index 43a1cf1f..00000000 --- a/docs/releases/upcoming/285.feature.rst +++ /dev/null @@ -1 +0,0 @@ -start replacing on_trait_change with observe (#285) \ No newline at end of file diff --git a/docs/releases/upcoming/299.bugfix.rst b/docs/releases/upcoming/299.bugfix.rst deleted file mode 100644 index d2b7229e..00000000 --- a/docs/releases/upcoming/299.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Replace eval with ast.literal_eval in apptools.preferences (#299) \ No newline at end of file diff --git a/docs/releases/upcoming/328.bugfix.rst b/docs/releases/upcoming/328.bugfix.rst new file mode 100644 index 00000000..f55976de --- /dev/null +++ b/docs/releases/upcoming/328.bugfix.rst @@ -0,0 +1 @@ +Fix StatePickler for Python 3.11. (#328) \ No newline at end of file diff --git a/docs/source/api/templates/module.rst_t b/docs/source/api/templates/module.rst_t index 384cabd7..5a011462 100644 --- a/docs/source/api/templates/module.rst_t +++ b/docs/source/api/templates/module.rst_t @@ -1,5 +1,5 @@ .. - (C) Copyright 2006-2022 Enthought, Inc., Austin, TX + (C) Copyright 2006-2023 Enthought, Inc., Austin, TX All rights reserved. This software is provided without warranty under the terms of the BSD diff --git a/docs/source/api/templates/package.rst_t b/docs/source/api/templates/package.rst_t index 414eb99c..26c1fd5d 100644 --- a/docs/source/api/templates/package.rst_t +++ b/docs/source/api/templates/package.rst_t @@ -1,5 +1,5 @@ .. - (C) Copyright 2006-2022 Enthought, Inc., Austin, TX + (C) Copyright 2006-2023 Enthought, Inc., Austin, TX All rights reserved. This software is provided without warranty under the terms of the BSD diff --git a/docs/source/conf.py b/docs/source/conf.py index 4e7429e0..0b67f7ad 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -49,7 +49,7 @@ # General substitutions. project = 'apptools' -copyright = '2008-2022, Enthought' +copyright = '2008-2023, Enthought' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. diff --git a/etstool.py b/etstool.py index b7774fc9..e8c57265 100644 --- a/etstool.py +++ b/etstool.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -35,25 +35,22 @@ python etstool.py cleanup --runtime=... If you make changes you will either need to remove and re-install the -environment or manually update the environment using ``edm``, as -the install performs a ``python setup.py install`` rather than a ``develop``, -so changes in your code will not be automatically mirrored in the test -environment. You can update with a command like:: +environment or manually update the environment using ``edm``, as the install +performs a non-editable ``pip install``, so changes in your code will not be +automatically mirrored in the test environment. You can update with:: - edm run --environment ... -- python setup.py install + python etstool.py update --runtime=... You can run all three tasks at once with:: - python etstool.py test_clean --runtime=... + python etstool.py test-clean --runtime=... which will create, install, run tests, and then clean-up the environment. And you can run tests in all supported runtimes:: - python etstool.py test_all + python etstool.py test-all -Currently supported runtime value is``3.6``. Not all -runtimes will work, but the tasks will fail with a clear error if that is the -case. +For currently-supported runtime values, see the 'SUPPORTED_RUNTIMES' value. Tests can still be run via the usual means in other environments if that suits a developer's purpose. @@ -84,31 +81,39 @@ import os import subprocess import sys -from shutil import rmtree, copy as copyfile -from tempfile import mkdtemp from contextlib import contextmanager +from shutil import copy as copyfile +from shutil import rmtree, which +from tempfile import mkdtemp import click -DEFAULT_RUNTIME = "3.6" +#: Supported Python versions. +SUPPORTED_RUNTIMES = ["3.6", "3.8"] -supported_runtimes = [ - '3.6', -] +#: Default Python version to use. +DEFAULT_RUNTIME = "3.8" -dependencies = { - "flake8", - "flake8_ets", - "traitsui", - "configobj", - "coverage", - "importlib_resources>=1.1.0", - "pytables", - "pandas", - "pyface", - "enthought_sphinx_theme", - "sphinx", -} + +def edm_dependencies(runtime): + """ + EDM package dependencies for a given runtime version. + + Returns a set of requirement strings. + """ + return { + "flake8", + "flake8_ets", + "traitsui", + "configobj", + "coverage", + "importlib_resources>=1.1.0", + "pytables" if runtime == "3.6" else "tables", + "pandas", + "pyface", + "enthought_sphinx_theme", + "sphinx", + } # Dependencies we install from source for cron tests @@ -121,6 +126,24 @@ github_url_fmt = "git+http://github.com/enthought/{0}.git#egg={0}" +# Options shared between different click commands. +edm_option = click.option( + "--edm", + help=( + "Path to the EDM executable to use. The default is to use the first " + "EDM found in the path. The EDM executable can also be specified " + "by setting the ETSTOOL_EDM environment variable." + ), + envvar="ETSTOOL_EDM", +) +runtime_option = click.option( + "--runtime", + default=DEFAULT_RUNTIME, + type=click.Choice(SUPPORTED_RUNTIMES), + show_default=True, + help="Python runtime version", +) + # Location of documentation files HERE = os.path.dirname(__file__) @@ -139,29 +162,33 @@ def cli(): @cli.command() -@click.option('--runtime', default=DEFAULT_RUNTIME) +@edm_option +@runtime_option @click.option('--environment', default=None) @click.option( "--source/--no-source", default=False, help="Install ETS packages from source", ) -def install(runtime, environment, source): +def install(edm, runtime, environment, source): """ Install project and dependencies into a clean EDM environment. """ - parameters = get_parameters(runtime, environment) - packages = ' '.join(dependencies) + parameters = get_parameters(edm, runtime, environment) + edm_packages = ' '.join(edm_dependencies(runtime)) # edm commands to setup the development environment commands = [ - "edm environments create {environment} --force --version={runtime}", - "edm install -y -e {environment} " + packages, - "edm run -e {environment} -- pip install -r ci-src-requirements.txt" - " --no-dependencies", - "edm run -e {environment} -- python setup.py clean --all", - "edm run -e {environment} -- python setup.py develop" + "{edm} environments create {environment} --force --version={runtime}", + "{edm} install -y -e {environment} " + edm_packages, + ( + "{edm} run -e {environment} -- " + "python -m pip install -r ci-src-requirements.txt --no-deps" + ), + ( + "{edm} run -e {environment} -- " + "python -m pip install . --no-deps" + ), ] - # pip install pyqt5 and pyside2, because we don't have them in EDM yet click.echo("Creating environment '{environment}'".format(**parameters)) execute(commands, parameters) @@ -169,7 +196,7 @@ def install(runtime, environment, source): if source: # Remove EDM ETS packages and install them from source cmd_fmt = ( - "edm plumbing remove-package " + "{edm} plumbing remove-package " "--environment {environment} --force " ) commands = [cmd_fmt + source_pkg for source_pkg in source_dependencies] @@ -182,25 +209,26 @@ def install(runtime, environment, source): for pkg in source_pkgs ] commands = [ - "edm run -e {environment} -- " + command for command in commands + "{edm} run -e {environment} -- " + command for command in commands ] execute(commands, parameters) click.echo('Done install') @cli.command() -@click.option('--runtime', default=DEFAULT_RUNTIME) +@edm_option +@runtime_option @click.option('--environment', default=None) -def test(runtime, environment): +def test(edm, runtime, environment): """ Run the test suite in a given environment. """ - parameters = get_parameters(runtime, environment) + parameters = get_parameters(edm, runtime, environment) environ = {} environ['PYTHONUNBUFFERED'] = "1" commands = [ - "edm run -e {environment} -- python -W default -m coverage run -p -m " - "unittest discover -v apptools" + "{edm} run -e {environment} -- " + "python -W default -m coverage run -p -m unittest discover -v apptools" ] # We run in a tempdir to avoid accidentally picking up wrong apptools @@ -215,24 +243,25 @@ def test(runtime, environment): @cli.command() -@click.option('--runtime', default=DEFAULT_RUNTIME) +@edm_option +@runtime_option @click.option('--environment', default=None) -def docs(runtime, environment): +def docs(edm, runtime, environment): """ Build HTML documentation. """ - parameters = get_parameters(runtime, environment) + parameters = get_parameters(edm, runtime, environment) parameters["docs_source"] = "docs/source" parameters["docs_build"] = "docs/build" parameters["docs_source_api"] = "docs/source/api" parameters["docs_api_templates"] = "docs/source/api/templates" apidoc_command = ( - "edm run -e {environment} -- python -m sphinx.ext.apidoc " + "{edm} run -e {environment} -- python -m sphinx.ext.apidoc " "--separate --no-toc -o {docs_source_api} -t {docs_api_templates} " "apptools */tests" ) html_build_command = ( - "edm run -e {environment} -- python -m sphinx -b html " + "{edm} run -e {environment} -- python -m sphinx -b html " "{docs_source} {docs_build}" ) @@ -241,29 +270,30 @@ def docs(runtime, environment): @cli.command() -@click.option('--runtime', default=DEFAULT_RUNTIME) +@edm_option +@runtime_option @click.option('--environment', default=None) -def cleanup(runtime, environment): +def cleanup(edm, runtime, environment): """ Remove a development environment. """ - parameters = get_parameters(runtime, environment) + parameters = get_parameters(edm, runtime, environment) commands = [ - "edm run -e {environment} -- python setup.py clean", - "edm environments remove {environment} --purge -y"] + "{edm} environments remove {environment} --purge -y"] click.echo("Cleaning up environment '{environment}'".format(**parameters)) execute(commands, parameters) click.echo('Done cleanup') @cli.command() -@click.option('--runtime', default=DEFAULT_RUNTIME) +@edm_option +@runtime_option @click.option('--environment', default=None) -def flake8(runtime, environment): +def flake8(edm, runtime, environment): """ Run a flake8 check in a given environment. """ - parameters = get_parameters(runtime, environment) + parameters = get_parameters(edm, runtime, environment) targets = [ "apptools", "docs", @@ -273,18 +303,20 @@ def flake8(runtime, environment): "integrationtests", ] commands = [ - "edm run -e {environment} -- python -m flake8 " + " ".join(targets) + "{edm} run -e {environment} -- python -m flake8 " + + " ".join(targets) ] execute(commands, parameters) @cli.command(name='test-clean') -@click.option('--runtime', default=DEFAULT_RUNTIME) -def test_clean(runtime): +@edm_option +@runtime_option +def test_clean(edm, runtime): """ Run tests in a clean environment, cleaning up afterwards """ - args = ['--runtime={}'.format(runtime)] + args = [f'--edm={edm}', f'--runtime={runtime}'] try: install(args=args, standalone_mode=False) test(args=args, standalone_mode=False) @@ -293,30 +325,32 @@ def test_clean(runtime): @cli.command() -@click.option('--runtime', default=DEFAULT_RUNTIME) +@edm_option +@runtime_option @click.option('--environment', default=None) -def update(runtime, environment): +def update(edm, runtime, environment): """ Update/Reinstall package into environment. """ - parameters = get_parameters(runtime, environment) + parameters = get_parameters(edm, runtime, environment) commands = [ - "edm run -e {environment} -- python setup.py install"] + "{edm} run -e {environment} -- " + "python -m pip install . --no-deps" + ] click.echo("Re-installing in '{environment}'".format(**parameters)) execute(commands, parameters) click.echo('Done update') @cli.command(name='test-all') -def test_all(): +@edm_option +def test_all(edm): """ Run test_clean across all supported runtimes. """ failed_command = False - for runtime in supported_runtimes: - args = [ - '--runtime={}'.format(runtime) - ] + for runtime in SUPPORTED_RUNTIMES: + args = [f'--edm={edm}', f'--runtime={runtime}'] try: test_clean(args, standalone_mode=True) except SystemExit: @@ -437,9 +471,17 @@ def build_changelog(ctx): # ---------------------------------------------------------------------------- -def get_parameters(runtime, environment): +def get_parameters(edm, runtime, environment): """ Set up parameters dictionary for format() substitution """ - parameters = {'runtime': runtime, 'environment': environment} + + if edm is None: + edm = locate_edm() + + parameters = { + 'edm': edm, + 'runtime': runtime, + 'environment': environment, + } if environment is None: parameters['environment'] = 'apptools-test-{runtime}'.format( **parameters @@ -493,5 +535,38 @@ def execute(commands, parameters): sys.exit(1) +def locate_edm(): + """ + Locate an EDM executable if it exists, else raise an exception. + + Returns the first EDM executable found on the path. On Windows, if that + executable turns out to be the "edm.bat" batch file, replaces it with the + executable that it wraps: the batch file adds another level of command-line + mangling that interferes with things like specifying version restrictions. + + Returns + ------- + edm : str + Path to the EDM executable to use. + + Raises + ------ + click.ClickException + If no EDM executable is found in the path. + """ + edm = which("edm") + if edm is None: + raise click.ClickException( + "This script requires EDM, but no EDM executable " + "was found on the path." + ) + + # Resolve edm.bat on Windows. + if sys.platform == "win32" and os.path.basename(edm) == "edm.bat": + edm = os.path.join(os.path.dirname(edm), "embedded", "edm.exe") + + return edm + + if __name__ == '__main__': cli() diff --git a/examples/naming/simple.py b/examples/naming/simple.py index 0f137f1f..281033e4 100644 --- a/examples/naming/simple.py +++ b/examples/naming/simple.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/examples/preferences/preferences_manager.py b/examples/preferences/preferences_manager.py index f18d1edb..ca6c7167 100644 --- a/examples/preferences/preferences_manager.py +++ b/examples/preferences/preferences_manager.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/integrationtests/persistence/test_persistence.py b/integrationtests/persistence/test_persistence.py index 8ccc4944..c9b57aca 100644 --- a/integrationtests/persistence/test_persistence.py +++ b/integrationtests/persistence/test_persistence.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/integrationtests/persistence/update1.py b/integrationtests/persistence/update1.py index 71e7e6b0..170a3ade 100644 --- a/integrationtests/persistence/update1.py +++ b/integrationtests/persistence/update1.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/integrationtests/persistence/update2.py b/integrationtests/persistence/update2.py index 5797a04b..ee6eecec 100644 --- a/integrationtests/persistence/update2.py +++ b/integrationtests/persistence/update2.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/integrationtests/persistence/update3.py b/integrationtests/persistence/update3.py index bcd9a685..03c0c149 100644 --- a/integrationtests/persistence/update3.py +++ b/integrationtests/persistence/update3.py @@ -1,4 +1,4 @@ -# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2005-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..7e01ab27 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ['setuptools', 'wheel'] +build-backend = 'setuptools.build_meta' diff --git a/setup.py b/setup.py index 0bc62dff..87faf577 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# (C) Copyright 2008-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2008-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD @@ -19,7 +19,7 @@ # together with information from the version control system, and then injected # into the package source. MAJOR = 5 -MINOR = 2 +MINOR = 3 MICRO = 0 PRERELEASE = "" IS_RELEASED = False @@ -40,7 +40,7 @@ # Template for the autogenerated version file. VERSION_FILE_TEMPLATE = '''\ -# (C) Copyright 2008-2022 Enthought, Inc., Austin, TX +# (C) Copyright 2008-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD