Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare work before release beta version. #154

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

cheqianh
Copy link
Contributor

@cheqianh cheqianh commented Jun 22, 2021

Description:

Issues fix and integration/config script (install.py) enhencement.

Change Details:

  1. Fixed an unit test failure. For value $11::$12::$13, before we hardcoded \x0b\x0c ($11::$12) for annotations since pure python LST always have annotation come first, now it may be \x0c\x0d ($12::$13) as it satisfied some conditions such as C extension is enabled. (code here)

  2. Improved install.py.

    1. Uses submodule to install ion-c,
    2. setup.py is the only entrance of the project no matter users check out from Github, install by pip or our dev package the project for release.
    3. Separated building ion-c and binding C extension, So if someone run into issues when they setup C extension, they can still manually build ion-c and put it under ion-python/, then run setup.py again to setup C extension. So users can setup C extension easily as long as they know how to build ion-c.
  3. Fixed a segment fault. It's due to a very large field_name length, now C extension catches the exception before it crashes python. I changed the maximum length of a field name to 1000 now, and I opened an ion-python issue#153 to make it behavior better in the future. (code here)

  4. Memory leak check and fix. I created a temporary value temp, and release py_value and py_annotation (code here). I will create a different pull request for adding memory leak check to unit test.







By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

(_D('1.1999999999999999555910790149937383830547332763671875e0'),
b'1.1999999999999999555910790149937383830547332763671875'),
# (_D('1.1999999999999999555910790149937383830547332763671875e0'),
# b'1.1999999999999999555910790149937383830547332763671875'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, C extension only supports 34 decimal digits. I comment this for beta version for now.

timestamp(2016, 2, 2, 0, 0, 30, precision=TimestampPrecision.SECOND,
fractional_seconds=Decimal('0.7e-500')),
(b'2016-02-02T00:00:30.' + b'0' * 500 + b'7-00:00', b'2016-02-02T00:00:30.000000-00:00')
)
Copy link
Contributor Author

@cheqianh cheqianh Jun 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, C extension only supports up to 6 timestamp precision. Mentioned this in doc and will fix this in the future release.

@cheqianh cheqianh merged commit cadb223 into amazon-ion:c-extension-beta Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants