Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Scheduled monthly dependency update for April #83

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Apr 1, 2024

Update dateparser from 0.7.0 to 1.2.0.

Changelog

1.2.0

------------------

New features:

- New ``PREFER_MONTH_OF_YEAR`` setting (1146)

Fixes:

- Absolute years in Russian are no longer being treated as a number of years in
the past (1129)

Cleanups and internal improvements:

- Removed the use of ``datetime.utcnow``, deprecated on Python 3.12 (1179)
- Applied Black formatting to the code base (1158)
- Initial integration with OSSFuzz (1198)
- Extended test cases (1191)

1.1.8

------------------

Improvements:

- Improved date parsing for Chinese (1148)
- Improved date parsing for Czech (1151)
- Reorder language by popularity (1152)
- Fix leak of memory in cache (1140)
- Add support for "\d units later" (1154)
- Move modification in CLDR data to yaml (1153)
- Add support to use timezone via settings to get PREFER_DATES_FROM result (1155)

1.1.7

------------------

Improvements:

- Add an “ago” synonym for Arabic (1128)
- Improved date parsing for Czech (1131)
- Improved date parsing for Indonesian (1134)

1.1.6

------------------

Improvements:

- Fix the bug where Monday is parsed as a month (1121)
- Prevent ReDoS in Spanish sentence splitting regex (1084)

1.1.5

------------------

Improvements:

- Parse short versions of day, month, and year (1103)
- Add a test for “in 1d” (1104)
- Update languages_info (1107)
- Add a workaround for zipimporter not having exec_module before Python 3.10 (1069)
- Stabilize tests at midnight (1111)
- Add a test case for French (1110)

Cleanups:

- Remove the requirements-build file (1113)

1.1.4

------------------

Improvements:

- Improved support for languages such as Slovak, Indonesian, Hindi, German and Japanese (1064, 1094, 986, 1071, 1068)
- Recursively create a model home (996)
- Replace regex sub with simple string replace (1095)
- Add Python 3.10, 3.11 support (1096)
- Drop support for Python 3.5, 3.6 versions (1097)

1.1.3

------------------

New features:

- Add support for fractional units (876)

Improvements:

- Fix the returned datetime skipping a day with time+timezone input and PREFER_DATES_FROM = 'future' (1002)
- Fix input translatation breaking keep_formatting (720)
- English: support "till date" (1005)
- English: support “after” and “before” in relative dates (1008)

Cleanups:

- Reorganize internal data (1090)
- CI updates (1088)

1.1.2

------------------

Improvements:

- Added support for negative timestamp (1060)
- Fixed PytzUsageWarning for Python versions >= 3.6 (1062)
- Added support for dates with dots and spaces (1028)
- Improved support for Ukrainian, Croatian and Russian (1072, 1074, 1079, 1082, 1073, 1083)
- Added support for parsing Unix timestamps consistently regardless of timezones (954)
- Improved tests (1086)

1.1.1

------------------

Improvements:

- Fixed issue with regex library by pinning dependencies to an earlier version (< 2022.3.15, 1046).
- Extended support for Russian language dates starting with lowercase (999).
- Allowed to use_given_order for languages too (997).
- Fixed link to settings section (1018).
- Defined UTF-8 encoding for Windows (998).
- Fixed directories creation error in CLI utils (1022).

1.1.0

------------------

New features:

* Support language detection based on ``langdetect``, ``fastText``, or a
custom implementation (see 932)
* Add support for 'by <time>' (see 839)
* Sort default language list by internet usage (see 805)

Improvements:

* Improved support of Chinese (910), Czech (977)
* Improvements in ``search_dates`` (see 953)
* Make order of previous locales deterministic (see 851)
* Fix parsing with trailing space (see 841)
* Consider ``RETURN_TIME_AS_PERIOD`` for timestamp times (see 922)
* Exclude failing regex version (see 974)
* Ongoing work multithreading support (see 881, 885)
* Add demo URL (see 883)

QA:

* Migrate pipelines from Travis CI to Github Actions (see 859, 879, 884,
886, 911, 966)
* Use versioned CLDR data (see 825)
* Add a script to update table of supported languages and locales (see 601)
* Sort 'skip' keys in yaml files (see 844)
* Improve test coverage (see 827)
* Code cleanup (see 888, 907, 951, 958, 957)

1.0.0

------------------

Breaking changes:

* Drop support for Python 2.7 and pypy (see 727, 744, 748, 749, 754, 755, 758, 761, 763, 764, 777 and 783)
* Now ``DateDataParser.get_date_data()`` returns a ``DateData`` object instead of a ``dict`` (see 778).
* From now wrong ``settings`` are not silenced and raise ``SettingValidationError`` (see 797)
* Now ``dateparser.parse()`` is deterministic and doesn't try previous locales. Also, ``DateDataParser.get_date_data()`` doesn't try the previous locales by default (see 781)
* Remove the ``'base-formats'`` parser (see 721)
* Extract the ``'no-spaces-time'`` parser from the ``'absolute-time'`` parser and make it an optional parser (see 786)
* Remove ``numeral_translation_data`` (see 782)
* Remove the undocumented ``SKIP_TOKENS_PARSER`` and ``FUZZY`` settings (see 728, 794)
* Remove support for using strings in ``date_formats`` (see 726)
* The undocumented ``ExactLanguageSearch`` class has been moved to the private scope and some internal methods have changed (see 778)
* Changes in ``dateparser.utils``: ``normalize_unicode()`` doesn't accept ``bytes`` as input and ``convert_to_unicode`` has been deprecated (see 749)

New features:

* Add Python 3.9 support (see 732, 823)
* Detect hours separated with a period/dot (see 741)
* Add support for "decade" (see 762)
* Add support for the hijri calendar in Python ≥ 3.6 (see 718)

Improvements:

* New logo! (see 719)
* Improve the README and docs (see 779, 722)
* Fix the "calendars" extra (see 740)
* Fix leap years when ``PREFER_DATES_FROM`` is set (see 738)
* Fix ``STRICT_PARSING`` setting in ``no-spaces-time`` parser (see 715)
* Consider ``RETURN_AS_TIME_PERIOD`` setting for ``relative-time`` parser (see 807)
* Parse the 24hr time format with meridian info (see 634)
* Other small improvements (see 698, 709, 710, 712, 730, 731, 735, 739, 784, 788, 795 and 801)

0.7.6

------------------

Improvements:

* Rename ``scripts`` to ``dateparser_scripts`` to avoid name collisions with modules from other packages or projects (see 707)

0.7.5

------------------

New features:

* Add Python 3.8 support (see 664)
* Implement a ``REQUIRE_PARTS`` setting (see 703)
* Add support for subscript and superscript numbers (see 684)
* Extended French support (see 672)
* Extended German support (see 673)


Improvements:

* Migrate test suite to Pytest (see 662)
* Add test to check the `yaml` and `json` files content (see 663 and 692)
* Add flake8 pipeline with pytest-flake8 (see 665)
* Add partial support for 8-digit dates without separators (see 639)
* Fix possible ``OverflowError`` errors and explicitly avoid to raise ``ValueError`` when parsing relative dates (see 686)
* Fix double-digit GMT and UTC parsing (see 632)
* Fix bug when using ``DATE_ORDER`` (see 628)
* Fix bug when parsing relative time with timezone (see 503)
* Fix milliseconds parsing (see 572 and 661)
* Fix wrong values to be interpreted as ``'future'`` in ``PREFER_DATES_FROM`` (see 629)
* Other small improvements (see 667, 675, 511, 626, 512, 509, 696, 702 and 699)

0.7.4

------------------
New features:

* Extended Norwegian support (see 598)
* Implement a ``PARSERS`` setting (see 603)

Improvements:

* Add support for ``PREFER_DATES_FROM`` in relative/freshness parser (see 414)
* Add support for ``PREFER_DAY_OF_MONTH`` in base-formats parser (see 611)
* Added UTC -00:00 as a valid offset (see 574)
* Fix support for “one” (see 593)
* Fix TypeError when parsing some invalid dates (see 536)
* Fix tokenizer for non recognized characters (see 622)
* Prevent installing regex 2019.02.19 (see 600)
* Resolve DeprecationWarning related to raw string escape sequences (see 596)
* Implement a tox environment to build the documentation (see 604)
* Improve tests stability (see 591, 605)
* Documentation improvements (see 510, 578, 619, 614, 620)
* Performance improvements (see 570, 569, 625)

0.7.3

------------------
* Broken version

0.7.2

------------------

Features:

* Extended Czech support
* Added ``time`` to valid periods
* Added timezone information to dates found with ``search_dates()``
* Support strings as date formats


Improvements:

* Fixed Collections ABCs depreciation warning
* Fixed dates with trailing colons not being parsed
* Fixed date format override on any settings change
* Fixed parsing current weekday as past date, regardless of settings
* Added UTC -2:30 as a valid offset
* Added Python 3.7 to supported versions, dropped support for Python 3.3 and 3.4
* Moved to importlib from imp where possible
* Improved support for Catalan
* Documentation improvements

0.7.1

------------------

Features/news:

* Added detected language to return value of ``search_dates()``
* Performance improvements
* Refreshed versions of dependencies

Improvements:

* Fixed unpickleable ``DateTime`` objects with timezones
* Fixed regex pattern to avoid new behaviour of re.split in Python 3.7
* Fixed an exception thrown when parsing colons
* Fixed tests failing on days with number greater than 30
* Fixed ``ZeroDivisionError`` exceptions
Links

Update jinja2 from 3.1.2 to 3.1.3.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update prompt-toolkit from 1.0.15 to 3.0.43.

Changelog

3.0.43

------------------

Fixes:
- Fix regression on Pypy: Don't use `ctypes.pythonapi` to restore SIGINT if not
available.

3.0.42

------------------

Fixes:
- Fix line wrapping in `patch_stdout` on Windows.
- Make `formatted_text.split_lines()` accept an iterable instead of lists only.
- Disable the IPython workaround (from 3.0.41) for IPython >= 8.18.
- Restore signal.SIGINT handler between prompts.

3.0.41

------------------

Fixes:
- Fix regression regarding IPython input hook (%gui) integration.

3.0.40

------------------

Fixes:
- Improved Python 3.12 support (fixes event loop `DeprecationWarning`).

New features:
- Vi key bindings: `control-t` and `control-d` for indent/unindent in insert
mode.
- Insert partial suggestion when `control+right` is pressed, similar to Fish.
- Use sphinx-nefertiti theme for the docs.

3.0.39

------------------

Fixes:
- Fix `RuntimeError` when `__breakpointhook__` is called from another thread.
- Fix memory leak in filters usage.
- Ensure that key bindings are handled in the right context (when using
contextvars).

New features:
- Accept `in_thread` keyword in `prompt_toolkit.shortcuts.prompt()`.
- Support the `NO_COLOR` environment variable.

3.0.38

------------------

Fixes:
- Fix regression in filters. (Use of `WeakValueDictionary` caused filters to
not be cached).

New features:
- Use 24-bit true color now by default on Windows 10/11.

3.0.37

------------------

Bug fixes:
- Fix `currentThread()` deprecation warning.
- Fix memory leak in filters.
- Make VERSION tuple numeric.

New features:
- Add `.run()` method in `TelnetServer`. (To be used instead of
`.start()/.stop()`.

Breaking changes:
- Subclasses of `Filter` have to call `super()` in their `__init__`.
- Drop support for Python 3.6:
* This includes code cleanup for Python 3.6 compatibility.
* Use `get_running_loop()` instead of `get_event_loop()`.
* Use `asyncio.run()` instead of `asyncio.run_until_complete()`.

3.0.36

------------------

Fixes:
- Another Python 3.6 fix for a bug that was introduced in 3.0.34.

3.0.35

------------------

Fixes:
- Fix bug introduced in 3.0.34 for Python 3.6. Use asynccontextmanager
implementation from prompt_toolkit itself.

3.0.34

------------------

Fixes:
- Improve completion performance in various places.
- Improve renderer performance.
- Handle `KeyboardInterrupt` when the stacktrace of an unhandled error is
displayed.
- Use correct event loop in `Application.create_background_task()`.
- Fix `show_cursor` attribute in `ScrollablePane`.

3.0.33

------------------

Fixes:
- Improve termination of `Application`. Don't suppress `CancelledError`. This
fixes a race condition when an `Application` gets cancelled while we're
waiting for the background tasks to complete.
- Fixed typehint for `OneStyleAndTextTuple`.
- Small bugfix in `CombinedRegistry`. Fixed missing `property`.

3.0.32

------------------

Bug fixes:
- Use `DummyInput` by default in `create_input()` if `sys.stdin` does not have
a valid file descriptor. This fixes errors when `sys.stdin` is patched in
certain situations.
- Fix control-c key binding for `ProgressBar` when the progress bar was not
created from the main thread. The current code would try to kill the main
thread when control-c was pressed.

New features:
- Accept a `cancel_callback` in `ProgressBar` to specify the cancellation
behavior for when `control-c` is pressed.
- Small performance improvement in the renderer.

3.0.31

------------------

New features:
- Pass through `name` property in `TextArea` widget to `Buffer`.
- Added a `enable_cpr` parameter to `Vt100_Output`, `TelnetServer` and
`PromptToolkitSSHServer`, to completely disable CPR support instead of
automatically detecting it.

3.0.30

------------------

New features:
- Allow zero-width-escape sequences in `print_formatted_text`.
- Add default value option for input dialog.
- Added `has_suggestion` filter.

Fixes:
- Fix rendering of control-shift-6 (or control-^). Render as '^^'
- Always wrap lines in the Label widget by default.
- Fix enter key binding in system toolbar in Vi mode.
- Improved handling of stdout objects that don't have a 'buffer' attribute. For
instance, when using `renderer_print_formatted_text` in a Jupyter Notebook.

3.0.29

------------------

New features:
- Accept 'handle_sigint' parameter in PromptSession.

Fixes
- Fix 'variable referenced before assignment' error in vt100 mouse bindings.
- Pass `handle_sigint` from `Application.run` to `Application.run_async`.
- Fix detection of telnet client side changes.
- Fix `print_container` utility (handle `EOFError`).

Breaking changes:
- The following are now context managers:
`create_pipe_input`, `PosixPipeInput` and `Win32PipeInput`.

3.0.28

------------------

New features:
- Support format specifiers for HTML and ANSI formatted text.
- Accept defaults for checkbox and radio list, and their corresponding dialogs.

Fixes:
- Fix resetting of cursor shape after the application terminates.

3.0.27

------------------

New features:
- Support for cursor shapes. The cursor shape for prompts/applications can now
be configured, either as a fixed cursor shape, or in case of Vi input mode,
according to the current input mode.
- Handle "cursor forward" command in ANSI formatted text. This makes it
possible to render many kinds of generated ANSI art.
- Accept `align` attribute in `Label` widget.
- Added `PlainTextOutput`: an output implementation that doesn't render any
ANSI escape sequences. This will be used by default when redirecting stdout
to a file.
- Added `create_app_session_from_tty`: a context manager that enforces
input/output to go to the current TTY, even if stdin/stdout are attached to
pipes.
- Added `to_plain_text` utility for converting formatted text into plain text.

Fixes:
- Don't automatically use `sys.stderr` for output when `sys.stdout` is not a
TTY, but `sys.stderr` is. The previous behavior was confusing, especially
when rendering formatted text to the output, and we expect it to follow
redirection.

3.0.26

------------------

Fixes:
- Fixes issue introduced in 3.0.25: Don't handle SIGINT on Windows.

3.0.25

------------------

Fixes:
- Use `DummyOutput` when `sys.stdout` is `None` and `DummyInput` when
`sys.stdin` is `None`. This fixes an issue when the code runs on windows,
using pythonw.exe and still tries to interact with the terminal.
- Correctly reset `Application._is_running` flag in case of exceptions in some
situations.
- Handle SIGINT (when sent from another process) and allow binding it to a key
binding. For prompt sessions, the behavior is now identical to pressing
control-c.
- Increase the event loop `slow_duration_callback` by default to 0.5. This
prevents printing warnings if rendering takes too long on slow systems.

3.0.24

------------------

Fixes:
- Prevent window content overflowing when using scrollbars.
- Handle `PermissionError` when trying to attach /dev/null in vt100 input.

3.0.23

------------------

Fixes:
- Fix multiline bracketed paste on Windows

New features:
- Add support for some CSI 27 modified variants of "Enter" for xterm in the
vt100 input parser.

3.0.22

------------------

Fixes:
- Fix stopping of telnet server (capture cancellation exception).

3.0.21

------------------

New features:
- Improved mouse support:
* Support for click-drag, which is useful for selecting text.
* Detect mouse movements when no button is pressed.
- Support for Python 3.10.

3.0.20

------------------

New features:
- Add support for strikethrough text attributes.
- Set up custom breakpointhook while an application is running (if no other
breakpointhook was installed). This enhances the usage of PDB for debugging
applications.
- Strict type checking is now enabled.

Fixes:
- Ensure that `print_formatted_text` is always printed above the running
application, like `patch_stdout`. (Before, `patch_stdout` was even completely
ignored in case of `print_formatted_text, so there was no proper way to use
it in a running application.)
- Fix handling of non-bmp unicode input on Windows.
- Set minimum Python version to 3.6.2 (Some 3.6.2 features were used).

3.0.19

------------------

Fixes:
- Make the flush method of the vt100 output implementation re-entrant (fixes an
issue when using aiogevent).
- Fix off-by-one in `FormattedTextControl` mouse logic.
- Run `print_container` always in a thread (avoid interfering with possible
event loop).
- Make sphinx autodoc generation platform agnostic (don't import Windows stuff
when generating Sphinx docs).

3.0.18

------------------

New features:
- Added `in_thread` parameter to `Application.run`.
This is useful for running an application in a background thread, while the
main thread blocks. This way, we are sure not to interfere with an event loop
in the current thread. (This simplifies some code in ptpython and fixes an
issue regarding leaking file descriptors due to not closing the event loop
that was created in this background thread.)

3.0.17

------------------

New features:
- Accept `style` parameter in `print_container` utility.
- On Windows, handle Control-Delete.

Fixes:
- Avoid leaking file descriptors in SSH server.

3.0.16

------------------

New features:
- Added `ScrollablePane`: a scrollable layout container.
This allows applications to build a layout, larger than the terminal, with a
vertical scroll bar. The vertical scrolling will be done automatically when
certain widgets receive the focus.
- Added `DeduplicateCompleter and `ConditionalCompleter`.
- Added `deduplicate` argument to `merge_completers`.

3.0.15

------------------

Fixes:
- Set stdout blocking when writing in vt100 output. Fixes an issue when uvloop
is used and big amounts of text are written.
- Guarantee height of at least 1 for both labels and text areas.
- In the `Window` rendering, take `dont_extend_width`/`dont_extend_height` into
account. This fixes issues where one window is enlarged unexpectedly because
it's bundled with another window in a `HSplit`/`VSplit`, but with different
width/height.
- Don't handle `SIGWINCH` in progress bar anymore. (The UI runs in another
thread, and we have terminal size polling now).
- Fix several thread safety issues and a race condition in the progress bar.
- Fix thread safety issues in `Application.invalidate()`. (Fixes a
`RuntimeError` in some situations when using progress bars.)
- Fix handling of mouse events on Windows if we have a Windows 10 console with
ANSI support.
- Disable `QUICK_EDIT_MODE` on Windows 10 when mouse support is requested.

3.0.14

------------------

New features:
- Disable bell when `PROMPT_TOOLKIT_BELL=false` environment variable has been
set.

Fixes:
- Improve cancellation of history loading.

3.0.13

------------------

Fixes:
- Again, fixed the race condition in `ThreadedHistory`. Previous fix was not
correct.

3.0.12

------------------

Fixes:
- Fixed a race condition in `ThreadedHistory` that happens when continuously
pasting input text (which would continuously repopulate the history).
- Move cursor key mode resetting (for vt100 terminals) to the renderer. (Mostly
cleanup).

3.0.11

------------------

New features:
- Poll terminal size: better handle resize events when the application runs in
a thread other than the main thread (where handling SIGWINCH doesn't work) or
in the Windows console.

Fixes:
- Fix bug in system toolbar. The execution of system commands was broken.
- A refactoring of patch_stdout that includes several fixes.
* We know look at the `AppSession` in order to see which application is
 running, rather then looking at the event loop which is installed when
 `StdoutProxy` is created. This way, `patch_stdout` will work when
 prompt_toolkit applications with a different event loop run.
* Fix printing when no application/event loop is running.
* Fixed the `raw` argument of `PatchStdout`.
- A refactoring of the `ThreadedHistory`, which includes several fixes, in
particular a race condition (see issue 1158) that happened when editing
input while a big history was still being loaded in the background.

3.0.10

------------------

New features:
- Improved `WordCompleter`: accept `display_dict`. Also accept formatted text
for both `display_dict` and `meta_dict`.
- Allow customization of button arrows.

Fixes:
- Correctly recognize backtab on Windows.
- Show original display text in fuzzy completer if no filtering was done.

3.0.9

-----------------

New features:
- Handle c-tab for TERM=linux.

Fixes:
- Improve rendering speed of `print_formatted_text`. (Don't render styling
attributes to output between fragments that have identical styling.)
- Gracefully handle `FileHistory` decoding errors.
- Prevent asyncio deprecation warnings.

3.0.8

-----------------

New features:
- Added `validator` parameter to `input_dialog`.

Fixes:
- Cope with stdout not having a working `fileno`.
- Handle situation when /dev/null is piped into stdin, or when stdin is closed
somehow.
- Fix for telnet/ssh server: `isatty` method was not implemented.
- Display correct error when a tuple is passed into `to_formatted_text`.
- Pass along WORD parameter in `Document._is_word_before_cursor_complete`.
Fixes some key bindings.
- Expose `ProgressBarCounter` in shortcuts module.

3.0.7

-----------------

New features:
- New "placeholder" parameter added to `PromptSession`.

Other changes:
- The "respond to CPR" logic has been moved from the `Input` to `Output`
classes (this does clean up some code).

Fixes:
- Bugfix in shift-selection key bindings.
- Fix height calculation of `FormattedTextControl` when line wrapping is turned
on.
- Fixes for SSH server:
* Missing encoding property.
* Fix failure in "set_line_mode" call.
* Handle `BrokenPipeError`.

3.0.6

-----------------

New features:
- The SSH/Telnet adaptors have been refactored and improved in several ways.
See issues 876 and PR 1150 and 1184 on GitHub.
* Handle terminal types for both telnet and SSH sessions.
* Added pipe input abstraction. (base class for `PosixPipeInput` and
 `Win32PipeInput`).
* The color depth logic has been refactored and moved to the `Output`
 implementations. Added `get_default_color_depth` method to `Output`
 objects.
* All line feet are now preceded by a carriage return in the telnet
 connection stdout.
- Introduce `REPLACE_SINGLE` input mode for Vi key bindings.
- Improvements to the checkbox implementation:
 * Hide the scrollbar for a single checkbox.
 * Added a "checked" setter to the checkbox.
- Expose `KeyPressEvent` in key_binding/__init__.py (often used in type
annotations).
- The renderer has been optimized so that no trailing spaces are generated
(this improves copying in some terminals).

Fixes:
- Ignore F21..F24 key bindings by default.
- Fix auto_suggest key bindings when suggestion text is empty.
- Bugfix in SIGWINCH handling.
- Handle bug in HSplit/VSplit when the number of children is zero.
- Bugfix in CPR handling in renderer. Proper cancellation of pending tasks.
- Ensure rprompt aligns with input.
- Use `sys.stdin.encoding` for decoding stdin stream.

3.0.5

-----------------

Fixes:
- Bugfix in mouse handling on Windows.

3.0.4

-----------------

New features:
- Added many more vt100 ANSI sequences and keys.
- Improved control/shift key support in Windows.
- No Mypy errors in prompt_toolkit anymore.
- Added `set_exception_handler` optional argument to `PromptSession.prompt()`.

Fixes:
- Bugfix in invalidate code. `PromptSession` was invalidating the UI
continuously.
- Add uvloop support (was broken due to an issue in our `call_soon_threadsafe`).
- Forwarded `set_exception_handler` in `Application.run` to the `run_async` call.
- Bugfix in `NestedCompleter` when there is a leading space.

Breaking changes:
- `ShiftControl` has been replaced with `ControlShift` and `s-c` with `c-s` in
key bindings. Aliases for backwards-compatibility have been added.

3.0.3

-----------------

New features:
- Improved support for "dumb" terminals.
- Added support for new keys (vt100 ANSI sequences): Alt +
home/end/page-up/page-down/insert.
- Better performance for the "regular languages compiler". Generate fewer and
better regular expressions. This should improve the start-up time for
applications using this feature.
- Better detection of default color depth.
- Improved the progress bar:
* Set "time left" to 0 when done or stopped.
* Added `ProgressBarCounter.stopped`.
- Accept callables for `scroll_offset`, `min_brightness` and `max_brightness`.
- Added `always_prefer_tty` parameters to `create_input()` and `create_output()`.
- Create a new event loop in `Application.run()` if `get_event_loop()` raises
`Runtimeerror`.

Fixes:
- Correct cancellation of flush timers for input. (Fixes resource leak where
too many useless coroutines were created.)
- Improved the Win32 input event loop. This fixes a bug where the
prompt_toolkit application is stopped by something other than user input. (In
that case, the application would hang, waiting for input.) This also fixes a
`RuntimeError` in the progress bar code.
- Fixed `line-number.current` style. (was `current-line-number`.)
- Handle situation where stdout is no longer a tty (fix bug in `get_size`).
- Fix parsing of true color in ANSI strings.
- Ignore `invalidate()` if the application is not running.

3.0.2

-----------------

Fixes:
- Bugfix in the UI invalidation. Fixes an issue when the application runs again
on another event loop.
See: https://github.com/ipython/ipython/pull/11973

3.0.1

-----------------

New features:
- Added `new_eventloop_with_inputhook` function.
- Set exception handler from within `Application.run_async`.
- Applied Black code style.

Fixes:
- No longer expect a working event loop in the `History` classes.
(Fix for special situations when a `ThreadedHistory` is created before the
event loop has been set up.)
- Accept an empty prompt continuation.
- A few fixes to the `Buffer` tempfile code.

3.0.0

-----------------

New features:
- (almost) 100% type annotated.
- Native asyncio instead of custom event loops.
- Added shift-based text selection (use shift+arrows to start selecting text).

Breaking changes:
- Python 2 support has been dropped. Minimal Python version is now 3.6,
although 3.7 is preferred (because of ContextVars).
- Native asyncio, so some async code becomes slightly different.
- The active `Application` became a contextvar. Which means that it should be
propagated correctly to the code that requires it. However, random other
threads or coroutines won't be able to know what the current application is.
- The dialog shortcuts API changed. All dialog functions now return an
`Application`. You still have to call either `run()` or `run_async` on the
`Application` object.
- The way inputhooks work is changed.
- `patch_stdout` now requires an `Application` as input.

2.0.9

-----------------

Bug fixes:
- Fixed `Application.run_system_command` on Windows.
- Fixed bug in ANSI text formatting: correctly handle 256/true color sequences.
- Fixed bug in WordCompleter. Provide completions when there's a space before
the cursor.

2.0.8

-----------------

Bug fixes:
- Fixes the issue where changes made to the buffer in the accept handler were
not reflected in the history.
- Fix in the application invalidate handler. This prevents a significant slow
down in some applications after some time (especially if there is a refresh
interval).
- Make `print_container` utility work if the input is not a pty.

New features:
- Underline non breaking spaces instead of rendering as '&'.
- Added mouse support for radio list.
- Support completion styles for `READLINE_LIKE` display method.
- Accept formatted text in the display text of completions.
- Added a `FuzzyCompleter` and `FuzzyWordCompleter`.
- Improved error handling in Application (avoid displaying a meaningless
AssertionError in many cases).

2.0.7

-----------------

Bug fixes:
- Fixed assertion in PromptSession: the style_transformation check was wrong.
- Removed 'default' attribute in PromptSession. Only ask for it in the
`prompt()` method. This fixes the issue that passing `default` once, will
store it for all consequent calls in the `PromptSession`.
- Ensure that `__pt_formatted_text__` always returns a `FormattedText`
instance. This fixes an issue with `print_formatted_text`.

New features:
- Improved handling of situations where stdin or stdout are not a terminal.
(Print warning instead of failing with an assertion.)
- Added `print_container` utility.
- Sound bell when attempting to edit read-only buffer.
- Handle page-down and page-up keys in RadioList.
- Accept any `collections.abc.Sequence` for HSplit/VSplit children (instead of
lists only).
- Improved Vi key bindings: return to navigation mode when Insert is pressed.

2.0.6

-----------------

Bug fixes:
- Don't use the predefined ANSI colors for colors that are defined as RGB.
(Terminals can assign different color schemes for ansi colors, and we don't
want use any of those for colors that are defined like aabbcc for instance.)
- Fix in handling of CPRs when patch_stdout is used.

Backwards incompatible changes:
- Change to the `Buffer` class. Reset the buffer unless the `accept_handler`
returns `True` (which means: "keep_text"). This doesn't affect applications
that use `PromptSession`.

New features:
- Added `AdjustBrightnessStyleTransformation`. This is a simple style
transformation that improves the rendering on terminals with light or dark
background.
- Improved performance (string width caching and line height calculation).
- Improved `TextArea`:
* Exposed `focus_on_click`.
* Added attributes: `auto_suggest`, `complete_while_typing`, `history`,
 `get_line_prefix`, `input_processors`.
* Made attributes writable: `lexer`, `completer`, `complete_while_typing`,
 `accept_handler`, `read_only`, `wrap_lines`.

2.0.5

-----------------

Bug fixes:
- Fix in `DynamicContainer`. Return correct result for `get_children`. This
fixes a bug related to focusing.
- Properly compute length of `start`, `end` and `sym_b` characters of
progress bar.
- CPR (cursor position request) fix.

Backwards incompatible changes:
- Stop restoring `PromptSession` attributes when exiting prompt.

New features:
- Added `get_line_prefix` attribute to window. This opens many
possibilities:
* Line wrapping (soft and hard) can insert whitespace in front
 of the line, or insert some symbols in front. Like the Vim "breakindent"
 option.
* Single line prompts also support line continuations now.
* Line continuations can have a variable width.
- For VI mode: implemented temporary normal mode (control-O in insert mode).
- Added style transformations API. Useful for swapping between light and
dark color schemes. Added `swap_light_and_dark_colors` parameter to
`prompt()` function.
- Added `format()` method to ANSI formatted text.
- Set cursor position for Button widgets.
- Added `pre_run` argument to `PromptSession.prompt()` method.

2.0.4

-----------------

Bug fixes:
- Fix render height for rendering full screen applications in Windows.
- Fix in `TextArea`. Set `accept_handler` to `None` if not given.
- Go to the beginning of the next line when enter is pressed in Vi navigation
mode, and the buffer doesn't have an accept handler.
- Fix the `default` argument of the `prompt` function when called multiple
times.
- Display decomposed multiwidth characters correctly.
- Accept `history` in `prompt()` function again.

Backwards incompatible changes:
- Renamed `PipeInput` to `PosixPipeInput`. Added `Win32PipeInput` and
`create_input_pipe`.
- Pass `buffer` argument to the `accept_handler` of `TextArea`.

New features:
- Added `accept_default` argument to `prompt()`.
- Make it easier to change the body/title of a Frame/Dialog.
- Added `DynamicContainer`.
- Added `merge_completers` for merging multiple completers together.
- Add vt100 data to key presses in Windows.
- Handle left/right key bindings in Vi block insert mode.

2.0.3

-----------------

Bug fixes:
- Fix in 'x' and 'X' Vi key bindings. Correctly handle line endings and args.
- Fixed off by one error in Vi line selection.
- Fixed bugs in Vi block selection. Correctly handle lines that the selection
doesn't cross.
- Python 2 bugfix. Handle str/unicode correctly.
- Handle option+left/right in iTerm.

2.0.2

-----------------

Bug fixes:
- Python 3.7 support: correctly handle StopIteration in asynchronous generator.
- Fixed off-by-one bug in Vi visual block mode.
- Bugfix in TabsProcessor: handle situations when the cursor is at the end of
the line.

2.0.1

-----------------

2.0

includes the merge of the CommandLineInterface and the Application object, a
rewrite of how user controls are focused, a rewrite of how event loops work
and the removal of the buffers dictionary. This introduces many backwards
incompatible changes, but the result is a very nice and powerful architecture.

Most architectural changes effect full screen applications. For applications
that use `prompt_toolkit.shortcuts` for simple prompts, there are fewer
incompatibilities.

Changes:

- No automatic translation from \r into \n during the input processing. These
are two different keys that can be handled independently. This is a big
backward-incompatibility, because the `Enter` key is `ControlM`, not
`ControlJ`. So, now that we stopped translating \r into \n, it could be that
custom key bindings for `Enter` don't work anymore. Make sure to bind
`Keys.Enter` instead of `Keys.ControlJ` for handling the `Enter` key.

- The `CommandLineInterface` and the `Application` classes are merged. First,
`CommandLineInterface` contained all the I/O objects (like the input, output
and event loop), while the `Application` contained everything else. There was
no practical reason to keep this separation. (`CommandLineInterface` was
mostly a proxy to `Application`.)

A consequence is that almost all code which used to receive a
`CommandLineInterface`, will now use an `Application`. Usually, where we
had an attribute `cli`, we'll now have an attribute `app`.

Secondly, the `Application` object is no longer passed around. The `get_app`
function can be used at any time to acquire the active application.

(For backwards-compatibility, we have aliases to the old names, whenever
possible.)

- prompt_toolkit no longer depends on Pygments, but it can still use Pygments
for its color schemes and lexers. In many places we used Pygments "Tokens",
this has been replaced by the concept of class names, somewhat similar to
HTML and CSS.

* `PygmentsStyle` and `PygmentsLexer` adaptors are available for
  plugging in Pygments styles and lexers.

* Wherever we had a list of `(Token, text)` tuples, we now have lists of
 `(style_string, text)` tuples. The style string can contain both inline
 styling as well as refer to a class from the style sheet. `PygmentsTokens`
 is an adaptor that converts a list of Pygments tokens into a list of
 `(style_string, text)` tuples.

- Changes in the `Style` classes.

* `style.from_dict` does not exist anymore. Instantiate the ``Style`` class
 directory to create a new style. ``Style.from_dict`` can be used to create
 a style from a dictionary, where the dictionary keys are a space separated
 list of class names, and the values, style strings (like before).

* `print_tokens` was renamed to `print_formatted_text`.

* In many places in the layout, we accept a parameter named `style`. All the
 styles from the layout hierarchy are combined to decide what style to be
 used.

* The ANSI color names were confusing and inconsistent with common naming
 conventions. This has been fixed, but aliases for the original names were
 kept.

- The way focusing works is different. Before it was always a `Buffer` that
was focused, and because of that, any visible `BufferControl` that contained
this `Buffer` would be focused. Now, any user control can be focused. All
of this is handled in the `Application.layout` object.

- The `buffers` dictionary (`CommandLineInterface.buffers`) does not exist
anymore. Further, `buffers` was a `BufferMapping` that keeps track of which
buffer has the focus. This significantly reduces the freedom for creating
complex applications. We wanted to move toward a layout that can be defined
as a (hierarchical) collection of user widgets. A user widget does not need
to have a `Buffer` underneath and any widget should be focusable.

* `layout.Layout` was introduced to contain the root layout widget and keep
 track of the focus.

- The key bindings were refactored. It became much more flexible to combine
sets of key bindings.

* `Registry` has been renamed to `KeyBindings`.
* The `add_binding` function has been renamed to simply `add`.
* Every `load_*` function returns one `KeyBindings` objects, instead of
 populating an existing one, like before.
* `ConditionalKeyBindings` was added. This can be used to enable/disable
 all the key bindings from a given `Registry`.
* A function named `merge_key_bindings` was added. This takes a list of
 `KeyBindings` and merges them into one.
* `key_binding.defaults.load_key_bindings` was added to load all the key
 bindings.
* `KeyBindingManager` has been removed completely.
* `input_processor` was renamed to `key_processor`.

Further:

* The `Key` class does not exist anymore. Every key is a string and it's
 considered fine to use string literals in the key bindings. This is more
 readable, but we still have run-time validation. The `Keys` enum still
 exist (for backwards-compatibility, but also to have an overview of which
 keys are supported.)
* 'enter' and 'tab' are key aliases for 'c-m' and 'c-i'.

- User controls can define key bindings, which are active when the user control
is focused.

* `UIControl` got a `get_key_bindings` (abstract) method.

- Changes in the layout engine:

* `LayoutDimension` was renamed to `Dimension`.
* `VSplit` and `HSplit` now take a `padding` argument.
* `VSplit` and `HSplit` now take an `align` argument.
 (TOP/CENTER/BOTTOM/JUSTIFY) or (LEFT/CENTER/RIGHT/JUSTIFY).
* `Float` now takes `allow_cover_cursor` and `attach_to_window` arguments.
* `Window` got an `WindowAlign` argument. This can be used for the alignment
 of the content. `TokenListControl` (renamed to `FormattedTextControl`) does
 not have an alignment argument anymore.
* All container objects, like `Window`, got a `style` argument. The style for
 parent containers propagate to child containers, but can be overridden.
 This is in particular useful for setting a background color.
* `FillControl` does not exist anymore. Use the `style` and `char` arguments
 of the `Window` class instead.
* `DummyControl` was added.
* The continuation function of `PromptMargin` now takes `line_number` and
 `is_soft_wrap` as input.

- Changes to `BufferControl`:

* The `InputProcessor` class has been refactored. The `apply_transformation`
 method should now takes a `TransformationInput` object as input.

* The text `(reverse-i-search)` is now displayed through a processor. (See
 the `shortcuts` module for an example of its usage.)

- `widgets` and `dialogs` modules:

* A small collection of widgets was added. These are more complex collections
 of user controls that are ready to embed in a layout. A `shortcuts.dialogs`
 module was added as a high level API for displaying input, confirmation and
 message dialogs.

* Every class that exposes a ``__pt_container__`` method (which is supposed
 to return a ``Container`` instance) is considered a widget. The
 ``to_container`` shortcut will call this method in situations where a
 ``Container`` object is expected. This avoids inheritance from other
 ``Container`` types, but also having to unpack the container object from
 the widget, in case we would have used composition.

* Warning: The API of the widgets module is not considered stable yet, and
 can change is the future, if needed.

- Changes to `Buffer`:

* A `Buffer` no longer takes an `accept_action`.  Both `AcceptAction` and
 `AbortAction` have been removed. Instead it takes an `accept_handler`.

- Changes regarding auto completion:

* The left and right arrows now work in the multi-column auto completion
 menu.
* By default, autocompletion is synchronous. The completer needs to be
 wrapped in `ThreadedCompleter` in order to get asynchronous autocompletion.
* When the completer runs in a background thread, completions will be
 displayed as soon as they are generated. This means that we don't have to
 wait for all the completions to be generated, before displaying the first
 one. The completion menus are updated as soon as new completions arrive.

- Changes regarding input validation:

* Added the `Validator.from_callable` class method for easy creation of
 new validators.

- Changes regarding the `History` classes:

* The `History` base class has a different interface. This was needed for
 asynchronous loading of the history. `ThreadedHistory` was added for this.

- Changes related to `shortcuts.prompt`:

* There is now a class `PromptSession` which also has a method `prompt`. Both
 the class and the method take about the same arguments. This can be used to
 create a session. Every `prompt` call of the same instance will reuse all
 the arguments given to the class itself.

 The input history is always shared during the entire session.

 Of course, it's still possible to call the global `prompt` function. This
 will create a new `PromptSession` every time when it's called.

* The `prompt` function now takes a `key_bindings` argument instead of
 `key_bindings_registry`. This should only contain the additional bindings.
 (The default bindings are always included.)

- Changes to the event loops:

* The event loop API is now closer to how asyncio works. A prompt_toolkit
 `Application` now has a `Future` object. Calling the `.run_async()` method
 creates and returns that `Future`. An event loop has a `run_until_complete`
 method that takes a future and runs the event loop until the Future is set.

 The idea is to be able to transition easily to asyncio when Python 2
 support can be dropped in the future.

* `Application` still has a method `run()` that underneath still runs the
 event loop until the `Future` is set and returns that result.

* The asyncio adaptors (like the asyncio event loop integration) now require
 Python 3.5. (We use the async/await syntax internally.)

* The `Input` and `Output` classes have some changes. (Not really important.)

* `Application.run_sub_applications` has been removed. The alternative is to
 call `run_coroutine_in_terminal` which returns a `Future`.

- Changes to the `filters` module:

* The `Application` is no longer passed around, so both `CLIFilter` and
 `SimpleFilter` were merged into `Filter`. `to_cli_filter` and
 `to_simple_filter` became `to_filter`.

* All filters have been turned into functions. For instance, `IsDone`
 became `is_done` and `HasCompletions` became `has_completions`.

 This was done because almost all classes were called without any arguments
 in the `__init__` causing additional braces everywhere. This means that
 `HasCompletions()` has to be replaced by `has_completions` (without
 parenthesis).

 The few filters that took arguments as input, became functions, but still
 have to be called with the given arguments.

 For new filters, it is recommended to use the `Condition` decorator,
 rather then inheriting from `Filter`.

- Other renames:

* `IncrementalSearchDirection` was renamed to `SearchDirection`.
* The `use_alternate_screen` parameter has been renamed to `full_screen`.
* `Buffer.initial_document` was renamed to `Buffer.document`.
* `TokenListControl` has been renamed to `FormattedTextControl`.
* `Application.set_return_value` has been renamed to `Application.set_result`.

- Other new features:

* `DummyAutoSuggest` and `DynamicAutoSuggest` were added.
* `DummyClipboard` and `DynamicClipboard` were added.
* `DummyCompleter` and `DynamicCompleter` were added.
* `DummyHistory` and `DynamicHistory` was added.

* `to_container` and `to_window` utilities were added.
Links

Update pytest-runner from 6.0.0 to 6.0.1.

Changelog

6.0.1

======

* Updated Trove classifier to indicate this project is inactive.
Links

Update urllib3 from 2.0.4 to 2.2.1.

Changelog

2.2.1

🚀 urllib3 is fundraising for HTTP/2 support

[urllib3 is raising ~$40,000 USD](https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support) to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects [please consider contributing financially](https://opencollective.com/urllib3) to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.

Thank you for your support.

Changes

- Fixed issue where `InsecureRequestWarning` was emitted for HTTPS connections when using Emscripten. (3331)
- Fixed `HTTPConnectionPool.urlopen` to stop automatically casting non-proxy headers to `HTTPHeaderDict`. This change was premature as it did not apply to proxy headers and `HTTPHeaderDict` does not handle byte header values correctly yet. (3343)
- Changed `ProtocolError` to `InvalidChunkLength` when response terminates before the chunk length is sent. (2860)
- Changed `ProtocolError` to be more verbose on incomplete reads with excess content. (3261)

2.2.0

🖥️ urllib3 now works in the browser

:tada: **This release adds experimental support for [using urllib3 in the browser with Pyodide](https://urllib3.readthedocs.io/en/stable/reference/contrib/emscripten.html)!** :tada:

Thanks to Joe Marshall (joemarshall) for contributing this feature. This change was possible thanks to work done in urllib3 v2.0 to detach our API from `http.client`. Please report all bugs to the [urllib3 issue tracker](https://github.com/urllib3/urllib3/issues).

🚀 urllib3 is fundraising for HTTP/2 support

[urllib3 is raising ~$40,000 USD](https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support) to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects [please consider contributing financially](https://opencollective.com/urllib3) to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.

Thank you for your support.

Changes

- Added support for [Emscripten and Pyodide](https://urllib3.readthedocs.io/en/latest/reference/contrib/emscripten.html), including streaming support in cross-origin isolated browser environments where threading is enabled. ([#2951](https://github.com/urllib3/urllib3/issues/2951))
- Added support for `HTTPResponse.read1()` method. ([3186](https://github.com/urllib3/urllib3/issues/3186))
- Added rudimentary support for HTTP/2. ([3284](https://github.com/urllib3/urllib3/issues/3284))
- Fixed issue where requests against urls with trailing dots were failing due to SSL errors
when using proxy. ([2244](https://github.com/urllib3/urllib3/issues/2244))
- Fixed `HTTPConnection.proxy_is_verified` and `HTTPSConnection.proxy_is_verified` to be always set to a boolean after connecting to a proxy. It could be `None` in some cases previously. ([3130](https://github.com/urllib3/urllib3/issues/3130))
- Fixed an issue where `headers` passed in a request with `json=` would be mutated ([3203](https://github.com/urllib3/urllib3/issues/3203))
- Fixed `HTTPSConnection.is_verified` to be set to `False` when connecting from a HTTPS proxy to an HTTP target. It was set to `True` previously. ([3267](https://github.com/urllib3/urllib3/issues/3267))
- Fixed handling of new error message from OpenSSL 3.2.0 when configuring an HTTP proxy as HTTPS ([3268](https://github.com/urllib3/urllib3/issues/3268))
- Fixed TLS 1.3 post-handshake auth when the server certificate validation is disabled ([3325](https://github.com/urllib3/urllib3/issues/3325))

Note for downstream distributors: To run integration tests, you now need to run the tests a second time with the `--integration` pytest flag. ([3181](https://github.com/urllib3/urllib3/issues/3181))

2.1.0

Read the [v2 migration guide](https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html) for help upgrading to the latest version of urllib3.

Removals

- Removed support for the deprecated urllib3[secure] extra. ([2680](https://github.com/urllib3/urllib3/issues/2680))
- Removed support for the deprecated SecureTransport TLS implementation. ([2681](https://github.com/urllib3/urllib3/issues/2681))
- Removed support for the end-of-life Python 3.7. ([3143](https://github.com/urllib3/urllib3/issues/3143))


Bugfixes

- Allowed loading CA certificates from memory for proxies. ([3065](https://github.com/urllib3/urllib3/issues/3065))
- Fixed decoding Gzip-encoded responses which specified `x-gzip` content-encoding. ([3174](https://github.com/urllib3/urllib3/issues/3174))

2.0.7

* Made body stripped from HTTP requests changing the request method to GET after HTTP 303 "See Other" redirect responses. (GHSA-g4mx-q9vg-27p4)

2.0.6

* Added the `Cookie` header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set via `Retry.remove_headers_on_redirect`. (GHSA-v845-jxx5-vc9f)

2.0.5

- Allowed pyOpenSSL third-party module without any deprecation warning. [3126](https://github.com/urllib3/urllib3/issues/3126)
- Fixed default ``blocksize`` of ``HTTPConnection`` classes to match high-level classes. Previously was 8KiB, now 16KiB. [3066](https://github.com/urllib3/urllib3/issues/3066>)
Links

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant