From 5e3cde40bdff429c0855a905412ac0797246ba40 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 06:07:34 -0500 Subject: [PATCH 1/4] prep for jupyter releaser --- .github/workflows/check-release.yml | 22 ++ .github/workflows/enforce-label.yml | 13 + .github/workflows/tests.yml | 7 + CHANGELOG.md | 503 ++++++++++++++++++++++++++++ docs/requirements.txt | 3 +- docs/source/changelog.rst | 489 --------------------------- docs/source/conf.py | 27 +- 7 files changed, 562 insertions(+), 502 deletions(-) create mode 100644 .github/workflows/check-release.yml create mode 100644 .github/workflows/enforce-label.yml create mode 100644 CHANGELOG.md delete mode 100644 docs/source/changelog.rst diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 00000000..3e021565 --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,22 @@ +name: Check Release +on: + push: + branches: ["main"] + pull_request: + branches: ["*"] + +jobs: + check_release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install Dependencies + run: | + pip install -e . + - name: Check Release + uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/enforce-label.yml b/.github/workflows/enforce-label.yml new file mode 100644 index 00000000..725feab5 --- /dev/null +++ b/.github/workflows/enforce-label.yml @@ -0,0 +1,13 @@ +name: Enforce PR label + +on: + pull_request: + types: [labeled, unlabeled, opened, edited, synchronize] +jobs: + enforce-label: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: enforce-triage-label + uses: jupyterlab/maintainer-tools/.github/actions/enforce-label@v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bfe483d2..b181e7ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -100,6 +100,13 @@ jobs: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 + check_links: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 + pre-commit: name: pre-commit runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..28d1872b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,503 @@ +# Changes in Traitlets + + + +## 5.4.0 + +- Fix version_info +- Make generated config files more lintable +- Fix union trait from string +- Add security.md, and tidelift bage + + + +## 5.3.0 + +- Fix traitlet name in docstring +- Re-support multiple-alias key for ArgParseConfigLoader + +## 5.2.2 + +- Make `traitlets.__all__` explicit and validate in test. +- Fix `KeyError` in `Application.get_default_logging_config`. + +## 5.2.1 + +- logging: Don't attempt to close handlers unless they have been + opened. Fixes `ValueError: Unable to configure formatter 'console'` traceback. + +## 5.2.0 + +Traitlets 5.2 brings a couple of updates and changes to traitlets, and +is recommended for all users. What follows is a non-exhaustive list of +changes: + +- Application: add logging_config trait. +- Disambiguate the use of the term value in the example. +- Add mypy typing support. +- DOC: Add log example. +- Internal cleanup: linters, autoformatters, CI. + +## 5.1.1 + +5.1.1 fixes compatibility issues with Python 3.10 (rc2). + +## 5.1.0 + +Traitlets 5.1 brings a couple of updates and changes to traitlets, and +is recommended for all users. What follow is a non-exhaustive list of +changes: + +- Removal of the `ipython_genutils` dependency, this should remove + any direct and indirect reliance on `nose` and prepare traitlets + 5.1 for Python 3.10 and above compatibility, some test suite + changes also accommodate Python 3.10 changes. If you package + traitlets downstream, make sure to remove this dependency. +- Removal of `ipython_genutils` may have change the default encoding + detected for the command line argument parsing when not utf-8. We + expect this to affect a small portion of older windows version. If + you encounter issue let us know. +- Stop recommendation of `CUnicode` in some circumstances as it's + deprecated. +- Our test suite is now using GitHub action instead of travis CI. If + you are packaging downstream using the git repository, you may + have to exclude the `.github` folder now, and can remove exclusion + of +- It fixes a parsing issue for list of one single element on the + CLI. +- We reserve the right to remove official support for Python 3.7 in + subsequent minor revisions. + +## 5.0.5 + +- Support deprecated literals for sets, tuples on the command-line: + `nbconvert --TagRemovePreprocessor.remove_cell_tags='{"tag"}'` +- Fix `from_string_list` for Tuples in general +- Fix support for `List(default_value=None, allow_none=True)` and + other Container traits +- Fix help output for nested aliases and tuple traits + +## 5.0.4 + +- Support deprecated use of byte-literals for bytes on the + command-line: `ipython kernel --Session.key="b'abc'"`. The + `b` prefix is no longer needed in traitlets 5.0, but is + supported for backward-compatibility +- Improve output of configuration errors, especially when help output + would make it hard to find the helpful error message + +## 5.0.3 + +- Fix regression in handling `--opt=None` on the CLI for + configurable traits with `allow_none=True` + +## 5.0.2 + +- Fix casting bytes to unicode + +## 5.0.0 + +(This is an in-progress changelog, please let us know if something is +missing/or could be phrased better) + +Traitlets 5.0 is a new version of traitlets that accumulate changes over +a period of more close to four years; A number of internal refactoring +made the internal code structure cleaner and simpler, and greatly +improved the diagnostic error messages as well has help and +documentation generation. + +We expect no code change needed for any consumer of the Python API +(ipywidgets, and alike), though CLI argument parsing have seen a +complete rewrite, so if you have an application that does use the +parsing logic of traitlets you may see changes in behavior, and now have +access to more features. There was also a cleanup of what was considered +a part of the public API, certain previously exposed utility functions +and types are no longer available. Please see an exhausive list below. + +::: seealso +`commandline` docs for details about +command-line parsing and the changes in 5.0. + +Please [let us know](https://github.com/ipython/traitlets/issues) if you +find issues with the new command-line parsing changes. +::: + +We also want to thanks in particular a number of regular contributor +through the years that have patiently waited for their often large +contribution to be available, if **rough** order of number of +contribution: + +- Ryan Morshead - \@rmorshea - For serving as a maintainer of the + 4.x branch and providing a number of bug fix through the years. +- Kostis Anagnostopoulos - \@ankostis - Who push a major refactor of + the CLI paring, as well as many help-generating function. +- Benjamin Ragan-Kelley -- \@minrk -- for reviewing and help fixing + edge case in most of the above +- Matthias Bussonnier -- \@carreau +- Sylvain Corlay +- Francisco de la Peña +- Martin Renou +- Yves Delley +- Thomas Kluyver +- hristian Clauss +- maartenbreddels +- Aliaksei Urbanski +- Kevin Bates +- David Brochart + +As well as many of the passer-by, and less frequent contributors: + +- Tim Paine +- Jake VanderPlas +- Frédéric Chapoton +- Dan Allan +- Adam Chainz +- William Krinsman +- Travis DePrato +- Todd +- Thomas Aarholt +- Lumir Balhar +- Leonardo Uieda +- Leo Gallucci +- Kyle Kelley +- Jeroen Demeyer +- Jason Grout +- Hans Moritz Günther +- FredInChina +- Conner Cowling +- Carol Willing +- Albert Zeyer + +Major changes are: + +- Removal of Python 2 support, +- Removal of Python 3.0-3.6 support +- we now follow NEP 29, and are thus Python 3.7+ only. +- remove `six` as a dependency +- remove `funcsig` as a dependency. +- no longer exposes the following functions / types: + - ClassTypes + - DefaultHandler + - EventHandler + - ForwardDeclaredMixin + - ObserveHandler + - SequenceTypes + - ValidateHandler + - add_article + - class_of + - getargspec + - getmembers + - is_trait + - isidentifier + - repr_type + +Here is a list of most Pull requests that went into 5.0 and a short +description. + +- [#362](https://github.com/ipython/traitlets/pull/362) , [#361](https://github.com/ipython/traitlets/pull/361) introduces: + - help for aliases , aliases dict values can now be a tuple with + ('target', 'help string') + - subcommands can now be arbitrary callable and do not need to be + subclass of `Application` +- [#306](https://github.com/ipython/traitlets/pull/306) Add compatibility with the + `trait` package for Dictionaries and add the `key_trait` parameters + allowing to restrict the type of the key of a mapping. The + constructor parameters `trait` and `traits` are renamed to + `value_trait` and `per_key_traits`. +- [#319](https://github.com/ipython/traitlets/pull/319) adds ability to introduce + both shot and long version of aliases, allowing for short and long + options `-` and `--`. +- [#322](https://github.com/ipython/traitlets/pull/322) rewrite command line argument + parsing to use argparse, and allow more flexibility in assigning + literals without quoting. +- [#332](https://github.com/ipython/traitlets/pull/332) Make it easier to redefined + default values of parents classes. +- [#333](https://github.com/ipython/traitlets/pull/333) introduces a + `Callable` trait. +- [#340](https://github.com/ipython/traitlets/pull/340) Old way of passing containers + in the command line is now deprecated, and will emit warning on the + command line. +- [#341](https://github.com/ipython/traitlets/pull/341) introduces + `--Application.show_config=True` which will make by default any + application show it configuration, all the files it loaded + configuration from, and exit. +- [#349](https://github.com/ipython/traitlets/pull/349) unify ability to declare + default values across traitlets with a singular method `default` + method, and [#525](https://github.com/ipython/traitlets/pull/525) adds a warning + that `Undefined`is deprecated. +- [#355](https://github.com/ipython/traitlets/pull/355) fix a random ordering issues + in command lines flags. +- [#356](https://github.com/ipython/traitlets/pull/356) allow both `self` and `cls` + in `__new__` method for genericity. +- [#360](https://github.com/ipython/traitlets/pull/360) Simplify overwriting and + extending the command line argument parser. +- [#371](https://github.com/ipython/traitlets/pull/371) introduces a + `FuzzyEnum` trait that allow case + insensitive and unique prefix matching. +- [#384](https://github.com/ipython/traitlets/pull/384) Ass a + `trait_values` method to extra a mapping of trait and + their values. +- [#393](https://github.com/ipython/traitlets/pull/393) `Link` now have a + transform attribute (taking two functions inverse of each other), + that affect how a value is mapped between a source and a target. +- [#394](https://github.com/ipython/traitlets/pull/394) `Link` now have a + `link` method to re-link object after + `unlink` has been called. +- [#402](https://github.com/ipython/traitlets/pull/402) rewrite handling of error + messages for nested traits. +- [#405](https://github.com/ipython/traitlets/pull/405) all function that use to + print help now have an equivalent that yields the help lines. +- [#413](https://github.com/ipython/traitlets/pull/413) traits now have a method + `trait_has_value`, returning a boolean to know if a + value has been assigned to a trait (excluding the default), in order + to help avoiding circular validation at initialisation. +- [#416](https://github.com/ipython/traitlets/pull/416) Explicitly export traitlets + in `__all__` to avoid exposing implementation details. +- [#438](https://github.com/ipython/traitlets/pull/438) introduces `.info_rst()` to + let traitlets overwrite the automatically generated rst + documentation. +- [#458](https://github.com/ipython/traitlets/pull/458) Add a sphinx extension to + automatically document options of `Application` instance + in projects using traitlets. +- [#509](https://github.com/ipython/traitlets/pull/509) remove all base `except:` + meaning traitlets will not catch a number of + `BaseException` s anymore. +- [#515](https://github.com/ipython/traitlets/pull/515) Add a class decorator to + enable tab completion of keyword arguments in signature. +- [#516](https://github.com/ipython/traitlets/pull/516) a `Sentinel` Traitlets was + made public by mistake and is now deprecated. +- [#517](https://github.com/ipython/traitlets/pull/517) use parent Logger within + logggin configurable when possible. +- [#522](https://github.com/ipython/traitlets/pull/522) Make loading config files + idempotent and expose the list of loaded config files for long + running services. + +### API changes + +This list is auto-generated by `frappuccino`, comparing with traitlets +4.3.3 API and editied for shortness: + + The following items are new: + + traitlets.Sentinel + + traitlets.config.application.Application.emit_alias_help(self) + + traitlets.config.application.Application.emit_description(self) + + traitlets.config.application.Application.emit_examples(self) + + traitlets.config.application.Application.emit_flag_help(self) + + traitlets.config.application.Application.emit_help(self, classes=False) + + traitlets.config.application.Application.emit_help_epilogue(self, classes) + + traitlets.config.application.Application.emit_options_help(self) + + traitlets.config.application.Application.emit_subcommands_help(self) + + traitlets.config.application.Application.start_show_config(self) + + traitlets.config.application.default_aliases + + traitlets.config.application.default_flags + + traitlets.config.default_aliases + + traitlets.config.default_flags + + traitlets.config.loader.DeferredConfig + + traitlets.config.loader.DeferredConfig.get_value(self, trait) + + traitlets.config.loader.DeferredConfigList + + traitlets.config.loader.DeferredConfigList.get_value(self, trait) + + traitlets.config.loader.DeferredConfigString + + traitlets.config.loader.DeferredConfigString.get_value(self, trait) + + traitlets.config.loader.LazyConfigValue.merge_into(self, other) + + traitlets.config.loader.Undefined + + traitlets.config.loader.class_trait_opt_pattern + + traitlets.traitlets.BaseDescriptor.subclass_init(self, cls) + + traitlets.traitlets.Bool.from_string(self, s) + + traitlets.traitlets.Bytes.from_string(self, s) + + traitlets.traitlets.Callable + + traitlets.traitlets.Callable.validate(self, obj, value) + + traitlets.traitlets.CaselessStrEnum.info(self) + + traitlets.traitlets.CaselessStrEnum.info_rst(self) + + traitlets.traitlets.Complex.from_string(self, s) + + traitlets.traitlets.Container.from_string(self, s) + + traitlets.traitlets.Container.from_string_list(self, s_list) + + traitlets.traitlets.Container.item_from_string(self, s) + + traitlets.traitlets.Dict.from_string(self, s) + + traitlets.traitlets.Dict.from_string_list(self, s_list) + + traitlets.traitlets.Dict.item_from_string(self, s) + + traitlets.traitlets.Enum.from_string(self, s) + + traitlets.traitlets.Enum.info_rst(self) + + traitlets.traitlets.Float.from_string(self, s) + + traitlets.traitlets.FuzzyEnum + + traitlets.traitlets.FuzzyEnum.info(self) + + traitlets.traitlets.FuzzyEnum.info_rst(self) + + traitlets.traitlets.FuzzyEnum.validate(self, obj, value) + + traitlets.traitlets.HasTraits.trait_defaults(self, *names, **metadata) + + traitlets.traitlets.HasTraits.trait_has_value(self, name) + + traitlets.traitlets.HasTraits.trait_values(self, **metadata) + + traitlets.traitlets.Instance.from_string(self, s) + + traitlets.traitlets.Int.from_string(self, s) + + traitlets.traitlets.ObjectName.from_string(self, s) + + traitlets.traitlets.TCPAddress.from_string(self, s) + + traitlets.traitlets.TraitType.default(self, obj='None') + + traitlets.traitlets.TraitType.from_string(self, s) + + traitlets.traitlets.Unicode.from_string(self, s) + + traitlets.traitlets.Union.default(self, obj='None') + + traitlets.traitlets.UseEnum.info_rst(self) + + traitlets.traitlets.directional_link.link(self) + + traitlets.traitlets.link.link(self) + + traitlets.utils.cast_unicode(s, encoding='None') + + traitlets.utils.decorators + + traitlets.utils.decorators.Undefined + + traitlets.utils.decorators.signature_has_traits(cls) + + traitlets.utils.descriptions + + traitlets.utils.descriptions.add_article(name, definite=False, capital=False) + + traitlets.utils.descriptions.class_of(value) + + traitlets.utils.descriptions.describe(article, value, name='None', verbose=False, capital=False) + + traitlets.utils.descriptions.repr_type(obj) + + The following items have been removed (or moved to superclass): + - traitlets.ClassTypes + - traitlets.SequenceTypes + - traitlets.config.absolute_import + - traitlets.config.application.print_function + - traitlets.config.configurable.absolute_import + - traitlets.config.configurable.print_function + - traitlets.config.loader.KeyValueConfigLoader.clear + - traitlets.config.loader.KeyValueConfigLoader.load_config + - traitlets.config.loader.flag_pattern + - traitlets.config.loader.kv_pattern + - traitlets.config.print_function + - traitlets.traitlets.ClassBasedTraitType.error + - traitlets.traitlets.Container.element_error + - traitlets.traitlets.List.validate + - traitlets.traitlets.TraitType.instance_init + - traitlets.traitlets.Union.make_dynamic_default + - traitlets.traitlets.add_article + - traitlets.traitlets.class_of + - traitlets.traitlets.repr_type + - traitlets.utils.getargspec.PY3 + - traitlets.utils.importstring.string_types + - traitlets.warn_explicit + + The following signatures differ between versions: + + - traitlets.config.application.Application.generate_config_file(self) + + traitlets.config.application.Application.generate_config_file(self, classes='None') + + - traitlets.config.application.catch_config_error(method, app, *args, **kwargs) + + traitlets.config.application.catch_config_error(method) + + - traitlets.config.configurable.Configurable.class_config_section() + + traitlets.config.configurable.Configurable.class_config_section(classes='None') + + - traitlets.config.configurable.Configurable.class_get_trait_help(trait, inst='None') + + traitlets.config.configurable.Configurable.class_get_trait_help(trait, inst='None', helptext='None') + + - traitlets.config.loader.ArgParseConfigLoader.load_config(self, argv='None', aliases='None', flags='None') + + traitlets.config.loader.ArgParseConfigLoader.load_config(self, argv='None', aliases='None', flags='', classes='None') + + - traitlets.traitlets.Dict.element_error(self, obj, element, validator) + + traitlets.traitlets.Dict.element_error(self, obj, element, validator, side='Values') + + - traitlets.traitlets.HasDescriptors.setup_instance(self, *args, **kwargs) + + traitlets.traitlets.HasDescriptors.setup_instance(*args, **kwargs) + + - traitlets.traitlets.HasTraits.setup_instance(self, *args, **kwargs) + + traitlets.traitlets.HasTraits.setup_instance(*args, **kwargs) + + - traitlets.traitlets.TraitType.error(self, obj, value) + + traitlets.traitlets.TraitType.error(self, obj, value, error='None', info='None') + +## 4.3 + +## 4.3.2 + +[4.3.2 on GitHub](https://github.com/ipython/traitlets/milestones/4.3.2) + +4.3.2 is a tiny release, relaxing some of the deprecations introduced in +4.3.1: + +- using `_traitname_default()` without + the `@default` decorator is no longer deprecated. +- Passing `config=True` in traitlets constructors is no longer + deprecated. + +## 4.3.1 + +[4.3.1 on GitHub](https://github.com/ipython/traitlets/milestones/4.3.1) + +- Compatibility fix for Python 3.6a1 +- Fix bug in Application.classes getting extra entries when multiple + Applications are instantiated in the same process. + +## 4.3.0 + +[4.3.0 on GitHub](https://github.com/ipython/traitlets/milestones/4.3) + +- Improve the generated config file output. +- Allow TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR env to override + `Application.raise_config_file_errors`, so that config file errors can + result in exiting immediately. +- Avoid using root logger. If no application logger is registered, the + `'traitlets'` logger will be used instead of the root logger. +- Change/Validation arguments are now Bunch objects, allowing + attribute-access, in addition to dictionary access. +- Reduce number of common deprecation messages in certain cases. +- Ensure command-line options always have higher priority than config + files. +- Add bounds on numeric traits. +- Improves various error messages. + +## 4.2 + +## 4.2.2 - 2016-07-01 + +[4.2.2 on GitHub](https://github.com/ipython/traitlets/milestones/4.2.2) + +Partially revert a change in 4.1 that prevented IPython's command-line +options from taking priority over config files. + +## 4.2.1 - 2016-03-14 + +[4.2.1 on GitHub](https://github.com/ipython/traitlets/milestones/4.2.1) + +Demotes warning about unused arguments in `HasTraits.__init__` +introduced in 4.2.0 to DeprecationWarning. + +## 4.2.0 - 2016-03-14 + +[4.2 on GitHub](https://github.com/ipython/traitlets/milestones/4.2) + +- `JSONFileConfigLoader` can be used + as a context manager for updating configuration. +- If a value in config does not map onto a configurable trait, a + message is displayed that the value will have no effect. +- Unused arguments are passed to `super()` in `HasTraits.__init__`, + improving support for multiple inheritance. +- Various bugfixes and improvements in the new API introduced in 4.1. +- Application subclasses may specify `raise_config_file_errors = True` + to exit on failure to load config files, instead of the default of + logging the failures. + +## 4.1 - 2016-01-15 + +[4.1 on GitHub](https://github.com/ipython/traitlets/milestones/4.1) + +Traitlets 4.1 introduces a totally new decorator-based API for +configuring traitlets. Highlights: + +- Decorators are used, rather than magic method names, for registering + trait-related methods. See `using_traitlets` and `migration` for more + info. +- Deprecate `Trait(config=True)` in favor of + `Trait().tag(config=True)`. In general, metadata is added via `tag` + instead of the constructor. + +Other changes: + +- Trait attributes initialized with `read_only=True` can only be set + with the `set_trait` method. Attempts to directly modify a read-only + trait attribute raises a `TraitError`. +- The directional link now takes an optional `transform` + attribute allowing the modification of the value. +- Various fixes and improvements to config-file generation (fixed + ordering, Undefined showing up, etc.) +- Warn on unrecognized traits that aren't configurable, to avoid + silently ignoring mistyped config. + +## 4.0 - 2015-06-19 + +[4.0 on GitHub](https://github.com/ipython/traitlets/milestones/4.0) + +First release of traitlets as a standalone package. diff --git a/docs/requirements.txt b/docs/requirements.txt index 7089a5a7..f9d5d75b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ -e ../. +myst-parser +pydata-sphinx-theme Sphinx -sphinx_rtd_theme diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst deleted file mode 100644 index fc7994b9..00000000 --- a/docs/source/changelog.rst +++ /dev/null @@ -1,489 +0,0 @@ -Changes in Traitlets -==================== - -Traitlets 5.4 -------------- - -5.4.0 -***** - - - Fix version_info - - Make generated config files more lintable - - Fix union trait from string - - Add security.md, and tidelift bage - -Traitlets 5.3 -------------- - -5.3.0 -***** - - - Fix traitlet name in docstring - - Re-support multiple-alias key for ArgParseConfigLoader - -Traitlets 5.2 -------------- - -5.2.2 -***** - - - Make ``traitlets.__all__`` explicit and validate in test. - - Fix ``KeyError`` in ``Application.get_default_logging_config``. - -5.2.1 -***** - - - logging: Don't attempt to close handlers unless they have been opened. - Fixes ``ValueError: Unable to configure formatter 'console'`` traceback. - -5.2.0 -***** - -Traitlets 5.2 brings a couple of updates and changes to traitlets, and is -recommended for all users. What follows is a non-exhaustive list of changes: - - - Application: add logging_config trait. - - Disambiguate the use of the term value in the example. - - Add mypy typing support. - - DOC: Add log example. - - Internal cleanup: linters, autoformatters, CI. - -Traitlets 5.1 -------------- - -5.1.1 -***** - -5.1.1 fixes compatibility issues with Python 3.10 (rc2). - -5.1.0 -***** - -Traitlets 5.1 brings a couple of updates and changes to traitlets, and is -recommended for all users. What follow is a non-exhaustive list of changes: - - - Removal of the ``ipython_genutils`` dependency, this should remove any direct - and indirect reliance on ``nose`` and prepare traitlets 5.1 for Python 3.10 - and above compatibility, some test suite changes also accommodate Python 3.10 changes. - If you package traitlets downstream, make sure to remove this dependency. - - - Removal of ``ipython_genutils`` may have change the default encoding detected - for the command line argument parsing when not utf-8. We expect this to - affect a small portion of older windows version. If you encounter issue let - us know. - - - Stop recommendation of ``CUnicode`` in some circumstances as it's - deprecated. - - - Our test suite is now using GitHub action instead of travis CI. If you are - packaging downstream using the git repository, you may have to exclude the - ``.github`` folder now, and can remove exclusion of - - - It fixes a parsing issue for list of one single element on the CLI. - - - We reserve the right to remove official support for Python 3.7 in subsequent - minor revisions. - - -Traitlets 5.0 -------------- - -5.0.5 -***** - -- Support deprecated literals for sets, tuples on the command-line: ``nbconvert --TagRemovePreprocessor.remove_cell_tags='{"tag"}'`` -- Fix ``from_string_list`` for Tuples in general -- Fix support for ``List(default_value=None, allow_none=True)`` and other Container traits -- Fix help output for nested aliases and tuple traits - -5.0.4 -***** - -- Support deprecated use of byte-literals for bytes on the command-line: - ``ipython kernel --Session.key="b'abc'"``. The `b` prefix is no longer needed - in traitlets 5.0, but is supported for backward-compatibility -- Improve output of configuration errors, especially when help output would make it hard to find the helpful error message - -5.0.3 -***** - -- Fix regression in handling `--opt=None` on the CLI for configurable traits - with `allow_none=True` - -5.0.2 -***** - -- Fix casting bytes to unicode - -5.0.0 -***** - - -(This is an in-progress changelog, please let us know if something is missing/or could be phrased better) - -Traitlets 5.0 is a new version of traitlets that accumulate changes over a period of more close to four years; A number of -internal refactoring made the internal code structure cleaner and simpler, and greatly improved the diagnostic error -messages as well has help and documentation generation. - -We expect no code change needed for any consumer of the Python API (ipywidgets, and alike), -though CLI argument parsing have seen a complete rewrite, -so if you have an application that does use the parsing logic of traitlets you may see changes in behavior, -and now have access to more features. There was also a cleanup of what was considered a part of the public API, -certain previously exposed utility functions and types are no longer available. Please see an exhausive list below. - -.. seealso:: - - :ref:`commandline` for details about command-line parsing and the changes in 5.0. - - Please `let us know `__ - if you find issues with the new command-line parsing changes. - -We also want to thanks in particular a number of regular contributor through the years that have patiently waited for -their often large contribution to be available, if **rough** order of number of contribution: - - - Ryan Morshead - @rmorshea - For serving as a maintainer of the 4.x branch and providing a number of bug fix through - the years. - - Kostis Anagnostopoulos - @ankostis - Who push a major refactor of the CLI paring, as well as many help-generating - function. - - Benjamin Ragan-Kelley – @minrk – for reviewing and help fixing edge case in most of the above - - Matthias Bussonnier – @carreau - - Sylvain Corlay - - Francisco de la Peña - - Martin Renou - - Yves Delley - - Thomas Kluyver - - hristian Clauss - - maartenbreddels - - Aliaksei Urbanski - - Kevin Bates - - David Brochart - -As well as many of the passer-by, and less frequent contributors: - - - Tim Paine - - Jake VanderPlas - - Frédéric Chapoton - - Dan Allan - - Adam Chainz - - William Krinsman - - Travis DePrato - - Todd - - Thomas Aarholt - - Lumir Balhar - - Leonardo Uieda - - Leo Gallucci - - Kyle Kelley - - Jeroen Demeyer - - Jason Grout - - Hans Moritz Günther - - FredInChina - - Conner Cowling - - Carol Willing - - Albert Zeyer - - -Major changes are: - - - Removal of Python 2 support, - - Removal of Python 3.0-3.6 support - - we now follow NEP 29, and are thus Python 3.7+ only. - - remove ``six`` as a dependency - - remove ``funcsig`` as a dependency. - - no longer exposes the following functions / types: - - - ClassTypes - - DefaultHandler - - EventHandler - - ForwardDeclaredMixin - - ObserveHandler - - SequenceTypes - - ValidateHandler - - add_article - - class_of - - getargspec - - getmembers - - is_trait - - isidentifier - - repr_type - - - -Here is a list of most Pull requests that went into 5.0 and a short description. - -- :ghpull:`362` , :ghpull:`361` introduces: - - help for aliases , aliases dict values can now be a tuple with ('target', 'help string') - - subcommands can now be arbitrary callable and do not need to be subclass of :any:`Application` -- :ghpull:`306` Add compatibility with the ``trait`` package for Dictionaries and add the ``key_trait`` parameters - allowing to restrict the type of the key of a mapping. The constructor parameters ``trait`` and ``traits`` are renamed - to ``value_trait`` and ``per_key_traits``. -- :ghpull:`319` adds ability to introduce both shot and long version of aliases, allowing for short and long options ``-`` and ``--``. -- :ghpull:`322` rewrite command line argument parsing to use argparse, and allow more flexibility in assigning literals without quoting. -- :ghpull:`332` Make it easier to redefined default values of parents classes. -- :ghpull:`333` introduces a :any:`Callable` trait. -- :ghpull:`340` Old way of passing containers in the command line is now deprecated, and will emit warning on the command line. -- :ghpull:`341` introduces ``--Application.show_config=True`` which will make by default any application show it configuration, all the files it loaded configuration from, and exit. -- :ghpull:`349` unify ability to declare default values across traitlets with a singular method ``default`` method, and :ghpull:`525` adds a warning that `Undefined` is deprecated. -- :ghpull:`355` fix a random ordering issues in command lines flags. -- :ghpull:`356` allow both ``self`` and ``cls`` in ``__new__`` method for genericity. -- :ghpull:`360` Simplify overwriting and extending the command line argument parser. -- :ghpull:`371` introduces a :any:`FuzzyEnum` trait that allow case insensitive and unique prefix matching. -- :ghpull:`384` Ass a `trait_values` method to extra a mapping of trait and their values. -- :ghpull:`393` `Link` now have a transform attribute (taking two functions inverse of each other), that affect how a - value is mapped between a source and a target. -- :ghpull:`394` `Link` now have a `link` method to re-link object after `unlink` has been called. -- :ghpull:`402` rewrite handling of error messages for nested traits. -- :ghpull:`405` all function that use to print help now have an equivalent that yields the help lines. -- :ghpull:`413` traits now have a method `trait_has_value`, returning a boolean to know if a value has been assigned to - a trait (excluding the default), in order to help avoiding circular validation at initialisation. -- :ghpull:`416` Explicitly export traitlets in ``__all__`` to avoid exposing implementation details. -- :ghpull:`438` introduces ``.info_rst()`` to let traitlets overwrite the automatically generated rst documentation. -- :ghpull:`458` Add a sphinx extension to automatically document options of `Application` instance in projects using traitlets. -- :ghpull:`509` remove all base ``except:`` meaning traitlets will not catch a number of :any:`BaseException` s anymore. -- :ghpull:`515` Add a class decorator to enable tab completion of keyword arguments in signature. -- :ghpull:`516` a ``Sentinel`` Traitlets was made public by mistake and is now deprecated. -- :ghpull:`517` use parent Logger within logggin configurable when possible. -- :ghpull:`522` Make loading config files idempotent and expose the list of loaded config files for long running services. - - -API changes -*********** - -This list is auto-generated by ``frappuccino``, comparing with traitlets 4.3.3 API and editied for shortness:: - - - - The following items are new: - + traitlets.Sentinel - + traitlets.config.application.Application.emit_alias_help(self) - + traitlets.config.application.Application.emit_description(self) - + traitlets.config.application.Application.emit_examples(self) - + traitlets.config.application.Application.emit_flag_help(self) - + traitlets.config.application.Application.emit_help(self, classes=False) - + traitlets.config.application.Application.emit_help_epilogue(self, classes) - + traitlets.config.application.Application.emit_options_help(self) - + traitlets.config.application.Application.emit_subcommands_help(self) - + traitlets.config.application.Application.start_show_config(self) - + traitlets.config.application.default_aliases - + traitlets.config.application.default_flags - + traitlets.config.default_aliases - + traitlets.config.default_flags - + traitlets.config.loader.DeferredConfig - + traitlets.config.loader.DeferredConfig.get_value(self, trait) - + traitlets.config.loader.DeferredConfigList - + traitlets.config.loader.DeferredConfigList.get_value(self, trait) - + traitlets.config.loader.DeferredConfigString - + traitlets.config.loader.DeferredConfigString.get_value(self, trait) - + traitlets.config.loader.LazyConfigValue.merge_into(self, other) - + traitlets.config.loader.Undefined - + traitlets.config.loader.class_trait_opt_pattern - + traitlets.traitlets.BaseDescriptor.subclass_init(self, cls) - + traitlets.traitlets.Bool.from_string(self, s) - + traitlets.traitlets.Bytes.from_string(self, s) - + traitlets.traitlets.Callable - + traitlets.traitlets.Callable.validate(self, obj, value) - + traitlets.traitlets.CaselessStrEnum.info(self) - + traitlets.traitlets.CaselessStrEnum.info_rst(self) - + traitlets.traitlets.Complex.from_string(self, s) - + traitlets.traitlets.Container.from_string(self, s) - + traitlets.traitlets.Container.from_string_list(self, s_list) - + traitlets.traitlets.Container.item_from_string(self, s) - + traitlets.traitlets.Dict.from_string(self, s) - + traitlets.traitlets.Dict.from_string_list(self, s_list) - + traitlets.traitlets.Dict.item_from_string(self, s) - + traitlets.traitlets.Enum.from_string(self, s) - + traitlets.traitlets.Enum.info_rst(self) - + traitlets.traitlets.Float.from_string(self, s) - + traitlets.traitlets.FuzzyEnum - + traitlets.traitlets.FuzzyEnum.info(self) - + traitlets.traitlets.FuzzyEnum.info_rst(self) - + traitlets.traitlets.FuzzyEnum.validate(self, obj, value) - + traitlets.traitlets.HasTraits.trait_defaults(self, *names, **metadata) - + traitlets.traitlets.HasTraits.trait_has_value(self, name) - + traitlets.traitlets.HasTraits.trait_values(self, **metadata) - + traitlets.traitlets.Instance.from_string(self, s) - + traitlets.traitlets.Int.from_string(self, s) - + traitlets.traitlets.ObjectName.from_string(self, s) - + traitlets.traitlets.TCPAddress.from_string(self, s) - + traitlets.traitlets.TraitType.default(self, obj='None') - + traitlets.traitlets.TraitType.from_string(self, s) - + traitlets.traitlets.Unicode.from_string(self, s) - + traitlets.traitlets.Union.default(self, obj='None') - + traitlets.traitlets.UseEnum.info_rst(self) - + traitlets.traitlets.directional_link.link(self) - + traitlets.traitlets.link.link(self) - + traitlets.utils.cast_unicode(s, encoding='None') - + traitlets.utils.decorators - + traitlets.utils.decorators.Undefined - + traitlets.utils.decorators.signature_has_traits(cls) - + traitlets.utils.descriptions - + traitlets.utils.descriptions.add_article(name, definite=False, capital=False) - + traitlets.utils.descriptions.class_of(value) - + traitlets.utils.descriptions.describe(article, value, name='None', verbose=False, capital=False) - + traitlets.utils.descriptions.repr_type(obj) - - The following items have been removed (or moved to superclass): - - traitlets.ClassTypes - - traitlets.SequenceTypes - - traitlets.config.absolute_import - - traitlets.config.application.print_function - - traitlets.config.configurable.absolute_import - - traitlets.config.configurable.print_function - - traitlets.config.loader.KeyValueConfigLoader.clear - - traitlets.config.loader.KeyValueConfigLoader.load_config - - traitlets.config.loader.flag_pattern - - traitlets.config.loader.kv_pattern - - traitlets.config.print_function - - traitlets.traitlets.ClassBasedTraitType.error - - traitlets.traitlets.Container.element_error - - traitlets.traitlets.List.validate - - traitlets.traitlets.TraitType.instance_init - - traitlets.traitlets.Union.make_dynamic_default - - traitlets.traitlets.add_article - - traitlets.traitlets.class_of - - traitlets.traitlets.repr_type - - traitlets.utils.getargspec.PY3 - - traitlets.utils.importstring.string_types - - traitlets.warn_explicit - - The following signatures differ between versions: - - - traitlets.config.application.Application.generate_config_file(self) - + traitlets.config.application.Application.generate_config_file(self, classes='None') - - - traitlets.config.application.catch_config_error(method, app, *args, **kwargs) - + traitlets.config.application.catch_config_error(method) - - - traitlets.config.configurable.Configurable.class_config_section() - + traitlets.config.configurable.Configurable.class_config_section(classes='None') - - - traitlets.config.configurable.Configurable.class_get_trait_help(trait, inst='None') - + traitlets.config.configurable.Configurable.class_get_trait_help(trait, inst='None', helptext='None') - - - traitlets.config.loader.ArgParseConfigLoader.load_config(self, argv='None', aliases='None', flags='None') - + traitlets.config.loader.ArgParseConfigLoader.load_config(self, argv='None', aliases='None', flags='', classes='None') - - - traitlets.traitlets.Dict.element_error(self, obj, element, validator) - + traitlets.traitlets.Dict.element_error(self, obj, element, validator, side='Values') - - - traitlets.traitlets.HasDescriptors.setup_instance(self, *args, **kwargs) - + traitlets.traitlets.HasDescriptors.setup_instance(*args, **kwargs) - - - traitlets.traitlets.HasTraits.setup_instance(self, *args, **kwargs) - + traitlets.traitlets.HasTraits.setup_instance(*args, **kwargs) - - - traitlets.traitlets.TraitType.error(self, obj, value) - + traitlets.traitlets.TraitType.error(self, obj, value, error='None', info='None') - - - -4.3 ---- - -4.3.2 -***** - -`4.3.2 on GitHub`_ - -4.3.2 is a tiny release, relaxing some of the deprecations introduced in 4.3.1: - -- using :meth:`_traitname_default()` without the ``@default`` decorator is no longer - deprecated. -- Passing ``config=True`` in traitlets constructors is no longer deprecated. - -4.3.1 -***** - -`4.3.1 on GitHub`_ - -- Compatibility fix for Python 3.6a1 -- Fix bug in Application.classes getting extra entries when multiple Applications are instantiated in the same process. - -4.3.0 -***** - -`4.3.0 on GitHub`_ - -- Improve the generated config file output. -- Allow TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR env to override :attr:`Application.raise_config_file_errors`, - so that config file errors can result in exiting immediately. -- Avoid using root logger. If no application logger is registered, - the ``'traitlets'`` logger will be used instead of the root logger. -- Change/Validation arguments are now Bunch objects, allowing attribute-access, - in addition to dictionary access. -- Reduce number of common deprecation messages in certain cases. -- Ensure command-line options always have higher priority than config files. -- Add bounds on numeric traits. -- Improves various error messages. - - -4.2 ---- - -4.2.2 - 2016-07-01 -****************** - -`4.2.2 on GitHub`_ - -Partially revert a change in 4.1 that prevented IPython's command-line options from taking priority over config files. - - -4.2.1 - 2016-03-14 -****************** - -`4.2.1 on GitHub`_ - -Demotes warning about unused arguments in ``HasTraits.__init__`` introduced in 4.2.0 to DeprecationWarning. - -4.2.0 - 2016-03-14 -****************** - -`4.2 on GitHub`_ - -- :class:`JSONFileConfigLoader` can be used as a context manager for updating configuration. -- If a value in config does not map onto a configurable trait, - a message is displayed that the value will have no effect. -- Unused arguments are passed to ``super()`` in ``HasTraits.__init__``, - improving support for multiple inheritance. -- Various bugfixes and improvements in the new API introduced in 4.1. -- Application subclasses may specify ``raise_config_file_errors = True`` - to exit on failure to load config files, - instead of the default of logging the failures. - - -4.1 - 2016-01-15 ----------------- - -`4.1 on GitHub`_ - -Traitlets 4.1 introduces a totally new decorator-based API for configuring traitlets. -Highlights: - -- Decorators are used, rather than magic method names, for registering trait-related methods. See :doc:`using_traitlets` and :doc:`migration` for more info. -- Deprecate ``Trait(config=True)`` in favor of ``Trait().tag(config=True)``. In general, metadata is added via ``tag`` instead of the constructor. - -Other changes: - -- Trait attributes initialized with ``read_only=True`` can only be set with the ``set_trait`` method. - Attempts to directly modify a read-only trait attribute raises a ``TraitError``. -- The directional link now takes an optional `transform` attribute allowing the modification of the value. -- Various fixes and improvements to config-file generation (fixed ordering, Undefined showing up, etc.) -- Warn on unrecognized traits that aren't configurable, to avoid silently ignoring mistyped config. - - -4.0 - 2015-06-19 ----------------- - -`4.0 on GitHub`_ - -First release of traitlets as a standalone package. - - - -.. _`4.0 on GitHub`: https://github.com/ipython/traitlets/milestones/4.0 -.. _`4.1 on GitHub`: https://github.com/ipython/traitlets/milestones/4.1 -.. _`4.2 on GitHub`: https://github.com/ipython/traitlets/milestones/4.2 -.. _`4.2.1 on GitHub`: https://github.com/ipython/traitlets/milestones/4.2.1 -.. _`4.2.2 on GitHub`: https://github.com/ipython/traitlets/milestones/4.2.2 -.. _`4.3.0 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3 -.. _`4.3.1 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3.1 -.. _`4.3.2 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3.2 diff --git a/docs/source/conf.py b/docs/source/conf.py index dd22222e..1193912a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,8 +16,12 @@ # serve to show the default. import os +import shutil import sys +HERE = os.path.abspath(os.path.dirname(__file__)) +ROOT = os.path.abspath(os.path.join("../../", HERE)) + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -26,7 +30,11 @@ # We load the ipython release info into a dict by explicit execution _release = {} # type:ignore exec( - compile(open("../../traitlets/_version.py").read(), "../../traitlets/_version.py", "exec"), + compile( + open(os.path.join(ROOT, "traitlets/_version.py")).read(), + "../../traitlets/_version.py", + "exec", + ), _release, ) @@ -38,8 +46,9 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -sys.path.insert(0, os.path.abspath("../sphinxext")) +sys.path.insert(0, os.path.abspath(os.path.join(HERE, "sphinxext"))) extensions = [ + "myst-parser", "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", @@ -139,7 +148,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# html_theme = 'alabaster' +html_theme = "pydata_sphinx_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -314,13 +323,7 @@ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {"https://docs.python.org/": None} -# Read The Docs -# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org -on_rtd = os.environ.get("READTHEDOCS", None) == "True" - -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme # type:ignore[import] - html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -# otherwise, readthedocs.org uses their theme by default, so no need to specify it +def setup(app): + dest = os.path.join(HERE, "other", "changelog.md") + shutil.copy(os.path.join(HERE, "..", "..", "CHANGELOG.md"), dest) From 510ad9900fe3faaccf39ef08babafcd314adfd39 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 06:23:00 -0500 Subject: [PATCH 2/4] more docs cleanup --- .github/workflows/tests.yml | 13 +++ .gitignore | 1 + docs/environment.yml | 8 -- docs/source/conf.py | 18 ++-- docs/source/stats.rst | 167 ------------------------------------ docs/source/utils.rst | 1 + pyproject.toml | 5 ++ readthedocs.yml | 16 ++-- 8 files changed, 40 insertions(+), 189 deletions(-) delete mode 100644 docs/environment.yml delete mode 100644 docs/source/stats.rst diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b181e7ed..96a817fe 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,6 +62,19 @@ jobs: - name: Run the unit tests run: pytest -vv -W default traitlets || pytest -vv -W default traitlets --lf + docs: + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Install the Python dependencies + run: | + pip install -e .[docs] + - name: Build the docs + run: | + make -C docs html SPHINXOPTS='-W' + test_prereleases: name: Test Prereleases timeout-minutes: 10 diff --git a/.gitignore b/.gitignore index 8c8170e2..6fae1b19 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ __pycache__ .coverage .cache htmlcov +docs/source/CHANGELOG.md diff --git a/docs/environment.yml b/docs/environment.yml deleted file mode 100644 index 2fc2bdc2..00000000 --- a/docs/environment.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: traitlets -channels: - - conda-forge - - conda -dependencies: - - python=3 - - sphinx - - sphinx_rtd_theme diff --git a/docs/source/conf.py b/docs/source/conf.py index 1193912a..dd6e79d9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,11 +16,12 @@ # serve to show the default. import os +import os.path as osp import shutil import sys -HERE = os.path.abspath(os.path.dirname(__file__)) -ROOT = os.path.abspath(os.path.join("../../", HERE)) +HERE = osp.abspath(osp.dirname(__file__)) +ROOT = osp.dirname(osp.dirname(HERE)) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -31,7 +32,7 @@ _release = {} # type:ignore exec( compile( - open(os.path.join(ROOT, "traitlets/_version.py")).read(), + open(osp.join(ROOT, "traitlets/_version.py")).read(), "../../traitlets/_version.py", "exec", ), @@ -46,13 +47,12 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -sys.path.insert(0, os.path.abspath(os.path.join(HERE, "sphinxext"))) +sys.path.insert(0, osp.abspath(osp.join(HERE, "sphinxext"))) extensions = [ - "myst-parser", + "myst_parser", "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", - "github", # for easy GitHub links ] github_project_url = "https://github.com/ipython/traitlets" @@ -99,7 +99,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -325,5 +325,5 @@ def setup(app): - dest = os.path.join(HERE, "other", "changelog.md") - shutil.copy(os.path.join(HERE, "..", "..", "CHANGELOG.md"), dest) + dest = osp.join(HERE, "changelog.md") + shutil.copy(osp.join(HERE, "..", "..", "CHANGELOG.md"), dest) diff --git a/docs/source/stats.rst b/docs/source/stats.rst deleted file mode 100644 index edbb6877..00000000 --- a/docs/source/stats.rst +++ /dev/null @@ -1,167 +0,0 @@ -We closed 5 issues and merged 115 pull requests. -The full list can be seen `on GitHub `__ - -The following 34 authors contributed 465 commits. - -* Adam Chainz -* Albert Zeyer -* Aliaksei Urbanski -* Benjamin Ragan-Kelley -* Carol Willing -* Christian Clauss -* Conner Cowling -* Dan Allan -* David Brochart -* Francisco de la Peña -* Frédéric Chapoton -* Hans Moritz Günther -* Jake VanderPlas -* Jason Grout -* Jeroen Demeyer -* Kevin Bates -* Kostis Anagnostopoulos -* Kyle Kelley -* Leo Gallucci -* Leonardo Uieda -* Lumir Balhar -* maartenbreddels -* martinRenou -* Matthias Bussonnier -* Ryan Morshead -* Sylvain Corlay -* Thomas Aarholt -* Thomas Kluyver -* Tim Paine -* Todd -* Travis DePrato -* Vidar Tonaas Fauske -* William Krinsman -* Yves Delley - -GitHub issues and pull requests: - -Pull Requests (115): - -* :ghpull:`576`: more removal of Python 2 specificity -* :ghpull:`575`: finish first pass on whats new -* :ghpull:`574`: more version_info removal -* :ghpull:`573`: Some removal of Python 2 compatibility (in particular six) -* :ghpull:`572`: review a few more PRs. -* :ghpull:`570`: review more PRs changelog and reorder -* :ghpull:`571`: remove PY2 compat + isort + pyupgrade + darker -* :ghpull:`567`: fixup changelog -* :ghpull:`566`: Changelog part 1 -* :ghpull:`565`: Fix doc formatting. -* :ghpull:`563`: Stop testing traittypes which fails. -* :ghpull:`562`: Travis CI: Fix Travis build configuration validation issues -* :ghpull:`561`: Travis CI: Run tests on Python 3.8, not 3.7 -* :ghpull:`543`: Travis CI: Test the current versions of Python -* :ghpull:`531`: Update myapp.py -* :ghpull:`546`: Export Bunch -* :ghpull:`547`: Unpin Python 3.5 for docs -* :ghpull:`559`: Start testing on current Python versions. -* :ghpull:`556`: add callable test for master -* :ghpull:`542`: typo -* :ghpull:`515`: Add trait-names autocompletion support -* :ghpull:`529`: Minor addition to docs -* :ghpull:`528`: Fix formatting. -* :ghpull:`526`: Fix tests for ipywidgets -* :ghpull:`525`: Fix backward compatibility and tests -* :ghpull:`522`: Expose loaded config files, make load idempotent -* :ghpull:`524`: Fix SyntaxWarning: "is" with a literal. -* :ghpull:`523`: DOC: Add Callable to docs. -* :ghpull:`509`: do not catch system exceptions like KeyboardInterrupt -* :ghpull:`501`: Preserve Class Repr After ``add_traits`` -* :ghpull:`517`: Use log from parent in LoggingConfigurable. -* :ghpull:`516`: Fix CI -* :ghpull:`510`: remove one useless return line -* :ghpull:`493`: Include LICENSE file in wheels -* :ghpull:`491`: Add missing ``default`` import to run the example -* :ghpull:`489`: Update link to enthought trait library -* :ghpull:`484`: Add imports to "Using Traitlets" docs -* :ghpull:`482`: Fix copy(HasTraits) by copying ``_trait_values`` dict -* :ghpull:`483`: Appveyor has started failing when upgrading ``pip`` -* :ghpull:`473`: test some downstream projects -* :ghpull:`464`: Drop dependency on decorator package -* :ghpull:`462`: drop Python 3.3, update to use 3.6 -* :ghpull:`458`: Add Sphinx extension and autogen function for documenting config options -* :ghpull:`453`: Remove extra backtics from class link -* :ghpull:`407`: fix flags & aliases with the same name -* :ghpull:`438`: fix(help): finish #381 for RsT to print enum-choices -* :ghpull:`393`: Link tranform -* :ghpull:`440`: Fix getting class for deprecation warning -* :ghpull:`436`: Fix overriding ``_trait_default`` method -* :ghpull:`437`: Don't call notify_change with non-change events -* :ghpull:`434`: disable cross-validation of defaults -* :ghpull:`413`: Has Trait Value Method -* :ghpull:`416`: whitelist traitlets exports -* :ghpull:`426`: Explain the casing/substring matching of Enums on help-msgs and errors -* :ghpull:`424`: refact(log): consolidate some duplicate log statements -* :ghpull:`430`: Fix parsing of deprecated list options failing with empty strings -* :ghpull:`433`: fix(help): a yield had been forgotten from #405 -* :ghpull:`422`: fix(help): minor typo in print_examples() -* :ghpull:`420`: BUG: remove redundant call to List.validate_elements -* :ghpull:`418`: remove incorrect version arg from json config doc -* :ghpull:`415`: follow mro for trait default generators -* :ghpull:`414`: fix instance error message -* :ghpull:`402`: Better Errors for Nested Traits -* :ghpull:`405`: feat(app): provide help-functions also as generators of text-lines -* :ghpull:`406`: update pip before install -* :ghpull:`404`: Tell about help-all last. -* :ghpull:`371`: New FuzzyEnum trait that matches case-insensitive prefixes/substrings -* :ghpull:`392`: style(cfg): apply review items in #385 for gen-config -* :ghpull:`384`: add ``trait_values`` method -* :ghpull:`399`: test on appveyor -* :ghpull:`391`: Suppress Redundant Configurable Validation -* :ghpull:`341`: add Application.show_config[_json] -* :ghpull:`396`: Ensure config loader tests include unicode -* :ghpull:`394`: Add link method to link and dlink -* :ghpull:`398`: explain which singleton is already instanciated -* :ghpull:`385`: generate all config, not just new traits on each class -* :ghpull:`383`: notify on default creation -* :ghpull:`381`: feat(cfg): write also enum choices when generating config.py files -* :ghpull:`257`: [WIP] make This inherit from Instance and add ThisType -* :ghpull:`380`: feat(app): iterate Configurable base-classes for non ``app.classes`` lists -* :ghpull:`368`: README: Addd links-table from index, improve opening -* :ghpull:`365`: FIX: KVConfigLoader could not handle lone dashes('-') as extra arguments -* :ghpull:`364`: Re-enable TC-code for subcmds forgotten by #362 -* :ghpull:`367`: Fix a bug in TraitType.default -* :ghpull:`362`: Support callable subcommands -* :ghpull:`361`: help: Alias overriding help-text (like flags), options list human-help before automated infos -* :ghpull:`360`: Add factory method on Application for customizing the Loader parsing cmd-line args -* :ghpull:`354`: Improve generated help and config messages -* :ghpull:`359`: Pin docs build to Python 3.5 -* :ghpull:`356`: Allow "cls" and "self" as keyword argument in __new__ -* :ghpull:`346`: invert class/instance initialize priority in union "subtraits" -* :ghpull:`347`: test union valdiation priority -* :ghpull:`353`: Don't warn about correctly decorated default-value generators -* :ghpull:`355`: Merge class config dicts when flattening flags -* :ghpull:`350`: further clarify Dict docstring -* :ghpull:`306`: added a key_trait argument to Dict -* :ghpull:`340`: reintroduce deprecated support for old-style container args -* :ghpull:`338`: [proposal] Make new argparse container CLI opt-in -* :ghpull:`349`: Consolidated TraitType Defaults Into One Generator -* :ghpull:`343`: Any should allow None by default -* :ghpull:`332`: Create All Default Values With Generators -* :ghpull:`337`: Enable deprecation warnings during test-suite. -* :ghpull:`339`: nicer repr of LazyConfigValues -* :ghpull:`333`: Add a Callable Trait -* :ghpull:`322`: Use argparse to configure container-traits from command-line -* :ghpull:`331`: Update examples to use an IPython config option which still exists -* :ghpull:`330`: Convert readthedocs links for their .org -> .io migration for hosted projects -* :ghpull:`329`: setup.py - set url to github repo -* :ghpull:`319`: app: support flags/aliases given as (--long, -short) tuple -* :ghpull:`320`: docs: Move changelog as /CHANGES.rst -* :ghpull:`324`: Add more cross-validation examples -* :ghpull:`323`: use simpler callable check for meta_eval -* :ghpull:`316`: Test on nightly and allow_failure. -* :ghpull:`299`: casting traits inherit from mixin -* :ghpull:`311`: use pip_install in readthedocs.yml - -Issues (5): - -* :ghissue:`287`: Default values are not cross-validated with ``@validation`` -* :ghissue:`363`: Traitlets master breaks ipywidgets -* :ghissue:`417`: buggy recommendation for version param in json config traitlets/docs/source/config.rst -* :ghissue:`342`: Test failures in jack-of-none -* :ghissue:`256`: how to extend dynamic defaults with super diff --git a/docs/source/utils.rst b/docs/source/utils.rst index 1e2d3143..76c8b419 100644 --- a/docs/source/utils.rst +++ b/docs/source/utils.rst @@ -2,6 +2,7 @@ Utils ===== .. module:: traitlets + :noindex: A simple utility to import something by its string name. diff --git a/pyproject.toml b/pyproject.toml index 2736ed79..0c333bb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,11 @@ dynamic = ["description", "version"] [project.optional-dependencies] test = ["pytest", "pre-commit"] +docs = [ + "myst-parser", + "pydata-sphinx-theme", + "sphinx" +] [tool.hatch.version] path = "traitlets/_version.py" diff --git a/readthedocs.yml b/readthedocs.yml index 115fc4f2..5062fcd5 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,8 +1,14 @@ -conda: - file: docs/environment.yml -python: - version: 3 - pip_install: true +version: 2 +sphinx: + configuration: docs/source/conf.py formats: - epub - pdf +python: + version: 3.8 + install: + # install itself with pip install . + - method: pip + path: . + extra_requirements: + - docs From 48c3cdd56ff5e9ff9e38ed8abe7aeddd6560419b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 06:30:30 -0500 Subject: [PATCH 3/4] lint --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index dd6e79d9..1f74bd82 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,7 +15,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import os import os.path as osp import shutil import sys From 3e7abaefa24082fd545d39702bfead89b12e15a1 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Sat, 8 Oct 2022 06:37:44 -0500 Subject: [PATCH 4/4] remove unused reqs file --- docs/requirements.txt | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index f9d5d75b..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ --e ../. -myst-parser -pydata-sphinx-theme -Sphinx