cubicweb #3845572 _create_copyfrom_buffer [validation pending]

_create_copyfrom_buffer (dataimport.py) is kind of ugly. We should remove all the if/elif/else parts, and cleanup the behavior in the else:return None case (it hides the possible errors).

Moreover, the "if replace_sep:" clause is buggy, and should be "if replace_sep is not None":

prioritynormal
typebug
done in3.20.0
load1.500
load left0.000
closed by<not specified>
patch[dataimport] Fix use of _create_copyfrom_buffer() (related to #3845572) [applied][dataimport] do not use sys.exit() to raise missing argument error [applied][dataimport] _create_copyfrom_buffer: do not ignore columns if data is a list [applied][dataimport] _create_copyfrom_buffer: fix datetime converter + add time converter [applied][dataimport] _create_copyfrom_buffer: raise ValueError if conversion cannot be performed [applied][dataimport] _create_copyfrom_buffer: fix separator check in string converter [applied][dataimport] _create_copyfrom_buffer: add the tests [applied][dataimport] _create_copyfrom_buffer: put converters into a list [applied][devtools] improve error message when postgresql tools are missing [applied][dataimport] rework RQLObjectStore to use new CW 3.19 connection API [rejected]