@@ -99,11 +99,10 @@ for example, a package and its resources can be imported from a zip file using
9999 Added support for *traversable * representing a directory.
100100
101101
102- Deprecated functions
103- ^^^^^^^^^^^^^^^^^^^^
102+ Functional API
103+ ^^^^^^^^^^^^^^
104104
105- An older, deprecated set of functions is still available, but is
106- scheduled for removal in a future version of Python.
105+ An older, previously deprecated set of functions is still available.
107106The main drawback of these functions is that they do not support
108107directories: they assume all resources are located directly within a *package *.
109108
@@ -116,8 +115,6 @@ directories: they assume all resources are located directly within a *package*.
116115
117116 The ``Package `` type is defined as ``Union[str, ModuleType] ``.
118117
119- .. deprecated :: 3.12
120-
121118
122119.. data :: Resource
123120
@@ -138,11 +135,9 @@ directories: they assume all resources are located directly within a *package*.
138135 sub-resources (i.e. it cannot be a directory). This function returns a
139136 ``typing.BinaryIO `` instance, a binary I/O stream open for reading.
140137
141- .. deprecated :: 3.11
142-
143- Calls to this function can be replaced by::
138+ This function is roughly equivalent to::
144139
145- files(package).joinpath(resource).open('rb')
140+ files(package).joinpath(resource).open('rb')
146141
147142
148143.. function :: open_text(package, resource, encoding='utf-8', errors='strict')
@@ -159,11 +154,9 @@ directories: they assume all resources are located directly within a *package*.
159154 This function returns a ``typing.TextIO `` instance, a text I/O stream open
160155 for reading.
161156
162- .. deprecated :: 3.11
157+ This function is roughly equivalent to::
163158
164- Calls to this function can be replaced by::
165-
166- files(package).joinpath(resource).open('r', encoding=encoding)
159+ files(package).joinpath(resource).open('r', encoding=encoding)
167160
168161
169162.. function :: read_binary(package, resource)
@@ -177,11 +170,9 @@ directories: they assume all resources are located directly within a *package*.
177170 sub-resources (i.e. it cannot be a directory). This function returns the
178171 contents of the resource as :class: `bytes `.
179172
180- .. deprecated :: 3.11
181-
182- Calls to this function can be replaced by::
173+ This function is roughly equivalent to::
183174
184- files(package).joinpath(resource).read_bytes()
175+ files(package).joinpath(resource).read_bytes()
185176
186177
187178.. function :: read_text(package, resource, encoding='utf-8', errors='strict')
@@ -196,11 +187,9 @@ directories: they assume all resources are located directly within a *package*.
196187 have the same meaning as with built-in :func: `open `. This function
197188 returns the contents of the resource as :class: `str `.
198189
199- .. deprecated :: 3.11
190+ This function is roughly equivalent to::
200191
201- Calls to this function can be replaced by::
202-
203- files(package).joinpath(resource).read_text(encoding=encoding)
192+ files(package).joinpath(resource).read_text(encoding=encoding)
204193
205194
206195.. function :: path(package, resource)
@@ -217,11 +206,9 @@ directories: they assume all resources are located directly within a *package*.
217206 within *package *; it may not contain path separators and it may not have
218207 sub-resources (i.e. it cannot be a directory).
219208
220- .. deprecated :: 3.11
221-
222- Calls to this function can be replaced using :func: `as_file `::
209+ This function is roughly equivalent to ::
223210
224- as_file(files(package).joinpath(resource))
211+ as_file(files(package).joinpath(resource))
225212
226213
227214.. function :: is_resource(package, name)
@@ -232,11 +219,9 @@ directories: they assume all resources are located directly within a *package*.
232219 *package * is either a name or a module object which conforms to the
233220 ``Package `` requirements.
234221
235- .. deprecated :: 3.11
222+ This function is roughly equivalent to::
236223
237- Calls to this function can be replaced by::
238-
239- files(package).joinpath(resource).is_file()
224+ files(package).joinpath(resource).is_file()
240225
241226
242227.. function :: contents(package)
@@ -248,8 +233,6 @@ directories: they assume all resources are located directly within a *package*.
248233 *package * is either a name or a module object which conforms to the
249234 ``Package `` requirements.
250235
251- .. deprecated :: 3.11
252-
253- Calls to this function can be replaced by::
236+ This function is roughly equivalent to::
254237
255- (resource.name for resource in files(package).iterdir() if resource.is_file())
238+ (resource.name for resource in files(package).iterdir() if resource.is_file())
0 commit comments