Pyecore

Latest version: v0.15.1

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

Scan your dependencies

Page 4 of 11

0.10.1

++++++

**Bugfixes**

- Fix enumeration literal addition as attribute. In the case literals where
added to an enumeration using the 'eLiterals' collection, this implied that
the ``EEnum`` instance was not updated with the required instance attribute.
This new implementation uses a listener to catch additions that are made to
the enumeration in order to either add or remove instance attributes.

- Fix issue with XMI serialization for single element container. In those cases
the path towards the object was not well serialized. It results in a false
XMI path which made the produced XMI not usable with Eclipse EMF. (Thanks `annighoefer <https://github.com/annighoefer>`_!)

- Prevent ``id`` with spaces from being used. Spaces are used for separating
multiple references to other objects. (Thanks `annighoefer <https://github.com/annighoefer>`_!)


**Miscellaneous**

- Improve error message for ``BadValueError`` exception.

0.10.0

++++++

**Features**

- Add first support for ``EGenerics``. This implementation is currently
incomplete as it is not possible to express dedicated types for instances.
This capability will be added in future versions. The current version is able
to catch only a part of the generic semantic, but at least it does not
prevent from opening files and models that uses them (it should not).

- Add new XMLType metamodel generation. This new version makes a better use
of derived collections and fixes some oddities of the previous one.

- Add first implementation of ``allInstances()`` method on ``EClass`` instances.
This implementation can still benefits from some optimizations. The
``allInstances()`` method is working by keeping track of all created PyEcore
objects in a ``WeakSet``. This set is then crossed and each matching
instances are returned as a generator.


**Bugfixes**

- Fix missing ``EGenericType`` features like ``eTypeParameter``. These
attributes were missing from the Ecore metamodel leading to errors when
ecore models using them were deserialized.

- Fix collection reaffectation. These kind of reaffectation (e.g:
``x.foo = y.bar``, where ``foo`` and ``bar`` are ``EStructuralFeature``
instances) now raises and error. The previous implementation could cause
side-effects which were hard to anticipate.

- Fix bad format for ``EDate``. The old format that were parsed and produced
by PyEcore was not EMF-Java compatible. This new implementation is using the
iso format which seems to be the one used by default by EMF.

**Miscellaneous**

- Add context manager to unpatch the ``issubclass`` builtin function.
- Add ``alias`` function to inject alias features that have reserved names.

0.9.0

+++++

**Features**

- Add URI mapper like support. This mapper allows you to map a new URI or an
URI start that can be later resolved if required. The typical use case is When
dealing with Eclipse XMI where there is some ``plateforme://xxx/yyy`` uri.

- Add ``iD`` attribute support for ``EAttribute`` in XMI serialization. This
feature ensure that if an ``EAttribute`` is defined in an ``EClass`` with its
``iD`` attribute set to ``True``, then, this attribute value will be used in
the XMI serialization in order to save the reference towards the element.
However, if an ``xmi:id`` is set to the element, the reference will use this
xmi id no matter what.

- Add safe compilation of generated ``EOperation`` using ``RestrictedPython``
(Thanks `CFAndy <https://github.com/CFAndy>`_). The compilation of generated
method is now performed using a 'safe' context. Even is the current generated
code does not use special methods or functions, in future version, it is
planed that PyEcore will be able to fetch behaviors that could be directly
added to the ``.ecore``.


**Bugfixes**

- Fix issue with resolved fragment in resource when loading it. This bug was
affecting resources with crossrefs towards different resources but whith the
same fragment (eg: ``my-uri1//A`` and ``my-uri2//A``). In this case, the
first resolved fragment were always returned, even if it was said as part of
another resource.

- Add missing registration of ``ELong`` datatype.

- Fix issue when an object is moved to another container. An issue was occuring
when an object moved from a container to another container. Currently, the
object properly saw that it moved to another container, but the container
collection/attribute was not aware that the object migrated to another
container.



**Miscellaneous**

- Use a common 'uuid format' for XMI resources (easily overrideable).
- Switch from 'collection' to 'collection.abc' for Python 3.7.
- Update documentation fixing missing ``eType`` in example.

0.8.8

+++++

**Bugfixes**

- Fix out of sync XMI/JSON serialization (Thanks `CFAndy <https://github.com/CFAndy>`_).
When multiple XMI/JSON are serialized at the end of a program, some files are
not serialized properly. To avoid this behavior, a flush of the produced file
is performed at the end of the ``save()`` method for each ``Resource``.

0.8.7

+++++

**Bugfixes**

- Fix Json resource deserialization for primitive collections (Thanks `afonsobspinto <https://github.com/afonsobspinto>`_). The Json deserialization
was always assuming that when a collection was found in the Json, it always
was a collection of ``EObject`` whereas they could also be primitive values.

**Miscellaneous**

- Add some performance improvements in resources deserialization.

0.8.6

+++++

**Bugfixes**

- Fix issue with URI spliting during json deserialization.
- Fix issue with redundant attributes in json format (Thanks `TerryKingston <https://github.com/TerryKingston>`_!).
Having redundant attributes for opposite containment relationship in the json
serialized resource introduced the installation of a new proxy instead of the
proper object resolution.

**Miscellaneous**

- Add performances improvement in json deserialization.

Page 4 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.