tests: keep on using deprecated cgi module in tests (#86355) #451
|
@ -251,6 +251,8 @@ class CsvDataSource(BaseResource):
|
|||
file_type = self.csv_file.name.split('.')[-1]
|
||||
if file_type not in ('ods', 'xls', 'xlsx'):
|
||||
content = self.get_content_without_bom()
|
||||
if '\x00' in content:
|
||||
raise ValueError(_('line contains NUL'))
|
||||
|
||||
reader = csv.reader(content.splitlines(), **self.dialect_options)
|
||||
rows = list(reader)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import base64
|
||||
import cgi
|
||||
import cgi # noqa pylint: disable=deprecated-module
|
||||
import io
|
||||
import json
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import base64
|
||||
import cgi
|
||||
import cgi # noqa pylint: disable=deprecated-module
|
||||
import json
|
||||
import os
|
||||
import urllib.parse
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import base64
|
||||
import cgi
|
||||
import cgi # noqa pylint: disable=deprecated-module
|
||||
import functools
|
||||
import io
|
||||
import json
|
||||
|
|
Loading…
Reference in New Issue
Python 3.11 accepte désormais ça mais je préfère qu'on continue à éviter, donc j'ajoute le test explicite.