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

Use the non-deprecated datetime.fromtimestamp method and fix some small linting errors #21

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

RubenVanEldik
Copy link
Contributor

No description provided.

@RubenVanEldik
Copy link
Contributor Author

Hi Logtail/BetterStack maintainers!

I can't seem to figure out why the tests are failing, could you help me out? The logs are not very helpful and I run into the same issue on my computer where the testing just freezes, but this also happens on the current main branch (ee324b0).

All help is appreciated!

 py37: install_deps> python -I -m pip install -r test-requirements.txt -r requirements.txt
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: pip==23.3.1,setuptools==68.0.0,wheel==0.42.0
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py37: install_package_deps> python -I -m pip install 'msgpack>=0.5.6' 'requests>=2.18.4'
py37: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/logtail-python/logtail-python/.tox/.tmp/package/1/logtail-python-0.2.9.tar.gz
py37: freeze> python -m pip freeze --all
py37: 2to3==1.0,alabaster==0.7.13,Babel==2.14.0,certifi==2023.11.17,charset-normalizer==3.3.2,coverage==7.2.7,docutils==0.19,httpretty==1.1.4,idna==3.6,imagesize==1.4.1,importlib-metadata==6.7.0,Jinja2==3.1.2,logtail-python @ file:///home/runner/work/logtail-python/logtail-python/.tox/.tmp/package/1/logtail-python-0.2.9.tar.gz#sha256=33ff15d4169d67720a0e0486886fc012dcea0c05ad7f9e80e8bc870c8c0cd6fd,MarkupSafe==2.1.3,mock==5.1.0,msgpack==1.0.5,nose-py3==1.6.3,numpy==1.21.6,packaging==23.2,pip==23.3.1,Pygments==2.17.2,pytz==2023.3.post1,requests==2.31.0,setuptools==68.0.0,six==1.16.0,snowballstemmer==2.2.0,Sphinx==5.3.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,typing_extensions==4.7.1,urllib3==2.0.7,wheel==0.42.0,zipp==3.15.0
tox: py37
  py37: commands[0]> nosetests --with-coverage --cover-branches --cover-package=logtail
  Error: The operation was canceled.

@curusarn
Copy link
Contributor

Hi @RubenVanEldik,

Thanks for submitting the PR. I appreciate it!

I don't see an obvious reason why the tests hang and don't finish. I'm passing this on to the team to take a look.

Thanks again for your contribution!

@RubenVanEldik
Copy link
Contributor Author

Hi @curusarn,

Thank you for having a look at the tests and for passing it on!

@PetrHeinz
Copy link
Member

PetrHeinz commented Jan 12, 2024

@RubenVanEldik I also ran into the issue of hanging tests, not sure why that happens at this point. It's quite annoying, but it seems that they may hang when there is an error during the test execution.

Specifically here it was because undefined UTC was used instead of timezone.utc. Also, adding +00:00 is not necessary anymore, since results of datetime.fromtimestamp contain TZ information. I've patched it up in cfb484e.

It's safe to remove the comment about Python 2.7 since we're not supporting that version anymore (only Python ≥3.7).

Thanks again for the contribution 🙌

@PetrHeinz PetrHeinz merged commit d40d73c into logtail:master Jan 12, 2024
5 checks passed
@PetrHeinz
Copy link
Member

I've just released the changes in v0.2.10.

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.

3 participants