xlwings-utils 25.0.0.post6__tar.gz → 25.0.2__tar.gz

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 xlwings-utils might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xlwings_utils
3
- Version: 25.0.0.post6
3
+ Version: 25.0.2
4
4
  Summary: xlwings_utils
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/xlwings_utils
@@ -10,7 +10,7 @@ authors = [
10
10
  { name = "Ruud van der Ham", email = "rt.van.der.ham@gmail.com" },
11
11
  ]
12
12
  description = "xlwings_utils"
13
- version = "25.0.0.post6"
13
+ version = "25.0.2"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.9"
16
16
  dependencies = [
@@ -5,7 +5,7 @@
5
5
  # /_/\_\|_| \_/\_/ |_||_| |_| \__, ||___/ _____ \__,_| \__||_||_||___/
6
6
  # |___/ |_____|
7
7
 
8
- __version__ = "25.0.0"
8
+ __version__ = "25.0.2"
9
9
 
10
10
 
11
11
  import dropbox
@@ -169,14 +169,19 @@ def read_dropbox(dropbox_path):
169
169
  ----
170
170
  If REFRESH_TOKEN, APP_KEY and APP_SECRET environment variables are specified,
171
171
  it is not necessary to call dropbox_init() prior to any dropbox function.
172
+
173
+ If the filesize does not match the metadata, as sometimes happens on pyodide, an IOError exception will be raised.
172
174
  """
173
175
 
174
176
  _login_dbx()
175
177
  metadata, response = dbx.files_download(dropbox_path)
176
178
  file_content = response.content
179
+ if len(file_content) != metadata.size:
180
+ raise OSError('filesize does not match metadata')
177
181
  return file_content
178
182
 
179
183
 
184
+
180
185
  def write_dropbox(dropbox_path, contents):
181
186
  _login_dbx()
182
187
  """
@@ -646,16 +651,21 @@ class Capture:
646
651
 
647
652
  Parameters
648
653
  ----------
654
+ enabled : bool
655
+ if True (default), all stdout output is captured
656
+
657
+ if False, stdout output is printed
658
+
649
659
  include_print : bool
650
- if True (default), the output is also printed out as normal
660
+ if False (default), nothing will be printed if enabled is True
651
661
 
652
- if False, no output is printed
662
+ if True, output will be printed (and captured if enabled is True)
653
663
 
654
664
  Note
655
665
  ----
656
- Use this function as a context manager, like ::
666
+ Use this function, like ::
657
667
 
658
- with capture_stdout():
668
+ capture = xwu.Capture():
659
669
  ...
660
670
  """
661
671
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xlwings_utils
3
- Version: 25.0.0.post6
3
+ Version: 25.0.2
4
4
  Summary: xlwings_utils
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/salabim/xlwings_utils