pybiolib 1.2.1308__py3-none-any.whl → 1.2.1318__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pybiolib might be problematic. Click here for more details.

biolib/jobs/job.py CHANGED
@@ -498,11 +498,17 @@ class Result:
498
498
  stdout_and_stderr_package = base64.b64decode(stdout_and_stderr_package_b64)
499
499
  stdout_and_stderr = StdoutAndStderr(stdout_and_stderr_package).deserialize()
500
500
 
501
- sys.stdout.write(stdout_and_stderr.decode())
502
- if not IS_RUNNING_IN_NOTEBOOK: # for some reason flushing in jupyter notebooks breaks \r handling
503
- sys.stdout.flush()
501
+ if IS_RUNNING_IN_NOTEBOOK:
502
+ sys.stdout.write(stdout_and_stderr.decode(encoding='utf-8', errors='replace'))
503
+ else:
504
+ sys.stdout.buffer.write(stdout_and_stderr)
505
+ # Note: we avoid flush() in notebook as that breaks \r handling
506
+ sys.stdout.buffer.flush()
504
507
  # flush after having processed all packages
505
- sys.stdout.flush()
508
+ if IS_RUNNING_IN_NOTEBOOK:
509
+ sys.stdout.flush()
510
+ else:
511
+ sys.stdout.buffer.flush()
506
512
 
507
513
  def show(self) -> None:
508
514
  self._refetch_job_dict()
@@ -522,11 +528,19 @@ class Result:
522
528
  logger.info(f'--- The result {self.id} has already completed (no streaming will take place) ---')
523
529
  logger.info('--- The stdout log is printed below: ---')
524
530
  sys.stdout.flush()
525
- print(self.get_stdout().decode(), file=sys.stdout)
526
- sys.stdout.flush()
531
+ if IS_RUNNING_IN_NOTEBOOK:
532
+ sys.stdout.write(self.get_stdout().decode(encoding='utf-8', errors='replace'))
533
+ sys.stdout.flush()
534
+ else:
535
+ sys.stdout.buffer.write(self.get_stdout())
536
+ sys.stdout.buffer.flush()
527
537
  logger.info('--- The stderr log is printed below: ---')
528
- print(self.get_stderr().decode(), file=sys.stderr)
529
- sys.stderr.flush()
538
+ if IS_RUNNING_IN_NOTEBOOK:
539
+ sys.stderr.write(self.get_stderr().decode(encoding='utf-8', errors='replace'))
540
+ sys.stderr.flush()
541
+ else:
542
+ sys.stderr.buffer.write(self.get_stderr())
543
+ sys.stderr.buffer.flush()
530
544
  logger.info(f'--- The job {self.id} has already completed. Its output was printed above. ---')
531
545
  return
532
546
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pybiolib
3
- Version: 1.2.1308
3
+ Version: 1.2.1318
4
4
  Summary: BioLib Python Client
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -142,7 +142,7 @@ biolib/compute_node/webserver/worker_thread.py,sha256=7uD9yQPhePYvP2HCJ27EeZ_h6p
142
142
  biolib/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
143
  biolib/experiments/experiment.py,sha256=4g1xMYmfp5yzSOdwjf3pUUULF9QjqBJb4uQ25FHrFrk,13688
144
144
  biolib/jobs/__init__.py,sha256=aIb2H2DHjQbM2Bs-dysFijhwFcL58Blp0Co0gimED3w,32
145
- biolib/jobs/job.py,sha256=aC3MfyNOC3z1HEK60OASjaS23Bwq0z6Wkjty56JFj7o,29065
145
+ biolib/jobs/job.py,sha256=X7F_jCwAwtPcI1qu-oLamZNzt1IVSIeOPWlax1ztfAM,29674
146
146
  biolib/jobs/job_result.py,sha256=_xqQu9z9BqPQrU6tjqKPuKlQDt5W0Zw5xiQvzEBkDyE,5266
147
147
  biolib/jobs/types.py,sha256=rFs6bQWsNI-nb1Hu9QzOW2zFZ8bOVt7ax4UpGVASxVA,1034
148
148
  biolib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -158,8 +158,8 @@ biolib/utils/cache_state.py,sha256=u256F37QSRIVwqKlbnCyzAX4EMI-kl6Dwu6qwj-Qmag,3
158
158
  biolib/utils/multipart_uploader.py,sha256=XvGP1I8tQuKhAH-QugPRoEsCi9qvbRk-DVBs5PNwwJo,8452
159
159
  biolib/utils/seq_util.py,sha256=rImaghQGuIqTVWks6b9P2yKuN34uePUYPUFW_Wyoa4A,6737
160
160
  biolib/utils/zip/remote_zip.py,sha256=0wErYlxir5921agfFeV1xVjf29l9VNgGQvNlWOlj2Yc,23232
161
- pybiolib-1.2.1308.dist-info/METADATA,sha256=NdCjH6DwZEd01xTKrtuRLcYRLMt7wk5ZYeVBKgPtZ_8,1644
162
- pybiolib-1.2.1308.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
163
- pybiolib-1.2.1308.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
164
- pybiolib-1.2.1308.dist-info/licenses/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
165
- pybiolib-1.2.1308.dist-info/RECORD,,
161
+ pybiolib-1.2.1318.dist-info/METADATA,sha256=Kfin2a-7v8pg6206XqZNFcKTERbw6IVRCvIhR-yb-0E,1644
162
+ pybiolib-1.2.1318.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
163
+ pybiolib-1.2.1318.dist-info/entry_points.txt,sha256=p6DyaP_2kctxegTX23WBznnrDi4mz6gx04O5uKtRDXg,42
164
+ pybiolib-1.2.1318.dist-info/licenses/LICENSE,sha256=F2h7gf8i0agDIeWoBPXDMYScvQOz02pAWkKhTGOHaaw,1067
165
+ pybiolib-1.2.1318.dist-info/RECORD,,