Commit Graph

12696 Commits

Author SHA1 Message Date
Tom Dudley 0455d2008b
Fix backticks typo in pong tutorial (#8034) 2022-10-16 09:19:30 +02:00
Romain Heller 90400b656e
Typo : German Keyboard is QWERTZ (#8027)
And upper G as in other files.
2022-10-05 20:16:57 +02:00
Romain Heller dd4ae807e1
Typo : missing coma in the doc (#8026) 2022-10-05 20:15:02 +02:00
Mirko Galimberti 476061be51
Since ffpyplayer now ships cp310 and Apple Silicon compatible wheels, we can now switch back to full install (#7847) 2022-10-04 21:44:44 +02:00
Mirko Galimberti 8ff315bb5a
Release the GIL when performing SDL_GL_SwapWindow call. (#8025) 2022-10-03 20:04:33 +02:00
Robin Picard e501a07634
Reset is_space to 0 for each line (#7999) 2022-10-02 22:28:10 -04:00
Mirko Galimberti 0077e6d0df
Use urlopen instead of build_opener when fetching files from 'internet'. Removes some PY2 compat. (#7994) 2022-10-02 21:19:16 +02:00
Paul Cochrane b873d82e9a
Use consistent source code notes in pong tutorial (#7929)
* Highlight parenthetical expression with hyphens

The expression "and source code files for each step" was only partially
in a parenthesis: there wasn't a closing comma after the word "step" to
highlight that the expression was extra information in the sentence.
This commit changes the punctuation around the parenthetical expression
to use hyphpens to make it stand out more and adds the missing closing
punctuation.

* Add missing full stop at end of note sentence

Since this note is a sentence, it probably should have a full-stop at
the end.

* Mention source location consistently in pong tutorial

The two notes mentioning the source code location were formatted
differently.  To be consistent, they both now use the same formatting.
2022-10-02 20:49:15 +02:00
Paul Cochrane ce0bf8c7dc
Purge trailing whitespace in docs source files (#7930)
Trailing whitespace is forbidden in source code for this project
(implemented as part of the PEP8 checks), however the documentation
source files contained trailing whitespace.  It seemed appropriate to
remove trailing whitespace in the documentation source files as well.
2022-10-02 20:47:05 +02:00
Anders 8abdd19df1
Update builder.py (#8021) 2022-10-02 20:16:57 +02:00
RobertF fd12906efa
Android Lifecycle convergence (#7989)
* Android pause on back key/gesture

Replaces previous divergence between Android and Kivy state machines.

* Android exit app when on_pause returns False

Corrects previous behavior where Kivy app stops, but Android does not stop.

* stop() - set Android state

Let Kivy app state follow Android state.

* Add pause()

* typo

* Disambiguate

It is unclear it "default case" refers to existence of a return statement, or existence of a method.

* add versionadded

* pep8

* pep8

* pep8

* Update kivy/app.py

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>

* Update app.py

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
2022-10-01 11:27:05 +02:00
Mirko Galimberti d9e0b4c72e
Bump kivy_deps.sdl2 and kivy_deps.sdl2_dev to 0.5.0 (#8004) 2022-09-10 19:00:13 +02:00
Julian 56d5ded4f8
Added support for KIVY_LOG_MODE (#7988)
* Add support for KIVY_LOG_MODE

Including:

* New unit tests
* Limiting some unit tests to some modes.
* Adding pytest markers to allow quick testing of relevant tests, without repeating unaffected tests.
* Removing KIVY_LOG_MODE=TEST which has been subsumed by PYTHON mode.
* Added an xfail test for another Issue while I am here.
* Documentation additions.

* Mention environment variable control of the logger in the config description.

* Mute Config-file driven log level changes

When in PYTHON mode, the Config file's ability to change levels should be muted.

* Fixed items identified in Review #1.

* Typo in documentation

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>

* Suppress coverage report until end.

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
2022-09-10 09:48:30 +02:00
Mirko Galimberti 6b6f112738
Bump SDL2, SDL2_image, SDL2_mixer, SDL2_ttf versions to latest stable release (#7974) 2022-08-31 22:57:47 +02:00
luzpaz 243ef96388
Fix source typo in test_uix_bubbles.py (#7987)
Changed `assertTestBubbleLayoutWithPredifinedArrowPos()` to `assertTestBubbleLayoutWithPredefinedArrowPos()`
2022-08-29 00:32:30 +02:00
Julian 81a39bbc0e
#7978: Don't monkey-patch logging.root (#7979)
* Move logging handler installation code into a function.

Also, move color terminal detection into its own function to reduce local complexity.

* Move handlers to root level, instead of monkey patching.

* Add blank lines.

* Flake8 fixes

* Use kivy.utils.platform

Its algorithm is more exhaustive than a simple env var check.
2022-08-28 09:07:08 +02:00
Julian 5981bce450
Handle non-strings in logs. (#7985)
LogRecords may contain non-string messages (not just non-string args) that aren't converted to strings until the last moment (to save expensive effort if the log message is never emitted).

Bug introduced with Colored/UncoloredLogRecords did not convert to str before replacing colour markings (if any).

str() added.
Unit tests added (used to fail, now pass)
2022-08-28 09:04:06 +02:00
Julian 9d6bd547d2
Better comments and light clean up of stderr handling. (#7975) 2022-08-26 16:43:16 +02:00
Chris Vincent 9922e12619
Ellipse: update angle_start, angle_end to explicit floats (#7860)
* Ellipse: update param types in docs

Ellipse parameters `angle_start` and `angle_end` are now called as `float` in docs instead of `int`

* Ellipse: change default param to floats

For additional clarity, change `angle_start` and `angle_end` default values to floats (0.0, 360.0)
2022-08-25 11:55:03 +02:00
Julian 2d9755ad8a
Support KivyLogMode environment variable for logging testing (#7971)
* Support KivyLogMode for logging testing

Also:
Remove unused imports.
Remove Python 2 only code
Run through Black to canonicalize formatting

* Undo formatting changes

Undo black.
2022-08-25 09:20:39 +02:00
Mirko Galimberti ceb6bdb02e
Bump KIVY_CONFIG_VERSION and add a warning for future changes. (#7973) 2022-08-24 21:04:21 +02:00
luzpaz 2efdc26461
Fix typos (#7915)
Found via `codespell -q 3 -S ./doc/sources/changelog.rst -L als,ba,childrens,childs,co-ordinate,co-ordinates,datas,enew,everytime,inout,iself,quitted,tesselate,tesselated,tesselator,ths`
2022-08-24 20:05:42 +02:00
Julian f6d8890ceb
Fix trivial typo in workflow. (#7972) 2022-08-24 19:06:49 +02:00
Mirko Galimberti 7c5ea95eae
Config is not available when generating docs + Use getdefault instead of has_option + get (#7969) 2022-08-24 08:42:45 +02:00
Julian c5ff6db790
Refactored logging.ColoredFormatter to avoid deepcopy. (#7962)
* Refactor ColoredFormatter

Removed old formatter and support code.
Added 3 LogRecord shims, new formatter, new unit tests for above and a unit test that used to fail to confirm bugs have been fixed.

* PEP8 fixes

Match project-style.

* PEP8 fixes

(I can't run `black` on these files without
making the review too hard.)

* PEP8 Fixes

Note to self: Do a `black` refactor of key files so I don't get stuck in this loop again.
2022-08-23 18:15:30 +02:00
NomadDemon 4841427812
fix(UrlRequest): Add "on_finish" and add alternative implementation (#7913)
* fix(UrlRequest): Add "on_finish" and add alternative implementation

- Added "on_finish" callback to URlRequest, it fires always when the request is done
- Added alternative implementation for UrlRequest based on REQUESTS lib
- It have also implemented "on_finish" and "auth" params for easy BASICAUTH handling
- Refactored tests of new implementation to be mocked by RESPONSES, so we dont need real network to test nor we dont ping real servers during tests
- Made selectable implementations of URLlib and Requests.
- Urllib is still default implementation
- Refactored baseclass to be used with "plugins"

* fix docs and add "implementation" in config

- There was missing docs in some places
- Minor "unused variables" fixes
- Add "implementation" key to config.network
2022-08-23 01:07:59 +02:00
水戸う納豆齋(Nattōsai Mitō) 49a5f807d6
Add doc for Canvas.add() (#7946) 2022-08-16 15:42:48 +02:00
Mirko Galimberti 6d3c7ba105
Fixes NO DOCUMENTATION (module kivy.uix.recycleview) (#7916) 2022-08-16 15:34:56 +02:00
Julian 59441184fb
Use AddLevelName in kivy.Logger to define TRACE (#7958)
Addresses #7957

One unit test that shows no regression.
One unit test that used to fail and now passes to show issue is addressed.
2022-08-16 15:17:29 +02:00
Mirko Galimberti bb5a857242
Fixes some E275 - assert is a keyword. + other minor PEP8 fixes (#7943)
* Fixes some E275 - assert is a keyword

* Fix E501
2022-08-12 18:25:37 +02:00
Mirko Galimberti 714f493508
When using pytest_asyncio for tests, function should be decorated with pytest_asyncio.fixture (#7917) 2022-07-28 18:57:26 +02:00
Paul Cochrane 97a6d0bb82
Add missing closing paren in hint text (#7928)
The hint at the end of the pong tutorial associated with making the game
end after a certain score was missing its closing parenthesis.
2022-07-28 16:07:45 +02:00
Paul Cochrane ab79f681f9
Fix minor typo in pong tutorial code comments (#7927)
While reading through the pong tutorial code, I noticed that `of` should
have been `off` in code comments.  This commit fixes the issue.
2022-07-28 16:07:29 +02:00
Mirko Galimberti a921b58baa
Migrate from probot/no-response to lee-dohm/no-response (#7903) 2022-07-10 17:22:34 +02:00
Dexer 6c763d4f9a
store texture in cache (#7908) 2022-07-04 21:25:50 +02:00
Hugo van Kemenade e6c144b542
Replace deprecated logging.warn with logging.warning (#7906) 2022-06-28 20:01:44 +02:00
Akshay Arora 538cc2468d
Merge pull request #7905 from misl6/fix/bubble-copy-paste
Fix TextInputCutCopyPaste widget
2022-06-23 11:42:04 +05:30
Mirko Galimberti 88b34e190a Fixes TextInputCutCopyPaste 2022-06-21 22:42:13 +02:00
Akshay Arora 37292f00a8
Merge pull request #7882 from AnthonyZi/feature/rework_bubble
Re-implements the Bubble widget.
2022-05-30 22:09:14 +05:30
AnthonyZimmermann 01f8e36a03 Updates following the PR review comments
Updates documentation:
- Adds further documentation
- More details about 'versionadded' and 'versionchanged'

Little improvement/fix (found during update of the documentation):
- Update the arrow image size information on arrow_image change.
2022-05-26 12:08:22 +02:00
Mirko Galimberti d79329d908
Our self-hosted Apple Silicon runner now has been migrated to actions/runner v2.292.0 which now supports arm64 natively (#7885) 2022-05-25 21:32:45 +02:00
AnthonyZimmermann@Thinkpad f7e7a5a687 Adapts existing code to Bubble changes
The textinput uses a Bubble for "cut", "copy", "paste" functionality.
Three example scripts and kv files contained the Bubble widget.

Signed-off-by: AnthonyZimmermann <anthony.zimmermann@protonmail.com>
2022-05-17 23:10:05 +02:00
AnthonyZimmermann@Thinkpad d7ee4d1ab1 Implements tests for the Bubble widget
Core functionality tests:
- Rendering
- Add/remove content
- Error handling if two child widgets are added to the Bubble
- Test BubbleContent, BubbleButton

Arrow positioning and Bubble sizing:
- parameterized tests for predefined arrow_pos arrow positioning (12
  tests)
- parameterized tests for flexible flex_arrow_pos arrow positioing (40
  tests)

Signed-off-by: AnthonyZimmermann <anthony.zimmermann@protonmail.com>
2022-05-17 23:09:37 +02:00
AnthonyZimmermann@Thinkpad 1717a414c8 Re-implements the Bubble widget.
The old Bubble widget design was complicated and used a GridLayout with
multiple dummy widgets solely to get an arrow placed as desired.
Multiple magic numbers like 99 columns or 99 rows were undocumented
and unintuitive. Probably some of these numbers even add unnecessary
limitations to the Bubble widget.
The Bubble widget was fused with the 'BubbleContent' which by design
makes the Bubble widget feel very unflexible.
Sizing the Bubble according to the content was unintuitive if not even
impossible for some cases and the arrow positioning was relying on magic
numbers as well. Lastly, the old implementation lacked test coverage
with very few tests that did not even cover the core logic of the
widget.

The new implementation reduces the core logic (formerly "on_arrow_pos",
~100 lines of code) to ~30 lines plus a well documented lookup structure
without magic but intuitive values. Furthermore, it adds proper inline
documentation for maintainers.

Furthermore, completely flexible arrow positioning was implemented and
allows free positioning of the arrow to all sides of the content by
selecting a (relative) position on the Bubble widget border.

The BubbleContent widget is a seperate styled BoxLayout and the code and
documentation makes clear that any other Widet or Layout can be placed as
content. The background_color, border and border_auto_scale properties
have been attached to the BubbleContent instead of the Bubble itself
which removes the unnecessary connections between the Bubble itself and it's
BubbleContent.

Properties, that refer to multiple dimensions are cleanly integrated
through ReferenceListProperties.

The rework of the Bubble widget fixes the issue #4348 which had been
opened in 2016 and remained unsolved.

Minimal changes are necessary for existing applications using the Bubble
widget:
- A BubbleContent (can be any Layout or a single Widget) is added as only child
  to the Bubble (similarly to the ActionBar/ActionView widgets).
- The background_color, border and border_auto_scale properties have
  been removed from the Bubble as they belong to the BubbleContent

Signed-off-by: AnthonyZimmermann <anthony.zimmermann@protonmail.com>
2022-05-17 23:07:02 +02:00
Cecil Curry 93ccd2058c
Documentation: bump Gentoo install instructions (#7870) 2022-04-25 21:46:01 +02:00
RobertF 0e77e2ab94
iOS camera provider enhancements (#7857)
* Update camera_avfoundation.pyx

* Update camera_avfoundation_implem.h

* Update camera_avfoundation_implem.m

* Update camera_avfoundation_implem.m

* Update camera_avfoundation_implem.m

* Update camera_avfoundation_implem.h

* Update camera_avfoundation.pyx

* Update camera_avfoundation_implem.m

* Update camera_avfoundation_implem.h

* Update camera_avfoundation.pyx

* Update camera_avfoundation_implem.m

* Update camera_avfoundation_implem.m
2022-04-20 19:17:06 +02:00
Mirko Galimberti 4fbf9059ce
Tests (apple-silicon-m1 only): Fixes 3.8.x pyenv install due to a recent change in clang (#7854) 2022-03-29 20:43:39 +02:00
Mirko Galimberti 06c15c1f75
Merge pull request #7837 from misl6/bump-dev/2.2.0.dev0
Bump to 2.2.0.dev0
2022-03-06 17:33:28 +01:00
Mirko Galimberti 023bd79b90
Prepare 2.1.0 release (#7835) 2022-03-06 09:10:08 +01:00
Mirko Galimberti b9939282c1
Add 2.1.0 changelog (#7831) 2022-03-06 08:15:12 +01:00