You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* develop:
Update CHANGELOG.md
Fix pylance complaint (#917)
Add more references to README.rst (#915)
Pin github-release-commenter (#914)
Fix doctest (#913)
Bump softprops/action-gh-release in the github-actions group (#912)
Bump minimum supported version to Python 3.10 (#911)
Bump the github-actions group with 2 updates (#910)
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,13 @@
1
+
# 7.5.1, 2026-02-23
2
+
3
+
- Bump the github-actions group with 2 updates (PR [#910](https://github.com/piskvorky/smart_open/pull/910), [@dependabot[bot]](https://github.com/apps/dependabot))
4
+
- Bump minimum supported version to Python 3.10 (PR [#911](https://github.com/piskvorky/smart_open/pull/911), [@DeflateAwning](https://github.com/DeflateAwning))
5
+
- Bump softprops/action-gh-release from 2.4.2 to 2.5.0 in the github-actions group (PR [#912](https://github.com/piskvorky/smart_open/pull/912), [@dependabot[bot]](https://github.com/apps/dependabot))
-[s3] Support very large buckets in iter_bucket, add client_kwars (PR [#908](https://github.com/piskvorky/smart_open/pull/908), [@ddelange](https://github.com/ddelange))
``smart_open`` is a drop-in replacement for Python's built-in ``open()``: it can do anything ``open`` can (100% compatible, falls back to native ``open`` wherever possible), plus lots of nifty extra stuff on top.
24
28
25
-
**Python 2.7 is no longer supported. If you need Python 2.7, please use** `smart_open 1.10.1 <https://github.com/piskvorky/smart_open/releases/tag/1.10.0>`_, **the last version to support Python 2.**
26
-
27
29
Why?
28
30
====
29
31
@@ -79,56 +81,49 @@ How?
79
81
b'User'
80
82
81
83
>>># stream from HTTP
82
-
>>>for line inopen('http://example.com/index.html'):
84
+
>>>for line inopen('http://example.com'):
83
85
...print(repr(line[:15]))
84
86
...break
85
87
'<!doctype html>'
86
88
87
89
.. _doctools_after_examples:
88
90
89
-
Other examples of URIs that ``smart_open`` accepts::
91
+
For more examples of URIs that ``smart_open`` accepts, see `help.txt <https://github.com/piskvorky/smart_open/blob/master/help.txt>`__ or ``help('smart_open')``.
Or, if you don't mind installing a large number of third party libraries, you can install all dependencies using:
128
123
129
-
Be warned that this option increases the installation size significantly, e.g. over 100MB.
124
+
.. code-block:: sh
130
125
131
-
If you're upgrading from ``smart_open`` versions 2.x and below, please check out the `Migration Guide <MIGRATING_FROM_OLDER_VERSIONS.rst>`_.
126
+
pip install 'smart_open[all]'
132
127
133
128
Built-in help
134
129
-------------
@@ -144,9 +139,11 @@ or view `help.txt <https://github.com/piskvorky/smart_open/blob/master/help.txt>
144
139
More examples
145
140
-------------
146
141
147
-
For the sake of simplicity, the examples below assume you have all the dependencies installed, i.e. you have done::
142
+
For the sake of simplicity, the examples below assume you have all the dependencies installed, i.e. you have done:
143
+
144
+
.. code-block:: sh
148
145
149
-
pip install smart_open[all]
146
+
pip install 'smart_open[all]'
150
147
151
148
.. code-block:: python
152
149
@@ -237,11 +234,14 @@ The supported values for this parameter are:
237
234
238
235
- ``infer_from_extension`` (default behavior)
239
236
- ``disable``
240
-
- ``.gz``
241
237
- ``.bz2``
238
+
- ``.gz``
239
+
- ``.xz``
242
240
- ``.zst``
243
241
244
-
By default, ``smart_open`` determines the compression algorithm to use based on the file extension.
242
+
By default, ``smart_open`` automatically (de)compresses the file if the filename ends with one of these extensions.
243
+
`See also <https://github.com/piskvorky/smart_open/blob/master/smart_open/compression.py>`__
244
+
``smart_open.compression.get_supported_compression_types`` and ``mart_open.compression.register_compressor``.
245
245
246
246
.. code-block:: python
247
247
@@ -292,13 +292,15 @@ This is just an example: ``lzma`` is in the standard library and is registered b
292
292
Transport-specific Options
293
293
--------------------------
294
294
295
-
``smart_open`` supports a wide range of transport options out of the box, including:
295
+
``smart_open`` supports a wide range of transport options out of the box.
296
+
For the full list of supported URI schemes, see `help.txt <https://github.com/piskvorky/smart_open/blob/master/help.txt>`__ or ``help('smart_open')``.
297
+
Some examples::
296
298
297
-
- S3
299
+
- AWS S3 (and any S3-Compatible)
298
300
- HTTP, HTTPS (read-only)
299
301
- SSH, SCP and SFTP
300
-
- WebHDFS
301
-
- GCS
302
+
- HDFS / WebHDFS
303
+
- Google Cloud Storage
302
304
- Azure Blob Storage
303
305
304
306
Each option involves setting up its own set of parameters.
@@ -312,7 +314,7 @@ Here are some examples of using this parameter:
312
314
>>> fin =open('s3://commoncrawl/robots.txt', transport_params=dict(client=boto3.client('s3')))
313
315
>>> fin =open('s3://commoncrawl/robots.txt', transport_params=dict(buffer_size=1024))
314
316
315
-
For the full list of keyword arguments supported by each transport option, see the documentation:
317
+
For the full list of keyword arguments supported by each transport option, see `help.txt <https://github.com/piskvorky/smart_open/blob/master/help.txt>`__ or ``help('smart_open')``.
0 commit comments