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

update _process_stream to resolve PytestUnhandledThreadExceptionWarnings #433

Closed

Conversation

EdwardLi-coder
Copy link
Contributor

I encounter many PytestUnhandledThreadExceptionWarnings coming from the _process_stream function, so I optimized the method.
This is the warning.

tests/func/test_catalog.py::test_query[file-False-tree0]
  /Users/lifei/PycharmProjects/datachain/.nox/tests-3-12/lib/python3.12/site-packages/_pytest/threadexception.py:82: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-2 (_process_stream)
  
  Traceback (most recent call last):
    File "/opt/miniconda3/envs/datachain/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
      self.run()
    File "/opt/miniconda3/envs/datachain/lib/python3.12/threading.py", line 1012, in run
      self._target(*self._args, **self._kwargs)
    File "/Users/lifei/PycharmProjects/datachain/.nox/tests-3-12/lib/python3.12/site-packages/datachain/catalog/catalog.py", line 118, in _process_stream
      buffer += byt
  TypeError: can't concat str to bytes
  
    warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg))

@EdwardLi-coder EdwardLi-coder changed the title update _process_stream to resolve update _process_stream to resolve PytestUnhandledThreadExceptionWarnings Sep 12, 2024
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 87.13%. Comparing base (d6a29df) to head (ac7ecc3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/datachain/catalog/catalog.py 64.00% 5 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #433      +/-   ##
==========================================
- Coverage   87.17%   87.13%   -0.05%     
==========================================
  Files          92       92              
  Lines        9975     9989      +14     
  Branches     2053     2057       +4     
==========================================
+ Hits         8696     8704       +8     
- Misses        926      929       +3     
- Partials      353      356       +3     
Flag Coverage Δ
datachain 87.08% <64.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skshetry
Copy link
Member

@EdwardLi-coder, thanks for creating this PR, but this was fixed by #431. Please rebase/pull the latest main branch. :)

@skshetry skshetry closed this Sep 12, 2024
@EdwardLi-coder
Copy link
Contributor Author

@EdwardLi-coder, thanks for creating this PR, but this was fixed by #431. Please rebase/pull the latest main branch. :)

ok

@EdwardLi-coder EdwardLi-coder deleted the update_process_stream branch September 12, 2024 07:17
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