Pyecore

Latest version: v0.15.2

Safety actively analyzes 701868 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 11

0.7.7

+++++

**Bugfixes**

- Improve ``EClass`` dynamic modifications. The ``__init__`` method of the
``EClass`` was responsible for the registration of an 'eternal_listener'
(a listener that cannot be removed. In case the ``EClass`` instance was
created using ``__new__`` then using ``__init__`` to set some values in the
parameter, the listener was registered **after** the set of some values.
This implies that some modifications (name modification for example)
couldn't be took into account in the method that sync the python class with
the ``EClass`` instance.

0.7.6

+++++

**Features**

- Add options support for JSON serialization. Currently, the only JSON
serialization option that is added is: ``SERIALIZE_DEFAULT_VALUE``. This
option allows the user to serialize feature values that are equal to the
default ones.


**Bugfixes**

- Fix bad default value for ``xxxObject`` data types. These data types (e.g:
``EIntegerObject``) must have a ``None`` default value as they do not represent
the Java boxed type, but their **object** version. This fix introduces a real
difference between boxed types and non-boxed types.

0.7.5

+++++

**Features**

- Add easier way of dynamically add behavior to ``EClass``. This features adds
the ability to register function to existing dynamic and static ``EClass``.

**Bugfixes**

- Fix missing exception when affecting single element to collection. When a
single assignement is done on a collection-kind meta-attribute, an exception
must be raised as the 'attribute' type is, somehow, modified.

**Miscellaneous**

- Improve the ``eResource`` management. This reduces memory footprint, slightly
improves big model serialization, and avoides 'unsync' objects with their
resource.

0.7.4

+++++

**Features**

- Add dedicated method for eclass ref serialization in ``JsonResource``. This
method allows the user to override it if required in order to control a little
bit the way the JSON will be produced. If the users override this method by
providing a new implementation, they also should override the eclass resolve
method. Otherwise, the deserialization of a previously serialized model with
this new implementation will fail. The two methods to override are the
following:

- ``serialize_eclass(self, eclass)``
- ``resolve_eclass(self, uri_eclass)``

Note that for the ``resolve_eclass`` method, the use of a cache like
``lru_cache`` is often a good idea.

- Remove systematic serialization of ``EClass`` reference in JSON serializer. In
some cases where the containing feature type is the same than the serialized
object, the ``eClass`` entry in the JSON resource is not required. This allows
to reduce the resource size a little bit more.

- Change the ``EEnum`` implementation for default values. The default value of
an ``EENum`` is computed from the first element in the ``eLiterals``. The
change of a ``default_value`` is performed by 'reordering' the ``eLiterals``
list.


**Bugfixes**

- Refactor ``EProxy`` implementation. The new ``EProxy`` implementation get rid
of the ``EPlaceHolder`` class that was used for bad reasons. Now, an
``EProxy`` inherits from an ``EObject``. As a side-effect, this also fixes an
issue in the JSON serialization: ``EProxy`` were not resolved, and,
consequently, a ``Resource`` with ``EProxy`` inside was not serializable.

- Remove Ecore metamodel from a Resource. Each metamodel registered in a
``ResourceSet`` or the ``global_registry`` should not be part of a
``Resource``. The fact that they are registered in a ``Resource`` implies that
they are part of the same level than the ``Resource`` which is serialized.
However, they are part of something "greater".

- Add special deserialization method for ``EEnum``. The basic deserialization
method for ``EEnum`` instance was the same than the one for ``EDataType``.
They only takes the string and put it in the feature instance. Instead, when
a string is found for an ``EEnum`` feature, the ``EEnumLiteral`` must be
searched. This new ``from_string`` implementation just does this.

0.7.3

+++++

**Features**

- Performance improvement for JSON deserialization. The use of the ``lru_cache``
enables the JSON resource to quickly identify metaclasses once they are
resolved.

**Bugfixes**

- Fix issue with JSON serializer when multiples subpackages are used. The
``eClass`` relationship, serialized in the form of the root ``EPackage`` uri
with the ``EClass`` uri fragment were badly formed.

- Fix calls in ``XMIResource`` and ``JsonResource`` for ``URI`` handling. This
new way of calling an ``URI`` input/output stream creation enables a simpler
creation of new dedicated ``URI``. As example, a ``StringURI`` is added in
the ``README.rst``.

0.7.2

+++++

**Miscellaneous**

- Change the usage of ``MutableSequence`` for ``UserList`` instead, reducing
some boilerplate code.
- Add missing ``staticmethod`` when required.

Page 7 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.