-
Notifications
You must be signed in to change notification settings - Fork 30
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
Test failiure on Python 3.8 #343
Comments
hi @Aniket-Pradhan! thanks a lot for bringing this up and already providing a PR to fix the issue, this is awesome! it seems that the pyyaml issue you are referencing is quite extensive and I think I want to run some additional tests locally to make sure our current automated tests are not missing anything. |
You're welcome. 😄
Seems great. If there's anything I can help with, please do tell. I would be happy to help/contribute. :D |
Hi @Aniket-Pradhan! I am not able to reproduce the error. I tried all combinations of the latest release version 1.4.3 and the current master branch with Python 3.8.1 and the odml default pyyaml version 4.2b4 and the latest pyyaml version 5.3. I would really like to reproduce the error so I can include it into our test matrix and catch similar errors in the future. Could you tell me the specifics of your install? The exact python version and the exact pyyaml version you are using? Thanks a lot! |
Hey! I had been using the PyYaml version 5.1.2 (the one present in the Fedora repositories). I did not use the default version (4.2b4) because it was a beta release, and was not available in the Fedora repositories. Python version is 3.8.1 and odml's version is 1.4.3. The issue has been fixed with PyYaml version 5.2 as far as I can see from this (#144) issue. |
Alright! I had a stupid mistake in my test matrix, my bad. I started fresh and was able to reproduce the error and was able to verify that the fix works fine with the important combinations of Python (2.7, 3.6, 3.7, 3.8) and pyyaml (4.2b2, 5.1, 5.1.2, 5.2, 5.3) versions. I think with this we can also drop the pyyaml 4.2b2 dependency, which is very neat. I still have to test loading from a yaml string and updating the tests for these cases, they are not very extensive. And finally it seems that @Aniket-Pradhan, thanks again for the issue and the fix! |
I can try to tinker around and look into this part. I'll get back to you if I make some progress
You're welcome ❤️ |
Hey! I'm back I was trying here and there, but I had this doubt, as to why Anyhow, I found a solution. Just like JSONDateTimeSerializer, we can define a function for the YAML dumper so that it converts the def convert_time_to_str(dumper, data):
return dumper.represent_scalar('tag:yaml.org,2002:str', str(data))
# "tag:yaml.org,2002:str" is the URI for the string object
yaml.add_representer(datetime.time, convert_time_to_str) The test passes successfully and seems to be working fine. If you want, I can submit another PR (or add another commit in the previous PR) for this fix. |
I also was unsuccessfully trying to figure out why Your I'll update the yaml string loader with updated test with a follow up PR. |
This might be related to the datetime library... I will try to ping those guys to figure something out.
Sure, I will do that by tomorrow. :D
Thanks... :D |
Hello, devs! Sorry for reviving this ticket again. I was wondering if its possible to make a minor release of the odML library. The main purpose of this ticket was to resolve the errors which came up during packaging the library for Fedora with Py3.8. I can include this commit as a patch with the latest release (1.4.3), but having a new release would make the process very neat. Also, the last release was a decade ago (Oct. 2019 😛 ), and there have been multiple changes since then. Hence, a minor release with the changes committed would be great. |
@Aniket-Pradhan, I am trying to finish some features and do a release until the end of the week if that's not too late for you. |
That's no issue. There are no hurries. |
@Aniket-Pradhan I just released a new odml version on PyPI containing the changes. |
Thanks a lot @mpsonntag . I'll get to creating the package right away. |
Hello there!
Thanks for working on and providing python-odml. 😄
We were working on packaging this tool for Fedora, and it seems that one of the tests fails on Python 3.8. No worries, it seems to be an issue of PyYaml (ref). As per the team working on PyYaml, this should be resolved in the next stable release.
On the other hand, for now, we can add
Loader=yaml.Loader
in odmlparser.py#136 to fix the issue. I have checked, and it does not break any tests.I will send in a quick PR to fix the issue. :D
The error log is here;
The text was updated successfully, but these errors were encountered: