From 9a9d351298fad1969fe1c05eb2d9312185dc8327 Mon Sep 17 00:00:00 2001 From: Adam Kosiara Date: Wed, 6 Oct 2021 17:10:40 +0200 Subject: [PATCH 1/9] Add support for java.lang.Class array --- javaobj/v1/marshaller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javaobj/v1/marshaller.py b/javaobj/v1/marshaller.py index 92b376e..ccc234c 100644 --- a/javaobj/v1/marshaller.py +++ b/javaobj/v1/marshaller.py @@ -537,6 +537,8 @@ def _write_value(self, raw_field_type, value): self.write_object(value) elif isinstance(value, JavaString): self.write_string(value) + elif isinstance(value, JavaClass): + self.write_class(value) elif isinstance(value, (BYTES_TYPE, UNICODE_TYPE)): self.write_blockdata(value) else: From 9dee0146b45377abf59692c2a1af459222164ee0 Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 20 Feb 2022 14:57:58 +0100 Subject: [PATCH 2/9] Fixed Flake8 issues in v2 Type hinting on non-imported types --- javaobj/v2/api.py | 38 ++++++++++++++++++++++++++---- javaobj/v2/beans.py | 4 ++-- javaobj/v2/core.py | 47 +++++++++++++++++++------------------- javaobj/v2/main.py | 4 ++-- javaobj/v2/stream.py | 4 ++-- javaobj/v2/transformers.py | 22 +++++++++--------- 6 files changed, 74 insertions(+), 45 deletions(-) diff --git a/javaobj/v2/api.py b/javaobj/v2/api.py index cfcf462..fc02deb 100644 --- a/javaobj/v2/api.py +++ b/javaobj/v2/api.py @@ -26,11 +26,15 @@ from __future__ import absolute_import -from typing import Optional +from typing import List, Optional -from .beans import JavaClassDesc, JavaInstance # pylint:disable=W0611 -from .stream import DataStreamReader # pylint:disable=W0611 from ..constants import TypeCode # pylint:disable=W0611 +from .beans import ( # pylint:disable=W0611 + JavaClassDesc, + JavaInstance, + ParsedJavaContent, +) +from .stream import DataStreamReader # pylint:disable=W0611 # ------------------------------------------------------------------------------ @@ -44,6 +48,32 @@ # ------------------------------------------------------------------------------ +class IJavaStreamParser: + """ + API of the Java stream parser + """ + + def run(self): + # type: () -> List[ParsedJavaContent] + """ + Parses the input stream + """ + raise NotImplementedError + + def dump(self, content): + # type: (List[ParsedJavaContent]) -> str + """ + Dumps to a string the given objects + """ + raise NotImplementedError + + def _read_content(self, type_code, block_data, class_desc=None): + # type: (int, bool, Optional[JavaClassDesc]) -> ParsedJavaContent + """ + Parses the next content. Use with care (use only in a transformer) + """ + + class ObjectTransformer(object): # pylint:disable=R0205 """ Representation of an object transformer @@ -84,7 +114,7 @@ def load_array( def load_custom_writeObject( self, parser, reader, name ): # pylint:disable=W0613,R0201 - # type: (JavaStreamParser, DataStreamReader, str) -> Optional[JavaClassDesc] + # type: (IJavaStreamParser, DataStreamReader, str) -> Optional[JavaClassDesc] """ Reads content stored from a custom writeObject. diff --git a/javaobj/v2/beans.py b/javaobj/v2/beans.py index b888a64..618fa7c 100644 --- a/javaobj/v2/beans.py +++ b/javaobj/v2/beans.py @@ -26,12 +26,12 @@ from __future__ import absolute_import +import logging from enum import IntEnum from typing import Any, Dict, List, Optional, Set -import logging from ..constants import ClassDescFlags, TypeCode -from ..modifiedutf8 import decode_modified_utf8, byte_to_int +from ..modifiedutf8 import byte_to_int, decode_modified_utf8 from ..utils import UNICODE_TYPE # ------------------------------------------------------------------------------ diff --git a/javaobj/v2/core.py b/javaobj/v2/core.py index adb140f..4d9edae 100644 --- a/javaobj/v2/core.py +++ b/javaobj/v2/core.py @@ -27,46 +27,45 @@ from __future__ import absolute_import -from typing import ( +import logging +import os +from typing import ( # pylint:disable=W0611 + IO, Any, Callable, Dict, - IO, List, Optional, -) # pylint:disable=W0611 -import logging -import os +) +from ..constants import ( + PRIMITIVE_TYPES, + StreamConstants, + TerminalCode, + TypeCode, +) +from ..modifiedutf8 import ( # pylint:disable=W0611 # noqa: F401 + decode_modified_utf8, +) from . import api # pylint:disable=W0611 from .beans import ( - ParsedJavaContent, BlockData, - JavaClassDesc, - JavaClass, + ClassDataType, + ClassDescType, + ExceptionRead, + ExceptionState, + FieldType, JavaArray, + JavaClass, + JavaClassDesc, JavaEnum, JavaField, JavaInstance, JavaString, - ExceptionState, - ExceptionRead, - ClassDescType, - FieldType, - ClassDataType, + ParsedJavaContent, ) from .stream import DataStreamReader from .transformers import DefaultObjectTransformer -from ..constants import ( - StreamConstants, - TerminalCode, - TypeCode, - PRIMITIVE_TYPES, -) - -from ..modifiedutf8 import ( - decode_modified_utf8, -) # pylint:disable=W0611 # noqa: F401 # ------------------------------------------------------------------------------ @@ -80,7 +79,7 @@ # ------------------------------------------------------------------------------ -class JavaStreamParser: +class JavaStreamParser(api.IJavaStreamParser): """ Parses a Java stream """ diff --git a/javaobj/v2/main.py b/javaobj/v2/main.py index e3ef18d..2076ccd 100644 --- a/javaobj/v2/main.py +++ b/javaobj/v2/main.py @@ -5,7 +5,7 @@ from __future__ import absolute_import -from typing import Any, IO # pylint:disable=W0611 +from typing import IO, Any # pylint:disable=W0611 try: # Python 2 @@ -14,10 +14,10 @@ # Python 3+ from io import BytesIO +from ..utils import java_data_fd from .api import ObjectTransformer # pylint:disable=W0611 from .core import JavaStreamParser from .transformers import DefaultObjectTransformer, NumpyArrayTransformer -from ..utils import java_data_fd # ------------------------------------------------------------------------------ diff --git a/javaobj/v2/stream.py b/javaobj/v2/stream.py index 1e5ff7a..b285d83 100644 --- a/javaobj/v2/stream.py +++ b/javaobj/v2/stream.py @@ -26,11 +26,11 @@ from __future__ import absolute_import -from typing import Any, IO, Tuple # pylint:disable=W0611 import struct +from typing import IO, Any, Tuple # pylint:disable=W0611 from ..modifiedutf8 import decode_modified_utf8 -from ..utils import unicode_char, UNICODE_TYPE # pylint:disable=W0611 +from ..utils import UNICODE_TYPE, unicode_char # pylint:disable=W0611 # ------------------------------------------------------------------------------ diff --git a/javaobj/v2/transformers.py b/javaobj/v2/transformers.py index 8d5efe0..d0d91f2 100644 --- a/javaobj/v2/transformers.py +++ b/javaobj/v2/transformers.py @@ -25,25 +25,25 @@ """ # Standard library -from typing import List, Optional, Tuple import functools +from typing import List, Optional, Tuple # Numpy (optional) try: import numpy except ImportError: - numpy = None - + numpy = None # type: ignore # Javaobj -from .api import ObjectTransformer -from .beans import ( - JavaInstance, - JavaClassDesc, - BlockData, -) # pylint:disable=W0611 from ..constants import TerminalCode, TypeCode -from ..utils import to_bytes, log_error, log_debug, read_struct, read_string +from ..utils import log_debug, log_error, read_string, read_struct, to_bytes +from .api import IJavaStreamParser, ObjectTransformer +from .beans import ( # pylint:disable=W0611 + BlockData, + JavaClassDesc, + JavaInstance, +) +from .stream import DataStreamReader # ------------------------------------------------------------------------------ @@ -183,7 +183,7 @@ class JavaLinkedHashMap(JavaMap): HANDLED_CLASSES = ("java.util.LinkedHashMap",) def load_from_blockdata(self, parser, reader, indent=0): - # type: (JavaStreamParser, DataStreamReader, int) -> bool + # type: (IJavaStreamParser, DataStreamReader, int) -> bool """ Loads the content of the map, written with a custom implementation """ From 6f361ebbac49c281c3e44f7c5c039637a5cf3390 Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 20 Feb 2022 14:43:55 +0100 Subject: [PATCH 3/9] Use GitHub actions instead of Travis-CI --- .coveragerc | 5 ++++ .coveralls.yml | 1 - .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++ .travis.yml | 19 ------------- README.md | 18 +++--------- tests/{tests.py => test_v1.py} | 0 tests/{tests_v2.py => test_v2.py} | 7 ++--- 7 files changed, 58 insertions(+), 39 deletions(-) create mode 100644 .coveragerc delete mode 100644 .coveralls.yml create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml rename tests/{tests.py => test_v1.py} (100%) rename tests/{tests_v2.py => test_v2.py} (99%) diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..a0c19b2 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,5 @@ +[run] +source = javaobj/ + +[report] +include = javaobj/* diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 9160059..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -service_name: travis-ci diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2b6549c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: CI Build + +on: + push: + branches: '**' + tags: '**' + pull_request: + branches: '**' + +jobs: + build: + timeout-minutes: 10 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest coverage + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=110 --statistics + - name: Test + run: | + coverage run -m pytest + - name: Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + pip install coveralls + coveralls diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8525272..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: python -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - -sudo: false - -install: - - pip install nose coverage coveralls - - pip install pytest>=2.7.3 --upgrade - - pip install -r requirements.txt - -script: - - nosetests -v --with-coverage --cover-package=javaobj tests - -after_success: - - coveralls diff --git a/README.md b/README.md index 77e649f..4385a0b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,9 @@ # javaobj-py3 -

- - Latest Version - License - - - Travis-CI status - - - Coveralls status - -

+[![Latest Version](https://img.shields.io/pypi/v/javaobj-py3.svg)](https://pypi.python.org/pypi/javaobj-py3/) +[![License](https://img.shields.io/pypi/l/javaobj-py3.svg)](https://pypi.python.org/pypi/javaobj-py3/) +[![CI Build](https://github.com/tcalmant/python-javaobj/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/tcalmant/python-javaobj/actions/workflows/build.yml) +[![Coveralls status](https://coveralls.io/repos/tcalmant/python-javaobj/badge.svg?branch=master)](https://coveralls.io/r/tcalmant/python-javaobj?branch=master) *python-javaobj* is a python library that provides functions for reading and writing (writing is WIP currently) Java objects serialized or will be diff --git a/tests/tests.py b/tests/test_v1.py similarity index 100% rename from tests/tests.py rename to tests/test_v1.py diff --git a/tests/tests_v2.py b/tests/test_v2.py similarity index 99% rename from tests/tests_v2.py rename to tests/test_v2.py index afdcb8c..b66fe84 100644 --- a/tests/tests_v2.py +++ b/tests/test_v2.py @@ -34,19 +34,18 @@ # Standard library import logging import os +import struct import subprocess import sys import unittest -import struct - from io import BytesIO # Prepare Python path to import javaobj sys.path.insert(0, os.path.abspath(os.path.dirname(os.getcwd()))) +import javaobj.v2 as javaobj # Local from javaobj.utils import bytes_char, java_data_fd -import javaobj.v2 as javaobj # ------------------------------------------------------------------------------ @@ -57,8 +56,6 @@ # ------------------------------------------------------------------------------ -# ------------------------------------------------------------------------------ - # Custom writeObject parsing classes class CustomWriterInstance(javaobj.beans.JavaInstance): def __init__(self): From c7f1811a532ebcb34de7aff5f0364457d7586803 Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 20 Feb 2022 15:28:55 +0100 Subject: [PATCH 4/9] Added a test for 2D arrays --- tests/java/src/test/java/OneTest.java | 10 ++++++++++ tests/test2DArray.ser | Bin 0 -> 85 bytes tests/test_v1.py | 11 +++++++++++ tests/test_v2.py | 15 ++++++++++++++- 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/test2DArray.ser diff --git a/tests/java/src/test/java/OneTest.java b/tests/java/src/test/java/OneTest.java index 09c16aa..553cd02 100644 --- a/tests/java/src/test/java/OneTest.java +++ b/tests/java/src/test/java/OneTest.java @@ -244,6 +244,16 @@ public void testCharArray() throws IOException { oos.close(); } + @Test + public void test2DArray() throws IOException { + int[][] array = new int[][] { + new int[] {1, 2, 3}, + new int[] {4, 5, 6}, + }; + oos.writeObject(array); + oos.close(); + } + @Test public void testJapan() throws IOException { String stateOfJapan = "日本国"; diff --git a/tests/test2DArray.ser b/tests/test2DArray.ser new file mode 100644 index 0000000000000000000000000000000000000000..d0f58dc2928c724fc3fe7a5f35d9909b893b63ca GIT binary patch literal 85 zcmZ4UmVvdjh=Dme+Ee`d6MxD6P8%i$hKd3P1_maeI8(Hz@2&*3vR9jy!i1TDQj8#J UAZ9KtWT=C%fIJo;W(8t40KA0|UH||9 literal 0 HcmV?d00001 diff --git a/tests/test_v1.py b/tests/test_v1.py index 5de4e1b..68d86db 100644 --- a/tests/test_v1.py +++ b/tests/test_v1.py @@ -359,6 +359,17 @@ def test_char_array(self): ) self._try_marshalling(jobj, pobj) + def test_2d_array(self): + """ + Tests the handling of a 2D array + """ + jobj = self.read_file("test2DArray.ser") + pobj = javaobj.loads(jobj) + _logger.debug(pobj) + self.assertEqual( + pobj, [[1, 2, 3], [4, 5, 6],], + ) + def test_enums(self): """ Tests the handling of "enum" types diff --git a/tests/test_v2.py b/tests/test_v2.py index b66fe84..d29fc18 100644 --- a/tests/test_v2.py +++ b/tests/test_v2.py @@ -44,6 +44,7 @@ sys.path.insert(0, os.path.abspath(os.path.dirname(os.getcwd()))) import javaobj.v2 as javaobj + # Local from javaobj.utils import bytes_char, java_data_fd @@ -452,6 +453,17 @@ def test_char_array(self): ], ) + def test_2d_array(self): + """ + Tests the handling of a 2D array + """ + jobj = self.read_file("test2DArray.ser") + pobj = javaobj.loads(jobj) + _logger.debug(pobj) + self.assertEqual( + pobj, [[1, 2, 3], [4, 5, 6],], + ) + def test_enums(self): """ Tests the handling of "enum" types @@ -596,7 +608,8 @@ def test_writeObject(self): self.assertEqual(isinstance(pobj, CustomWriterInstance), True) self.assertEqual( - isinstance(pobj.field_data["custom_obj"], RandomChildInstance), True + isinstance(pobj.field_data["custom_obj"], RandomChildInstance), + True, ) parent_data = pobj.field_data From 541b112ea370b85c1ee17879e7c6ba6ba66e1b29 Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 20 Feb 2022 16:03:02 +0100 Subject: [PATCH 5/9] Added test for an array of classes --- tests/java/src/test/java/OneTest.java | 11 +++++++++++ tests/testClassArray.ser | Bin 0 -> 386 bytes tests/test_v2.py | 11 +++++++++++ 3 files changed, 22 insertions(+) create mode 100644 tests/testClassArray.ser diff --git a/tests/java/src/test/java/OneTest.java b/tests/java/src/test/java/OneTest.java index 553cd02..7ffb10a 100644 --- a/tests/java/src/test/java/OneTest.java +++ b/tests/java/src/test/java/OneTest.java @@ -254,6 +254,17 @@ public void test2DArray() throws IOException { oos.close(); } + @Test + public void testClassArray() throws IOException { + Class[] array = new Class[] { + Integer.class, + ObjectOutputStream.class, + Exception.class, + }; + oos.writeObject(array); + oos.close(); + } + @Test public void testJapan() throws IOException { String stateOfJapan = "日本国"; diff --git a/tests/testClassArray.ser b/tests/testClassArray.ser new file mode 100644 index 0000000000000000000000000000000000000000..e5501ae1c3c36025d8ec516764b4e3fc19fb0c98 GIT binary patch literal 386 zcmZ4UmVvdjh(RdYCo8cmQ74yU|=pQVh}_q z^2{qqO;0TndbD84_r`V$CI&`N2G+8~oYK^aA_f73I=|A~q|~CeHB)7|r#$Ee8wNB; z3alVAU(Y`&D>b>qzqF*Fv?REsC^az`XcY`p6abY9Bg}HGNKP#%$;{8Y@K@eW%39_K z$T$=gAsI#a<%vl-saKDgs#})tIL*w!;={n2oLE|%TEZX-_M|?@llpL#);VS^Q%uBb9X5cC=NleZTDN0NRs*r<(7sRMwxP)s?YHn&?3D8K9 i;?jbGBA|h(DR5U8moNxGOfD_S%+dGBEH1IGC;$MNiiF_+ literal 0 HcmV?d00001 diff --git a/tests/test_v2.py b/tests/test_v2.py index d29fc18..43e40f6 100644 --- a/tests/test_v2.py +++ b/tests/test_v2.py @@ -464,6 +464,17 @@ def test_2d_array(self): pobj, [[1, 2, 3], [4, 5, 6],], ) + def test_class_array(self): + """ + Tests the handling of an array of Class objects + """ + jobj = self.read_file("testClassArray.ser") + pobj = javaobj.loads(jobj) + _logger.debug(pobj) + self.assertEqual(pobj[0].name, "java.lang.Integer") + self.assertEqual(pobj[1].name, "java.io.ObjectOutputStream") + self.assertEqual(pobj[2].name, "java.lang.Exception") + def test_enums(self): """ Tests the handling of "enum" types From fba64e9d403db7ee9a2e53f650f8a3e0b47d42b0 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 8 Mar 2022 12:59:28 +0100 Subject: [PATCH 6/9] Marshal JavaByteArrays --- javaobj/v1/marshaller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javaobj/v1/marshaller.py b/javaobj/v1/marshaller.py index ccc234c..435197e 100644 --- a/javaobj/v1/marshaller.py +++ b/javaobj/v1/marshaller.py @@ -141,6 +141,9 @@ def writeObject(self, obj): # pylint:disable=C0103 if isinstance(obj, JavaArray): # Deserialized Java array self.write_array(obj) + elif isinstance(obj, JavaByteArray): + # Deserialized Java byte array + self.write_array(obj) elif isinstance(obj, JavaEnum): # Deserialized Java Enum self.write_enum(obj) From 51fdb1d414031ee637e3c53af27f72325f889426 Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 7 Apr 2024 21:07:44 +0200 Subject: [PATCH 7/9] Version bump --- javaobj/__init__.py | 6 +++--- javaobj/constants.py | 6 +++--- javaobj/modifiedutf8.py | 4 ++-- javaobj/utils.py | 6 +++--- javaobj/v1/__init__.py | 6 +++--- javaobj/v1/beans.py | 6 +++--- javaobj/v1/core.py | 6 +++--- javaobj/v1/marshaller.py | 6 +++--- javaobj/v1/transformers.py | 4 ++-- javaobj/v1/unmarshaller.py | 6 +++--- javaobj/v2/__init__.py | 6 +++--- javaobj/v2/api.py | 6 +++--- javaobj/v2/beans.py | 6 +++--- javaobj/v2/core.py | 6 +++--- javaobj/v2/main.py | 2 +- javaobj/v2/stream.py | 6 +++--- javaobj/v2/transformers.py | 6 +++--- setup.py | 6 +++--- tests/test_v1.py | 4 ++-- tests/test_v2.py | 4 ++-- 20 files changed, 54 insertions(+), 54 deletions(-) diff --git a/javaobj/__init__.py b/javaobj/__init__.py index bf1ca67..d1b146d 100644 --- a/javaobj/__init__.py +++ b/javaobj/__init__.py @@ -13,12 +13,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/constants.py b/javaobj/constants.py index ebad6a0..d4dd1cb 100644 --- a/javaobj/constants.py +++ b/javaobj/constants.py @@ -4,12 +4,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -38,7 +38,7 @@ ) # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/modifiedutf8.py b/javaobj/modifiedutf8.py index bba2fa9..ac29ce5 100644 --- a/javaobj/modifiedutf8.py +++ b/javaobj/modifiedutf8.py @@ -11,7 +11,7 @@ :authors: Scott Stephens (@swstephe), @guywithface :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha """ @@ -21,7 +21,7 @@ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/utils.py b/javaobj/utils.py index 83593f0..2d6f761 100644 --- a/javaobj/utils.py +++ b/javaobj/utils.py @@ -7,12 +7,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v1/__init__.py b/javaobj/v1/__init__.py index 8c0d601..cc4aaaa 100644 --- a/javaobj/v1/__init__.py +++ b/javaobj/v1/__init__.py @@ -4,12 +4,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v1/beans.py b/javaobj/v1/beans.py index 73b297d..bf867bb 100644 --- a/javaobj/v1/beans.py +++ b/javaobj/v1/beans.py @@ -5,12 +5,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ ) # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v1/core.py b/javaobj/v1/core.py index 2fbe3c4..ae5eeb5 100644 --- a/javaobj/v1/core.py +++ b/javaobj/v1/core.py @@ -13,12 +13,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ ) # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v1/marshaller.py b/javaobj/v1/marshaller.py index 435197e..9e5bdeb 100644 --- a/javaobj/v1/marshaller.py +++ b/javaobj/v1/marshaller.py @@ -13,12 +13,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -76,7 +76,7 @@ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v1/transformers.py b/javaobj/v1/transformers.py index 7e80f98..c581125 100644 --- a/javaobj/v1/transformers.py +++ b/javaobj/v1/transformers.py @@ -5,12 +5,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/javaobj/v1/unmarshaller.py b/javaobj/v1/unmarshaller.py index 0317e68..c3c7709 100644 --- a/javaobj/v1/unmarshaller.py +++ b/javaobj/v1/unmarshaller.py @@ -13,12 +13,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -72,7 +72,7 @@ __all__ = ("JavaObjectUnmarshaller",) # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/__init__.py b/javaobj/v2/__init__.py index 097d54b..e9745ea 100644 --- a/javaobj/v2/__init__.py +++ b/javaobj/v2/__init__.py @@ -15,12 +15,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -41,7 +41,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/api.py b/javaobj/v2/api.py index fc02deb..8d9cd0d 100644 --- a/javaobj/v2/api.py +++ b/javaobj/v2/api.py @@ -4,12 +4,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/beans.py b/javaobj/v2/beans.py index 618fa7c..0b81f16 100644 --- a/javaobj/v2/beans.py +++ b/javaobj/v2/beans.py @@ -4,12 +4,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/core.py b/javaobj/v2/core.py index 4d9edae..8e018a6 100644 --- a/javaobj/v2/core.py +++ b/javaobj/v2/core.py @@ -5,12 +5,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -70,7 +70,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/main.py b/javaobj/v2/main.py index 2076ccd..24b51b0 100644 --- a/javaobj/v2/main.py +++ b/javaobj/v2/main.py @@ -22,7 +22,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/stream.py b/javaobj/v2/stream.py index b285d83..7cb8a9f 100644 --- a/javaobj/v2/stream.py +++ b/javaobj/v2/stream.py @@ -4,12 +4,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/javaobj/v2/transformers.py b/javaobj/v2/transformers.py index d0d91f2..087eea9 100644 --- a/javaobj/v2/transformers.py +++ b/javaobj/v2/transformers.py @@ -4,12 +4,12 @@ :authors: Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/setup.py b/setup.py index cda54e3..240dc46 100644 --- a/setup.py +++ b/setup.py @@ -7,12 +7,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,7 +37,7 @@ # ------------------------------------------------------------------------------ # Module version -__version_info__ = (0, 4, 3) +__version_info__ = (0, 4, 4) __version__ = ".".join(str(x) for x in __version_info__) # Documentation strings format diff --git a/tests/test_v1.py b/tests/test_v1.py index 68d86db..162b2db 100644 --- a/tests/test_v1.py +++ b/tests/test_v1.py @@ -8,12 +8,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/tests/test_v2.py b/tests/test_v2.py index 43e40f6..301db9c 100644 --- a/tests/test_v2.py +++ b/tests/test_v2.py @@ -8,12 +8,12 @@ :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 -:version: 0.4.3 +:version: 0.4.4 :status: Alpha .. - Copyright 2021 Thomas Calmant + Copyright 2024 Thomas Calmant Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 2ba2ef811dc6167303686b1c024802166f272946 Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 7 Apr 2024 21:15:31 +0200 Subject: [PATCH 8/9] Manually tested against Python 2.7,3.4-3.12 --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 240dc46..8a2318b 100644 --- a/setup.py +++ b/setup.py @@ -87,6 +87,10 @@ def read(fname): "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries :: Python Modules", ], ) From 9fcf1df33a0b73e8bf7c27226c908424a4d6a3ca Mon Sep 17 00:00:00 2001 From: Thomas Calmant Date: Sun, 7 Apr 2024 21:18:54 +0200 Subject: [PATCH 9/9] Added 3.11 & 3.12 to GitHub actions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b6549c..826aa59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2