Path 1: 15 calls (0.44)

'@test_23421_tmpæ' (11) PosixPath (3) '/Users/andrehora/Desktop/xxx/@test_23421_tmpæ-gzdir/testgzip.gz' (1)

'wb' (5) 'rb' (3) 'ab' (2) 'xb' (1) 'w' (1) 'r' (1) 'a' (1) 'x' (1)

9 (15)

None (15)

None (15)

None (15)

GzipFile (15)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 2: 8 calls (0.24)

'@test_23421_tmpæ' (8)

'rt' (4) 'wt' (3) 'at' (1)

9 (8)

'ascii' (6) 'utf-16' (2)

None (7) 'ignore' (1)

None (6) '\n' (1) '\r' (1)

TextIOWrapper (8)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 3: 2 calls (0.06)

'@test_23421_tmpæ' (2)

'wbt' (1) 'xbt' (1)

9 (2)

None (2)

None (2)

None (2)

ValueError (2)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 4: 2 calls (0.06)

'@test_23421_tmpæ' (2)

'xb' (1) 'x' (1)

9 (2)

None (2)

None (2)

None (2)

FileExistsError (2)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 5: 2 calls (0.06)

BytesIO (2)

'r' (1) 'rb' (1)

9 (2)

None (2)

None (2)

None (2)

GzipFile (2)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 6: 1 calls (0.03)

123.456 (1)

'rb' (1)

9 (1)

None (1)

None (1)

None (1)

TypeError (1)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 7: 1 calls (0.03)

'@test_23421_tmpæ' (1)

'rb' (1)

9 (1)

'utf-8' (1)

None (1)

None (1)

ValueError (1)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 8: 1 calls (0.03)

'@test_23421_tmpæ' (1)

'rb' (1)

9 (1)

None (1)

'ignore' (1)

None (1)

ValueError (1)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 9: 1 calls (0.03)

'@test_23421_tmpæ' (1)

'rb' (1)

9 (1)

None (1)

None (1)

'\n' (1)

ValueError (1)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file
            

Path 10: 1 calls (0.03)

BytesIO (1)

'rt' (1)

9 (1)

'ascii' (1)

None (1)

None (1)

TextIOWrapper (1)

1def open(filename, mode="rb", compresslevel=_COMPRESS_LEVEL_BEST,
2         encoding=None, errors=None, newline=None):
3    """Open a gzip-compressed file in binary or text mode.
4
5    The filename argument can be an actual filename (a str or bytes object), or
6    an existing file object to read from or write to.
7
8    The mode argument can be "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for
9    binary mode, or "rt", "wt", "xt" or "at" for text mode. The default mode is
10    "rb", and the default compresslevel is 9.
11
12    For binary mode, this function is equivalent to the GzipFile constructor:
13    GzipFile(filename, mode, compresslevel). In this case, the encoding, errors
14    and newline arguments must not be provided.
15
16    For text mode, a GzipFile object is created, and wrapped in an
17    io.TextIOWrapper instance with the specified encoding, error handling
18    behavior, and line ending(s).
19
20    """
21    if "t" in mode:
22        if "b" in mode:
23            raise ValueError("Invalid mode: %r" % (mode,))
24    else:
25        if encoding is not None:
26            raise ValueError("Argument 'encoding' not supported in binary mode")
27        if errors is not None:
28            raise ValueError("Argument 'errors' not supported in binary mode")
29        if newline is not None:
30            raise ValueError("Argument 'newline' not supported in binary mode")
31
32    gz_mode = mode.replace("t", "")
33    if isinstance(filename, (str, bytes, os.PathLike)):
34        binary_file = GzipFile(filename, gz_mode, compresslevel)
35    elif hasattr(filename, "read") or hasattr(filename, "write"):
36        binary_file = GzipFile(None, gz_mode, compresslevel, filename)
37    else:
38        raise TypeError("filename must be a str or bytes object, or a file")
39
40    if "t" in mode:
41        encoding = io.text_encoding(encoding)
42        return io.TextIOWrapper(binary_file, encoding, errors, newline)
43    else:
44        return binary_file