Skip to content

Kivy 2.0.0

Compare
Choose a tag to compare
@kivybot kivybot released this 10 Dec 00:57
· 597 commits to master since this release

The Kivy team is happy to announce the release of Kivy 2.0.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.

  • This is the first release to not support Python 2.7 - hence the increase in Kivy's major version to 2. Currently supported Python versions are 3.6 - 3.9.
  • Installation has been largely simplified and all platforms now support a simpler pip install (see below).

Installation instructions and Kivy documentation is available on the Kivy website:

https://kivy.org

or on GitHub.

Installation notes

Kivy can now be installed into your Virtual Environment on Windows, Linux, OSX, and RPi simply with:

pip install kivy[base] kivy-examples
# or to get the media dependecies as well
pip install kivy[base,media] kivy-examples
# or to get most kivy optional dependencies
pip install kivy[full] kivy-examples

* For the RPi, additional system dependencies should be pre-installed.

These selectors allow specifying dependency categories, instead of having to pin Kivy's kivy_deps dependencies to specific versions. These selectors will install the proper dependency version to match Kivy's version.

Additionally, by default, Kivy will install the base dependencies even if base is not specified. In order to facilitate easier install for GUI installation users e.g. in PyCharm. However, this may change as pip evolves and base should be manually specified. Use pip's --no-deps flag to disable it.

See the selector documentation for more details.

Installation from source has also been simplified, relying on pip's pyproject.toml. See the simplified instructions.

Highlights

  • [#6351]: Support for Python 2 has been dropped and Kivy source code is now incompatible with Python 2.

  • [#6368]: Support for async has been added to Kivy. Kivy can now run cooperatively, in the same process or thread as asynchronous code.

    We currently support the stdlib asyncio framework and the excellent trio framework. See the kivy examples for how to use it.

Breaking changes

  • [#6351]: Core: Drop Python 2 support.
  • [#6368]: Core: Add async support to kivy App
  • [#6448]: EventDispatcher: Move __self__ from widget to EventDispatcher and fix tests.
  • [#6467]: Graphics: Change filename to source
  • [#6469]: ModalView: Updating ModalView to improve theming
  • [#6607]: Window: Fix SDL Keycode Typo
  • [#6650]: DropDown/ModalView: Make modal and dropdown consistent
  • [#6677]: Widget: Remove id from Widget.
  • [#6678]: ScrollView: Add always_enable_overscroll property on scrollview
  • [#6721]: Image: Remove gpl gif implementation
  • [#6918]: ColorProperty: Use ColorProperty instead of ListProperty for color property
  • [#6937]: Base: Rename slave to embedded
  • [#6950]: Cache: Raise KeyError if None is used as key in Cache

Changelog

Kv-lang

  • [#6442]: KV lang: Make it easy to copy Builder and Factory and make them all contexts.
  • [#6548]: Factory: Meaningful Error Message
  • [#6880]: KV: Use utf-8 encoding by default on reading .kv files. Fixes #5154

Misc

  • [#6323]: Loader: User agent was not correctly resolved.
  • [#6658]: Garden: Fixes incorrect path to kivy garden libs on iOS
  • [#6703]: Network: Fix https in python3.x
  • [#6748]: Network: Extend certifi usage to ios
  • [#6922]: WeakMethod: Fx and cleanup WeakMethod usage
  • [#6931]: VIM: Fix and improve vim syntax highlighting for kv lang
  • [#6945]: Cache: Don't double copy keys when purging cache by timeout
  • [#6950]: Cache: Raise KeyError if None is used as key in Cache
  • [#6954]: Network: Ignore ca_file on http scheme, fixes #6946
  • [#7054]: Networking: User Agent and Cookies added to UrlRequest

Packaging

  • [#6359]: Packaging: Fix path by setting to bytes
  • [#6643]: PyInstaller: List kivy.weakmethod because pyinstaller doesn't see into cython files
  • [#6772]: PyInstaller: window_info is not included in x86 pyinstaller
  • [#7080]: OSX: Generate Kivy.app on the CI

Widgets

  • [#6288]: TextInput: Cache text property in TextInput
  • [#6362]: Carousel: Let 'Carousel._curr_slide()' prepare for the situation where 'index' is None
  • [#6365]: Carousel: Let 'Carousel.remove_widget()' remove the container of the widget
  • [#6372]: Carousel: make 'Carousel.remove_widget()' not cause 'IndexError'
  • [#6374]: Carousel: Make 'Carousel' able to handle the case where 'loop == True' and 'len(slides) == 2'
  • [#6436]: ColorWheel: Remove bug in algorithm to compute arcs of colorwheel (#6435)
  • [#6469]: ModalView: Updating ModalView to improve theming
  • [#6481]: ScreenManager: Make clear_widgets correctly iterate over screens
  • [#6542]: TextInput: Fixes TextInput Bubble from diseappering immediately after it appears
  • [#6543]: TextInput: Fixes TextInput cursor "rendering" issue
  • [#6574]: TreeViewNode: Fix arrow pos and size
  • [#6579]: Slider: Horizontal value track is offset from the center of Slider
  • [#6624]: Filechooser: Use full path
  • [#6650]: DropDown/ModalView: Make modal and dropdown consistent
  • [#6666]: TextInput: Fix for crashes caused by text selection outside of TextInput area
  • [#6678]: ScrollView: Add always_enable_overscroll property on scrollview
  • [#6741]: GridLayout: Add 'orientation' property to GridLayout
  • [#6815]: Image: Fixes for Image and AsyncImage
  • [#6859]: Slider: Adding allow_stretch to Slider in style.kv
  • [#6879]: VKeyboard: Fix key_background_color property not used
  • [#6897]: RecycleView: Add behavior to set RV data using kv ids
  • [#6905]: FileChooser: Add font property
  • [#6912]: TextInput: Remove 'encode' argument from getter method of 'text' property of TextInput
  • [#6918]: ColorProperty: Use ColorProperty instead of ListProperty for color property
  • [#6942]: ScrollView: Don't crash when scrollview's content is the same size
  • [#6971]: Camera: Fix an inconsistency between docs and code on Camera
  • [#6976]: ModalView: Prevent modalview dismissal without on_touch_down
  • [#6985]: ScrollView: Fix scrollview scroll/effect recursion
  • [#7009]: TextInput: IME support for textinput
  • [#7021]: ColorProperty: Use ColorProperty for remaining color properites
  • [#7032]: ScreenManager: Fix typo in SlideTransition
  • [#7069]: ScrollView: Horizontal scrolling disabled if no overflow
  • [#7074]: Splitter: Fix handling offset
  • [#7118]: GridLayout : optimize GridLayout
  • [#7129]: TabbedPanel: Stop tab buttons from scrolling around
  • [#7196]: ScrollView: fix jumping to bottom when using scrollwheel.

Core-app

  • [#6351]: Core: Drop Python 2 support.
  • [#6368]: Core: Add async support to kivy App
  • [#6376]: Cython: Set cython language_level to py3.
  • [#6381]: Inspector: Use sets to check if inspector should be activated.
  • [#6404]: App: Fix pausing without app instance
  • [#6458]: Core: Fix memory leaks by cleaning up after resources
  • [#6540]: Config: fix erroneous check of KIVY_NO_ENV_CONFIG
  • [#6581]: Dependencies: Bump max cython version
  • [#6729]: DDSFile: ddsfile.py fix for string/bytes comparing for py3
  • [#6773]: Clock: Add correct value of CLOCK_MONOTONIC for OpenBSD
  • [#6798]: Platform: Corrected platform detection on Android
  • [#6910]: Logger: Add encoding
  • [#6926]: Clock: Add clock lifecycle, better exception handling and other cleanup
  • [#6937]: Base: Rename slave to embedded
  • [#6994]: EventLoop: Don't do event loop stuff when stopped.
  • [#7083]: Core: Add _version.py and move updating version metadata to the CI
  • [#7112]: Python: Require python version >=3.6
  • [#7132]: Python: Add support for Python 3.9.
  • [#7151]: Dependencies: Bump cython to 0.29.21
  • [#7178]: Dependencies: Add dependency selection varaibles
  • [#7181]: Logging: Added color support for compatible terminals

Core-providers

  • [#6384]: Window: Allow window providers to indicate which gl backends they are compatible with
  • [#6422]: Label: Fixes multiline label w/ line_height < 1
  • [#6433]: Window: Center cache problem on MacOS
  • [#6461]: Audio: Fix playing audio streams from ffpyplayer
  • [#6507]: Text: Revert "Fixes multiline label w/ line_height < 1"
  • [#6513]: Text: Fix issue #6508 Multiline label w/ line_height < 1 renders badly (workaround)
  • [#6515]: Text: Fixes positioning (valign) issue when using max_lines
  • [#6578]: Window: Revert swap forced sync (#4219) as it causes performance issue
  • [#6589]: Window: Add the ability to show statusbar on iOS
  • [#6603]: Audio: Native audio support for Android
  • [#6607]: Window: Fix SDL Keycode Typo
  • [#6608]: Audio: Replace deprecated variables in audio providers
  • [#6721]: Image: Remove gpl gif implementation
  • [#6743]: Clipboard: xclip less verbose Kivy startup
  • [#6754]: Text: Properly raise errors reading a font
  • [#6947]: Image: Remove 'img_gif' entry from image_libs
  • [#6988]: Camera: Improve avfoundation camera implementation on iOS
  • [#7071]: Camera: Fixes crash during camera configuration
  • [#7102]: Audio: Added loop functionality for SoundAndroidPlayer

Core-widget

  • [#5926]: Animation: Fix kivy.animation.Sequence and kivy.animation.Parallel consistency
  • [#6373]: Properties: Allow observable list and dict dispatch to propagate exceptions.
  • [#6441]: EventDispatcher: Move Widget proxy_ref upwards to EventDispatcher
  • [#6443]: Property: Initialize KV created property with default value
  • [#6448]: EventDispatcher: Move __self__ from widget to EventDispatcher and fix tests.
  • [#6677]: Widget: Remove id from Widget.
  • [#6858]: Effects: Fix update_velocity
  • [#6917]: ColorProperty: Re-add ColorProperty to all list in properties.pyx module
  • [#6930]: Property: Use ObservableList as internal storage for ColorProperty
  • [#6941]: Property: Let ColorProperty accept arbitrary list types.
  • [#6965]: Property: Allow assignment of color names as values for ColorProperty
  • [#6993]: Property: Add kwargs to 'sort' method of ObservableList

Distribution

  • [#6354]: Dependecy: Move cython version info to setup.cfg.
  • [#6355]: Dependency: kivy_deps need to be imported before any modules.
  • [#6356]: Dependency: Bump cython to 0.29.10 to fix CI building.
  • [#6397]: Install: Automatically discover kivy sub-packages
  • [#6562]: RPi: Autodetect when we are on a Raspberry Pi 4
  • [#6568]: CI: Cross compile wheel for armv7l (Raspberry Pi 4) using Github Actions CI
  • [#6642]: Install: Switch to using pyproject.toml and setup.cfg for metadata
  • [#6656]: Wheel: Don't package examples in the wheel
  • [#6662]: CI: Compile wheels for Raspberry Pi 1-3 using the CI
  • [#6670]: Dependencies: Fix CI PyPI upload and pin to latest kivy_deps versions.
  • [#6674]: Sdist: Cannot handle carriage return in description.
  • [#6769]: RPi: Kivy now works on the Raspberry Pi 4 without X11
  • [#6774]: Install: Build the extensions in parallel if the options has not been set
  • [#6852]: Platform: Fix android platform detection when using p4a
  • [#6854]: Install: Reuse kivy_build var (complements #6852)
  • [#6891]: Cython: Update to latest cython version
  • [#6990]: Installation: Make setuptools use its local distutils
  • [#7084]: Dependencies: Add min basic dependencies to install requirements.
  • [#7110]: Makefile: Detect python verion and gracefully fail on unsupported version
  • [#7152]: RPi: Stop building wheels for RPi stretch
  • [#7154]: Anconda: Respect SDKROOT and use_osx_frameworks
  • [#7157]: Makefile: Try python3 first as python may point to python2.
  • [#7159]: Makefile: Use python3 if it's present.
  • [#7195]: Inlcude doc in PR checklist

Documentation

  • [#6352]: Docs: force to use sphinx 1.7.9 to restore search
  • [#6377]: Docs: Embed func signatures in cython to help IDEs.
  • [#6383]: Doc: Create FUNDING.yml
  • [#6389]: Doc: Fix linux install docs and update garden instructions
  • [#6398]: Doc: Update clock.py - Corrected typo
  • [#6399]: Doc: Fix pip link
  • [#6427]: Doc: Add comment on required pip version
  • [#6459]: Docs: fix wrong highlights
  • [#6466]: Docs: Config docs update
  • [#6478]: Examples: Fix lack of white-space after ":" in pong.kv
  • [#6479]: Doc: Fix typos, grammar in install instructions
  • [#6485]: Doc: Fix KIVY_EVENTLOOP doc
  • [#6491]: Doc: Fix Widget.pos_hint doc
  • [#6510]: Doc: Few minor fixes in the doc.
  • [#6511]: Doc: Update note about kivy-ios python version
  • [#6523]: Doc: Remove reference to Kivy Designer
  • [#6537]: Doc: fix GridLayout doc
  • [#6558]: Examples: Fixed depreciated option for twisted, and sys.exc_call is only run in py2
  • [#6625]: Doc: Update CONTRIBUTING.md
  • [#6636]: Example: Missing directory replaced in colorpicker #6599
  • [#6638]: Docs: Fix typo
  • [#6641]: Doc: Fix TextInput typos cursor row/col
  • [#6683]: Doc: Fix spinner kv example
  • [#6694]: Doc: Fix css on docs
  • [#6712]: Doc: Revisit of the Windows installation instructions
  • [#6714]: Doc: Fix spelling errors
  • [#6750]: Doc: Update packaging-windows.rst
  • [#6775]: Doc: Fixed the gallery documentation
  • [#6778]: Doc: Updated Raspberry Pi 4 doc on HW acceleration
  • [#6780]: Doc: Make RPi SDL2 install instructions clear
  • [#6813]: Example: bugfix for 3D rendering example
  • [#6821]: Doc: Expand on the current logger docs
  • [#6863]: Doc: Add missing hid input parameter
  • [#6868]: Doc: iOS - migrates to the new install procedure
  • [#6882]: Example: Improved ScreenManager example
  • [#6895]: Doc: Add annotations to proxies.
  • [#6924]: Doc: Buildozer is now in Beta.
  • [#6927]: Doc: Improvements to kv lang docs
  • [#6938]: Doc: trigger_action warning / documentation updates
  • [#6963]: Doc: Correct comments to use proportion, not percent
  • [#6969]: Doc: Fix docs for on_dropfile
  • [#6975]: Doc: Update the dev installation instructions
  • [#6977]: Doc: Add some typing to clock
  • [#6979]: Doc: Remove duplicate python3-pip
  • [#7002]: Doc: Print about KIVY_NO_ARGS when printing usage.
  • [#7022]: Doc: Update doc for all instances of ColorProperty
  • [#7038]: Doc: Fix on_ref_press documentation
  • [#7039]: Doc: fixed typo in hbar doc string
  • [#7043]: Doc: fixed doc string
  • [#7160]: Examples: Add Recycleview examples
  • [#7179]: Docs: Switch to staging docs on kivy-website-docs
  • [#7222]: Docs: minor typo fix in layout docs
  • [#7240]: Docs: Re-write install docs.
  • [#7241]: Docs: Add changelog to docs

Graphics

  • [#6457]: Graphics: Fix "Error in sys.excepthook"
  • [#6467]: Graphics: Change filename to source
  • [#6472]: Graphics: Fix relative import for the egl backend
  • [#6533]: Graphics: Fixes fbo/renderbuffer freeze on iOS
  • [#6702]: Graphics: Adding support for non-file SVGs
  • [#6777]: Graphics: Also set points _mode propery to LINE_MODE_POINTS
  • [#6808]: Graphics: Fix Svg consistency #6467
  • [#6844]: Graphics: Use GLES context when ES2 is forced
  • [#6846]: Graphics: Revert "Use GLES context when ES2 is forced"
  • [#6978]: Graphics: fix ignored alpha value in hsv mode

Input

  • [#6319]: Mouse: Fix ctypes definition to work with other packages
  • [#7065]: Mouse: Added support for the mouse4 and mouse5 buttons

Tests/ci

  • [#6375]: CI: Fix CI failure, 3.5.7 doesn't have compiled binaries.
  • [#6390]: CI: Python 3.5 doesn't seem to work anymore on travis bionic.
  • [#6403]: CI: Remove osx workarounds as it breaks the build.
  • [#6415]: Test: Add tests for coordinates translation
  • [#6417]: Test: Add preliminary support for coverage for kv files.
  • [#6482]: CI: Remove usage of KIVY_USE_SETUPTOOLS
  • [#6503]: CI: Fix rtd builds
  • [#6514]: Test: Add test method for touch to follow a widget's position
  • [#6516]: CI: Don't use the Window when computing dp during docs generation
  • [#6554]: CI: Build latest .DMG for osx app
  • [#6556]: CI: Update .travis.yml for osx app on master
  • [#6565]: Test: Add ability to specify offset from widget pos
  • [#6570]: CI: Enable Python 3.8 wheel generation for osx
  • [#6595]: Tests: Fix test failures in Python 3.8 (fixes #6594)
  • [#6618]: Test: Don't preset async_sleep
  • [#6622]: CI: Switch from Travis/Appveyor to GitHub Actions
  • [#6659]: CI: Use pip to build wheel so it uses pyproject.toml.
  • [#6669]: CI: Test generated wheels and sdist
  • [#6673]: CI: Latest twine doesn't support py3.5
  • [#6681]: CI: Switch to flake8 and fix PEP8 issues
  • [#6682]: CI: Create all the wheels before doing any uploads
  • [#6771]: GitHub: Update issue templates to new format
  • [#6845]: Tests: Fix failing tests
  • [#6855]: CI: Upgrade to actions/checkout@v2 & actions/setup-python@v2
  • [#6892]: Test: Fix failing coverage
  • [#6940]: CI: Fix linux SDL2
  • [#6951]: Tests: Refactors test_urlrequest.py
  • [#7115]: CI: Remove mcnotify integration
  • [#7147]: PEP8: Fix PEP8 issues
  • [#7174]: Tests: Warn that async app test framewrok may be removed from kivy.
  • [#7201]: CI: Test all wheel versions, not just one per OS
  • [#7203]: Tests: Ensure Bubble uses it's superclass's valid private API

Branching

The new stable branch is now derived from the 2.0.0 tag. The oldest stable branch has been renamed to stable-1.11.1. If you still want to compile on android with this branch, use "kivy==stable-1.11.1" as requirement. We do not support previous versions, so if things doesn't work anymore due to changes in python-for-android, please take time to update your application.

Thanks

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

0x005c, Abenezer Adane, Akshay Arora, Alexander Taylor, Andre Miras, Andreas Ecker, Armin Sebastian, Asad Rauf, Cheaterman, Chris Hamberg, Christian Sirolli, CristiFati, D4SK, Daniel, ElliotGarbus, Evstifeev Roman, Felix Yan, Filip Radović, Franccisco, Francisco Bustos, Gabriel Pettier, Gabriel Vogel, Galland, Holger Badorreck, Howard Chang, Hudson Barkley, Ibrahim Cetin, Ivan Djuricic, Joao S O Bueno, Jordan Emerson, Joseph Kogut, Julian, Julian-O, Juraj Fiala, Kristian Sloth Lauszus, Lucas Samaruga, Ludwig Kraatz, Mathias Lindström, Mathieu Virbel, Matthew Einhorn, Matthias Harrer, Michal Smrž, Mirko, Mirko Galimberti, Niklas Hasselmeyer, Nikolay Sedelnikov, Nils-Hero Lindemann, Olivier Boesch, Pol Canelles, Rafa, Rafał Kropidłowski, Richard Larkin, Sander Land, Sebastian Engel, Shashi Ranjan, Vibhakar Solanki, WutDuk?, Zachary Spector, Zen-CODE, akshauaurora, bajisci, chadys, comet, crigaut, eriksandberg, fluxrider, fruitbat, gottadiveintopython, ia7ck, luphord, matham, noEmbryo, pythonic64, quitegreensky, rafalou38, s0h3ck, salt-die, samize, sanderland, shreyash, snuq, td1803, vicendithas, wezu, yves-surrel, 水戸う納豆齋(Nattōsai Mitō)

Hope we mentioned them all.

--
Kivy Team
https://kivy.org/#aboutus