Kivy 2.1.0 released

Written for Kivy by Mirko Galimberti on 2022-03-06

The Kivy team is happy to announce the release of Kivy 2.1.0.

Kivy is a full-featured framework for creating novel and performant user
interfaces, such as multi-touch applications, released under the **MIT license**.
The framework works on Windows, macOS, Linux, Android, iOS and Raspberry Pi.

Installation instructions and Kivy Docs are hosted on the [Kivy Website](https://www.kivy.org)

- Currently supported Python versions are **3.7-3.10**
- macOS `Kivy.app` now supports both `Intel` and `Apple Silicon` hardware.
- `aarch64` for `manylinux2014` pre-built wheels are now available on PyPi.
- Single `universal2` wheel for `macos` `Intel` and `Apple Silicon` is now available on PyPi.

Features marked as **deprecated** on **1.6.0** and prior versions will be removed in Kivy 2.2.0.

Highlights
----------

- [#7658]: Feature: Added EventManagerBase. We can now register managers that selectively process inputs e.g. touch and decide how to dispatch it to the widget tree. `on_motion` and `motion_filter` was added to Widget to handle generic motion inputs from the managers.
- [#7270]: Graphics: We now check whether the user called GL instructions from an external thread and raise an error.
- [#7293]: Properties: Added dynamic screen density/dpi support. KV code referencing density e.g. `width: "5dp"` will now update if the window dpi changes.
- [#7371]: KV: Allow using f-strings in KV-lang.
- [#7424]: Properties: Speed up bare widget creation (3X) and property dispatching/setting.
- [#7587]: Fix PermissionError when reconnecting mtdev input devices.
- [#7637]: Added Custom titlebar support.
- [#7642]: TextInput loading time optimization for large texts.
- [#7663]: Add python3.10 support.
- [#7678]: Add support for Apple Silicon.

Deprecated
------------

- [#7701]: deprecate 'kivy.utils.SafeList'.
- [#7786]: WindowBase: Add on_drop_begin, on_droptext and on_drop_end events.

Breaking changes
----------------

- [#6290]: Widget: Fix signature of add/remove/clear_widget in subclasses to be consistent with base class.
- [#7264]: Camera: Change play default to False.
- [#7356]: Widget: Widget.clear_widgets providing empty widget list does not remove any children, unlike None that clears all the children.
- [#7437]: TextInput: Remove broken and confusing `suggestion_text` property
- [#7744]: Change default input_type to null. Add some warning regarding TYPE_TEXT_FLAG_NO_SUGGESTIONS
- [#7763]: Removed Python3.6 from the supported ones, it reached EOL
- [#7820]: kivy_deps.gstreamer releases 0.3.0, 0.14, 0.15, and 0.16 were deleted from PyPi to conserve space. They were not used, but if you did depend on them you can download them from https://kivy.org/downloads/ci/win/deps/.

Kv-lang
-------

- [#7371]: KV: Allow using f-strings in KV-lang
- [#7703]: refactor kivy.lang

Misc
----

- [#7204]: Kivy: print kivy's version even when not a release.
- [#7271]: Inspector: Prevent circular import breaking Window
- [#7403]: Exceptions: Fix typos in message
- [#7433]: Source: Fix typos in source code
- [#7453]: Screen: Added Oneplus 6t in screen module
- [#7701]: deprecate 'kivy.utils.SafeList'

Packaging
---------

- [#7341]: OSX: Use platform.machine() for osx version detection
- [#7605]: PyInstaller hook: Replace modname_tkinter with 'tkinter'
- [#7781]: PyInstaller develop version isn't needed anymore

Widgets
-------

- [#7049]: Camera: Fix GI camera provider crash when no texture is available after loading
- [#7213]: ScrollView: Match scroll effect stop condition to start condition.
- [#7261]: Camera: Revert "Fixes crash during camera configuration"
- [#7262]: RecycleGridLayout : Fix layout when number of widgets match number of columns
- [#7264]: Camera: Change play default to False
- [#7322]: Widget: fix export_to_png not passing arguments through
- [#7353]: RecycleLayout: Allow setting x, y sizing of views independently
- [#7372]: Focus: Allow modifiers (e.g. numlock) be present to tab cycle focus
- [#7383]: Dropdown: Fix reposition in scrollview/recycleview
- [#7391]: Factory: Registered TouchRippleBehavior and TouchRippleButtonBehavior with Factory
- [#7426]: Dropdown: Ensure visibility on reposition
- [#7434]: ModalView: code cleanup regarding detection of main-Window:
- [#7437]: TextInput: Remove broken and confusing `suggestion_text` property
- [#7457]: ScrollView: Fix for scroll bar areas blocking clicks when scroll is disabled with overscroll
- [#7471]: Video: Add support for preview image
- [#7488]: FocusBehavior: Fix assumption that modifiers is always a set.
- [#7520]: Video: Fixed handling eos after unloading
- [#7527]: Label: Fix label not displaying as disabled if it is disabled when created
- [#7548]: Fixes issue #7514 ('auto_halign_r' referenced before assignment)
- [#7610]: Added scroll from swipe feature in TextInput
- [#7612]: Fixed unexpected overscrolling bug when using mouse wheel
- [#7615]: Fixed unexpected overscrolling bug when using mouse wheel, complement to #7612
- [#7618]: Fixed TextInput visual selection bugs while scrolling
- [#7621]: Fixed inconsistent behavior of TextInput bubble and handles
- [#7622]: Fixes TextInput cursor issues when resizing/scrolling
- [#7631]: Fixes some bugs in the TextInput if the text is right-aligned or center-aligned and not multiline.
- [#7636]: Textinput on double tap improvement
- [#7641]: Textinput: Fixes issues #7165, #7236, #7235
- [#7642]: TextInput loading time optimisation for large texts
- [#7706]: SettingColor: Change method name to get_color_from_hex
- [#7737]: CodeInput: fixed disappearing lines after inserting text
- [#7740]: TextInput: easier tokenize delimiters setting; quotes removed from default delimiters
- [#7775]: Don't let 'ScrollEffect.reset()' set 'is_manual' to True
- [#7796]: EventManagerBase: Fix indentation and typos in the doc
- [#7807]: Textinput: Simplified the swipe feature logic. Fixed a bug that was preventing to show the select all / paste bubble
- [#7814]: :zap: Prevent crash (overflow error) when scrollbar is hidden
- [#7816]: VideoPlayer: Defer before the next frame the default thumbnail and annotations loading

Core-app
--------

- [#7173]: Logger: Do not mutate log record, fixes #7062
- [#7245]: Resources: Add a cache for resource_find
- [#7293]: Properties: Add dynamic screen density/dpi support
- [#7300]: Logger: Remove refactoring artifact
- [#7307]: Logger: Remove purge log's randomized behavior
- [#7326]: Command line: Fix disabling kivy cmd args
- [#7429]: Clock: Print remaining events before next frame upon too much iteration error
- [#7505]: EventLoopBase: Remove provider from auto-remove list
- [#7508]: App: Process app quit event while paused
- [#7512]: EventLoopBase: Start/stop event loop only once
- [#7749]: collections fix for python 3.10
- [#7763]: Removed Python3.6 from the supported ones, it reached EOL
- [#7771]: Explain the '--' separator for option parsing.
- [#7810]: Track whether the clock has started

Core-providers
--------------

- [#7228]: Image: Fix PIL label rendering shadow
- [#7231]: Keyboard: Add keyboard suggestions and fix input type on android
- [#7260]: Camera: Use NSString instead of AVCaptureSessionPreset in order to support MacOS < 10.13
- [#7263]: Camera: Added API to change avfoundation camera provider orientation
- [#7279]: Window: prevent "empty" mousewheel events from breaking scrollview
- [#7290]: Camera: improve avfoundation by using memoryview and re-scheduling the interval on framerate change
- [#7299]: Window: Handle DPI Windows messages until SDL2 handles them
- [#7303]: Camera: Fix AVFoundation provider to release the camera, start it async, and check if started before stopping it
- [#7339]: Camera: Android camera focus mode fix
- [#7347]: Window: Delay binding dpi until window is ready.
- [#7389]: Mouse: Fix mouse being offset by 2 pixels vertically
- [#7390]: SoundAndroidPlayer: Properly stop after playback completion
- [#7409]: Window: Fix logging message
- [#7418]: Video: Reduce latency from user interaction for ffpyplayer
- [#7467]: Text: Raise when registering a font_regular with None
- [#7484]: WindowBase: Add to_normalized_pos method
- [#7517]: Core: Use importlib's __import__ for compatibility with patching
- [#7541]: SoundLoader: Fix play calls not working in ffpyplayer after the first
- [#7620]: removed print and added logging to flipVert
- [#7637]: Added Custom titlebar support
- [#7647]: WindowBase: Change type of clearcolor property to ColorProperty
- [#7648]: WindowBase: Add transform_motion_event_2d method
- [#7688]: Fix dds header comparison
- [#7726]: Window.softinput_mode fix for "pan" and "below_target" modes when using kivy virtual keyboard.
- [#7744]: Change default input_type to null. Add some warning regarding TYPE_TEXT_FLAG_NO_SUGGESTIONS
- [#7770]: WindowBase: Update bind list of properties: system_size, size, width, height and center
- [#7778]: WindowBase: Don't return motion event in transform_motion_event_2d method
- [#7786]: WindowBase: Add on_drop_begin, on_droptext and on_drop_end events
- [#7793]: WindowBase|WindowSDL: Add drop position for all on_drop_xxx events
- [#7795]: WindowBase: Add *args to on_drop_xxx events

Core-widget
-----------

- [#6290]: Widget: Fix signature of add/remove/clear_widget to be consistent with base class
- [#7209]: Animation: Allow canceling all animated widgets
- [#7356]: Widget: Widget.clear_widgets empty widget list does not remove all children
- [#7424]: Properties: Speed up bare widget creation (3X) and property dispatching/setting
- [#7439]: Properties: Drop long number type and document numpy issues with NumericProperty
- [#7442]: EventDispatcher: Removed/replaced all basestring occurrences with str
- [#7445]: EventDispatcher: Rename method unregister_event_types to unregister_event_type
- [#7449]: TextInput: Fix readonly mode preventing using cursor keys, wrapping, and more
- [#7459]: Properties: Accept str-subclass where we accept strings
- [#7536]: EventDispatcher: Add nicer error message for non-existing properties
- [#7658]: Feature: EventManagerBase
- [#7774]: Fix widget.disabled handling of value change of equal truthiness

Distribution
------------

- [#7257]: Setup: Fix buggy detection of cython module name
- [#7362]: Build: No oneliners in [options.extras_require]
- [#7663]: Add python3.10 in the ci configuration
- [#7678]: Add support for Apple Silicon on CI/CD
- [#7711]: Add an option to force a custom search path for SDL2 frameworks + fixes ARCHFLAGS
- [#7762]: macOS deps: Update SDL to 2.0.20 and update SDL_ttf to 2.0.18
- [#7769]: Add Linux AArch64 wheel build support
- [#7777]: Bump to 2.1.0rc1
- [#7802]: Bump to 2.1.0rc1
- [#7804]: Use the `KIVY_RPI_VERSION` env variable to force the build of `egl_rpi` in non Raspi CI builds
- [#7813]: Bump cython and kivy_deps versions to latest
- [#7820]: Patch gst current release to look for dlls in correct place for win store
- [#7821]: Bump to 2.1.0rc2
- [#7822]: Bump to 2.1.0rc3

Documentation
-------------

- [#7010]: Doc: Warn that decorated methods might not be bindable.
- [#7284]: docs: fix simple typo, expressons -> expressions
- [#7286]: Doc: Add negative size warning
- [#7288]: Documentation: Updated prerequisites and supported python version for iOS
- [#7295]: Doc cleanups
- [#7301]: Doc: Add Kivy config example for inverted mtdev events
- [#7305]: Slider: Fix step property docs
- [#7328]: Added documentation for RecycleView viewclass statefullness, including a warning, context paragraph, and minimal example
- [#7342]: TabbedPanel: Doc calling `switch_to` from `__init__`
- [#7344]: App: fix Trio example in docstring
- [#7358]: Doc: Fix doc code formatting
- [#7359]: Fix first doc line being ignored
- [#7366]: Docs: use print() in docs, comment and generated code
- [#7392]: Docs: Fix packaging-osx docs (homebrew)
- [#7432]: Docs: Fix codespell found typos
- [#7435]: Docs: check for "sphinx" in command line
- [#7441]: Docs: Fix creating of docs of compoundselection.py
- [#7451]: Docs: Fix Type Error when creating bytes from array in Python 3
- [#7481]: Doc: Properties spelling fix
- [#7497]: Docs: Use python3 super in example
- [#7560]: Comment references the wrong layout
- [#7561]: Typo on docs, missing "the"
- [#7580]: Fix line number references in basic.rst
- [#7581]: Fixes double word in docs
- [#7592]: Fix missing word in doc/guide/events.rst
- [#7603]: Fixes pong tutorial collision on the right side.
- [#7614]: Fix install command for zsh
- [#7623]: Sphinx: Use class instead of instance in add_lexer + Fixes search on sphinx>1.7.9
- [#7624]: Sphinx: Fixes missing documentation_options
- [#7625]: Update line number references in documentation
- [#7672]: fix various docs
- [#7693]: Remove wording and functions specific to Python 2
- [#7717]: MotionEvent: Fix docstring in dispatch_done method to reference post_dispatch_input
- [#7752]: Improves docs on mobile, fixes duplicated getting started
- [#7757]: Update README.md
- [#7764]: Update license year
- [#7766]: Add support for older Sphinx versions
- [#7773]: Docs review before release 2.1.0
- [#7790]: made code examples user friendly; fixes #7720
- [#7799]: Dark Theme support for docs
- [#7801]: made Generic Prompt unselectable
- [#7815]: MotionEvent: Fix indentation in module doc
- [#7826]: add GitHub URL for PyPi
- [#7830]: EventManager: Fix typo in module doc

Graphics
--------

- [#4854]: Graphics: Add Sdl2 vsync
- [#7270]: Graphics: Check whether user updated GL instructions from external thread.
- [#7277]: SVG: Fix SVG instruction iteration for python 3.9.
- [#7455]: Graphics: Only check for threading issues once graphics is initialized

Input
-----

- [#7387]: Mouse: Update MouseMotionEventProvider to dispatch hover events
- [#7425]: Mouse: Fix computation of relative touch position in MouseMotionEventProvider
- [#7492]: MouseMotionEventProvider: Refactor of provider and tests
- [#7549]: MouseMotionEventProvider: Add disable_hover property
- [#7587]: Fix PermissionError when reconnecting mtdev input devices
- [#7644]: MouseMotionEventProvider: Update doc of disable_hover property
- [#7659]: MotionEvent: Fix scale_for_screen method
- [#7679]: MotionEvent: Fix calculation of z values in scale_for_screen method
- [#7684]: Enable pressure for touches in android (and ios?)
- [#7691]: MotionEvent: Fix keeping of the previous normalized position
- [#7714]: MouseMotionEventProvider: Update simulated touch graphics on window resize or rotate
- [#7785]: Input providers: Assign type_id to MotionEvent subclasses

Tests/ci
--------

- [#7176]: Dev: Add pre-commit.com framework hooks
- [#7292]: Benchmarks: Add benchmarks option measurements to pytest
- [#7461]: AsyncImageTestCase: Fix for test_reload_asyncimage method and cleanup
- [#7464]: Makefile: Add test commands to show missing coverage lines
- [#7466]: Tests: Increase test coverage
- [#7475]: MouseHoverEventTestCase: Skip testing on Windows platform
- [#7483]: MouseHoverEventTestCase: Enable some tests on Windows CI
- [#7493]: GraphicUnitTest: Add clear_window_and_event_loop method
- [#7494]: MouseHoverEventTestCase: Dispatching event on_cursor_leave to cleanup some tests
- [#7495]: CI: Removed unused id_rsa.enc. ssh keys are in the secret env
- [#7502]: MultitouchSimulatorTestCase: Don't render widgets in tests
- [#7509]: CI: Switch rsa ssh key to ed25519 for server upload
- [#7513]: Tests: Latest pyinstaller includes fixes for tests
- [#7515]: GraphicUnitTest: Fix signature of tearDown method to use (*args, **kwargs)
- [#7516]: MouseHoverEventTestCase: Removed skip of test methods on Windows CI
- [#7674]: temporary force python3.9 use in the ci
- [#7676]: Bump support-request to v2. Previous integration has been shut down.
- [#7760]: Fixes benchmark tests on wheels
- [#7780]: Updates action-gh-release and use the default token
- [#7784]: Linux AArch64 wheel build optimization
- [#7794]: Bring perf_test_textinput inline with changes in TextInput
- [#7827]: Increase timeout to avoid failing tests on windows-2022

# Thanks

A big thanks to all of the Contributors, especially those github usernames mentioned here:

0x4A-0x41-0x4B, Akshay Arora, Alexander Lais, Alexander Wolf, Alspb, Andreas Ecker, Andrii Oriekhov, André Sbrocco Figueiredo, Anthon van der Neut, Auskas, Dalton Woodside-Moffatt, Daniel Foerster, Dean Serenevy, Dexer, Dominik Spicher, Eero af Heurlin, Filip Radović, Gabriel Pettier, Geo Maciolek, Ilya Kochankov, Jim Morris, Julian, Kostiantyn Syrykh, Kristian Sloth Lauszus, Lindström Mathias, Louwrensth, Mathieu Virbel, Matthew Einhorn, Mirko Galimberti, Nattōsai Mitō, Pablo Woolvett, Richard Larkin, Robert Niederreiter, Sander Land, Stanislav Syekirin, Steven P. Wells, SubaruArai, The Cheaterman, Tim Gates, Tomas Krizek, VIGNESH KUMAR, Vibhakar Solanki, abayomi185, allerter, baseplate-admin, eric15342335, luzpaz, meow464, onsunsl, oshotton, outdooracorn, salt-die, simon klemenc, snuq, willow, xayhewalo

Read all announcements