mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 16:32:07 +02:00
19.0 vanilla
This commit is contained in:
parent
0a7ae8db93
commit
991d2234ca
416 changed files with 646602 additions and 300844 deletions
|
|
@ -11,14 +11,14 @@ _writer = codecs.getwriter('utf-8')
|
|||
|
||||
|
||||
def csv_reader(stream, **params):
|
||||
warnings.warn("Deprecated since Odoo 18.0: can just use `csv.reader` with a text stream or use `TextIOWriter` or `codec.getreader` to transcode.", DeprecationWarning, 2)
|
||||
warnings.warn("Deprecated since Odoo 18.0: can just use `csv.reader` with a text stream or use `TextIOWriter` or `codec.getreader` to transcode.", DeprecationWarning, stacklevel=2)
|
||||
assert not isinstance(stream, io.TextIOBase),\
|
||||
"For cross-compatibility purposes, csv_reader takes a bytes stream"
|
||||
return csv.reader(_reader(stream), **params)
|
||||
|
||||
|
||||
def csv_writer(stream, **params):
|
||||
warnings.warn("Deprecated since Odoo 18.0: can just use `csv.writer` with a text stream or use `TextIOWriter` or `codec.getwriter` to transcode.", DeprecationWarning, 2)
|
||||
warnings.warn("Deprecated since Odoo 18.0: can just use `csv.writer` with a text stream or use `TextIOWriter` or `codec.getwriter` to transcode.", DeprecationWarning, stacklevel=2)
|
||||
assert not isinstance(stream, io.TextIOBase), \
|
||||
"For cross-compatibility purposes, csv_writer takes a bytes stream"
|
||||
return csv.writer(_writer(stream), **params)
|
||||
|
|
@ -32,7 +32,7 @@ def to_text(source: typing.Any) -> str:
|
|||
* bytes are decoded as UTF-8
|
||||
* rest is textified
|
||||
"""
|
||||
warnings.warn("Deprecated since Odoo 18.0.", DeprecationWarning, 2)
|
||||
warnings.warn("Deprecated since Odoo 18.0.", DeprecationWarning, stacklevel=2)
|
||||
if source is None or source is False:
|
||||
return ''
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue