Commit Graph

465 Commits

Author SHA1 Message Date
Peter Badida 6553ad4409
Merge pull request #409 from kivy/fix/method_order_inheritance
Fix method order inheritance
2019-02-20 22:00:43 +01:00
Gabriel Pettier 5fd6a53f98 add simple test case or method order in inheritance
fixes #408
2019-02-20 21:39:29 +01:00
Gabriel Pettier b748257a66 make sure methods are discovered in reverse-inheritance order
fix for #408
2019-02-20 21:39:29 +01:00
Peter Badida 5f6aa738b2
Bump to 1.2.1.dev0 2019-02-04 10:58:50 +01:00
Peter Badida 8f3b16e23b
Bump to 1.2.0 2019-02-04 10:45:24 +01:00
Peter Badida afd9b42ba5
Get JDK/JRE path pythonically (#399)
* Get JDK/JRE path pythonically

* Run os.readlink() only on Unix-like OS

* Copy environ to Popen for 'which java(c)'

* Switch to check_output

* Use os.path.realpath

* Fix bytes/unicode
2019-02-04 10:35:25 +01:00
Peter Badida 8e04a69dad
Merge pull request #402 from kivy/KeyWeeUsr-patch-1
Add installation instructions for macOS
2019-02-04 00:13:59 +01:00
Peter Badida 737ef99838
Add installation instructions for macOS 2019-02-04 00:11:47 +01:00
Peter Badida a2668edc08
Merge pull request #400 from kivy/fix_intlongconv
Convert java.lang.Long to INT if < 2 ** 31 else to LONG on Py2
2019-02-03 19:53:43 +01:00
Peter Badida 306b012f39 Fix int/long issue at jnius_proxy.py_invoke0
We need to make a difference between the int and long on Py2 because
of the different storage size which can cause 0L being returned even
if 0 (int) is passed into the function.

    2 ** 31
+-----+-----+
|int  | xxx |
|    long   |
+-----+-----+
2019-02-03 19:52:51 +01:00
Peter Badida dfecb9eb75
Merge pull request #401 from kivy/tito-patch-1
Update README.md to add opencollective
2019-02-03 09:50:39 +01:00
Peter Badida 4db08d5488 Revert "Convert java.lang.Long to INT if < 2 ** 31 else to LONG"
This reverts commit 54c5678ac6.
2019-02-03 00:50:02 +01:00
Mathieu Virbel 6f77636482
Update README.md to add opencollective 2019-02-03 00:33:08 +01:00
Peter Badida 54c5678ac6 Convert java.lang.Long to INT if < 2 ** 31 else to LONG
LONG is in Py3 merged with INT type and renamed to INT without 'L' being
present in the string representation of the number but having the full
storage capacity of LONG. On Py2 however it will cause type issues when
we convert java.lang.Long with size < 2 ** 31 into Py2 long and convert
it back. Therefore convert java.lang.Long to Py2 long *only* if it exceeds
the maximum value of INT (2 ** 31).
2019-02-02 23:49:31 +01:00
Peter Badida 14ad564034 Raise exception if JAVA_HOME is missing on Win
otherwise it throws some error with None because value[-3:]
2019-02-02 23:30:13 +01:00
Peter Badida 27b43cd5dd Add test for INT vs LONG conversion on Py2
int and long are the same on py3, but we do care about the conversion from Python too which in case INT is >=2**31 then Java might have problem with that and it could cause issues for the users
2019-02-02 23:18:30 +01:00
Peter Badida b1ef7af97d
Merge pull request #395 from kivy/fix_constructor_exception
Always check for exception JavaClass.call_constructor()
2019-02-01 15:36:09 +01:00
Peter Badida 8902433a98
Merge pull request #398 from kivy/KeyWeeUsr-patch-1
Add warning about Java class comparing (.hashCode())
2019-02-01 15:02:44 +01:00
Peter Badida 62a8e10dbc Add test for Java constructor 2019-02-01 14:05:45 +01:00
Peter Badida 76f4720385
Add warning about Java class comparing (.hashCode()) 2019-02-01 13:37:57 +01:00
Peter Badida e8c28d0f07
Add Java getClass() alternative to __javaclass__ for Something.class 2019-02-01 12:59:26 +01:00
Peter Badida 83a9a00cf3 Always check for exception JavaClass.call_constructor() 2019-02-01 12:44:38 +01:00
Peter Badida 144f71c2b3
Merge pull request #394 from kivy/fix_conversion
Fix conversion methods accepting java.lang.Object
2019-02-01 11:32:41 +01:00
Peter Badida f5beb75825
Merge pull request #397 from kivy/ref_enum_test
Refactor test for java.lang.Enum
2019-02-01 11:31:33 +01:00
Peter Badida 920fd32809 Refactor test for java.lang.Enum 2019-02-01 02:10:47 +01:00
Peter Badida dcc3638b28
Merge pull request #396 from kivy/docs_jni_reftable
Document local ref table overflow resolved on Android 8.0+
2019-01-31 23:28:27 +01:00
Peter Badida 080f669f64 Document local ref table overflow resolved on Android 8.0+ 2019-01-31 23:25:54 +01:00
Peter Badida b454ecb2fd Use PY2 to separate CPython 2/3 for compat 2019-01-31 18:02:00 +01:00
Peter Badida d6b14100be Fix baking of len() calls in jnius_utilx.pxi 2019-01-31 17:52:04 +01:00
Peter Badida 4731266a17 Add test for Python numeric types as parameters 2019-01-31 16:53:39 +01:00
Peter Badida 14fa9401a1 Convert Python numeric types if method accepts java.lang.Object 2019-01-31 15:28:22 +01:00
Peter Badida 1ca8173f47 Add compat bool for PY3 instead of always comparing versions 2019-01-31 15:28:22 +01:00
Peter Badida 6417502ce7 Bake len() calls for jnius_utils.calculate_score 2019-01-31 15:28:22 +01:00
Gabriel Pettier d1dd01b6cf
Merge pull request #393 from kivy/verbose_exceptions
Include signatures to exceptions
2019-01-31 15:27:50 +01:00
Peter Badida fd2e5e0edc
Fix exception message 2019-01-31 15:25:26 +01:00
Peter Badida 996c0a7902 Include signatures to exceptions 2019-01-31 11:56:39 +01:00
Peter Badida ca6dd7b42e
Merge pull request #392 from kivy/explain_pykeywords
Explain accessing Java members named as Python keywords
2019-01-30 19:48:46 +01:00
Peter Badida da5ec3e24c Explain accessing Java members named as Python keywords 2019-01-30 19:32:28 +01:00
Peter Badida 6a9aa1cc5d
Merge pull request #387 from kivy/test_arguments
Add test for Python to Java function arguments conversion
2019-01-05 18:42:31 +01:00
Peter Badida 186e5a4989 Fix missing 'to_unicode()' call 2019-01-05 17:15:37 +01:00
Peter Badida 5dd372656d Fix incorrect test case for bytes as argument 2019-01-05 15:10:49 +01:00
Peter Badida 1c747af560 Switch all 'basestring' to 'jnius_compat.base_string' 2019-01-05 15:09:53 +01:00
Peter Badida d1647b6952 Create compat file to handle basestring issues and more 2019-01-05 15:09:26 +01:00
Peter Badida e83ca49978 Add test for Python to Java function arguments conversion 2019-01-03 22:42:59 +01:00
Peter Badida 291c9cc071
Merge pull request #386 from kivy/conv_pyarray_jobject
Convert Python array-like structures properly to Java Objects
2019-01-03 21:27:08 +01:00
Peter Badida 6f49798bd9
Remove incorrect explanation of no matching method error 2019-01-03 21:23:49 +01:00
Peter Badida 6a59b4eb06 Add example of nested arrays and Python tuple/list as func arg 2019-01-03 00:06:41 +01:00
Peter Badida 01c2590298 Handle case when passing an empty Python tuple/list to Java function as argument 2019-01-02 23:45:47 +01:00
Peter Badida 4d574860cb Fix indentation and debug info in JavaExceptions
no 'definition' or 'pyarray' was visible due to using JavaException.__init__ counterintuitively (98e4f2f1c3/jnius/jnius_export_class.pxi (L11)
2019-01-02 22:27:02 +01:00
Peter Badida 32ed8b9113 Allow conversion from Python array-like structures to bare java.lang.Object 2019-01-02 21:10:35 +01:00