@@ -51,16 +51,13 @@ public abstract class ErrorMessages {
51
51
public static final String ARG_S_MUST_BE_S_NOT_P = "%s argument %s must be %s, not %p" ;
52
52
public static final String ARG_D_MUST_BE_S_OR_S = "%s argument %d must be '%s' or '%s'" ;
53
53
public static final String ARG_S_MUST_BE_A_LIST_OR_TUPLE = "%s must be a list or tuple" ;
54
- public static final String ARG_D_MUST_NOT_BE_EMPTY = "arg %d must not be empty" ;
55
- public static final String ARG_EXPECTED_GOT = "%s argument expected, got %p" ;
56
54
public static final String ARG_IS_EMPTY_SEQ = "%s() arg is an empty sequence" ;
57
55
public static final String ARG_MUST_BE_INT_OR_HAVE_FILENO_METHOD = "argument must be an int, or have a fileno() method." ;
58
56
public static final String ARG_MUST_BE_NUMBER = "%s argument must be a number, not '%p'" ;
59
57
public static final String ARG_MUST_BE_S_NOT_P = "%s argument must be a %s, not %p" ;
60
58
public static final String S_BRACKETS_ARG_MUST_BE_S_NOT_P = "%s() argument must be a %s, not %p" ;
61
59
public static final String ARG_MUST_BE_STRING_OR_BYTELIKE_OR_NUMBER = "%s argument must be a string, a bytes-like object or a number, not %p" ;
62
60
public static final String ARG_MUST_BE_STRING_OR_NUMBER = "%s argument must be a string or a number, not '%p'" ;
63
- public static final String ARG_MUST_BE_UNICODE = "%s argument %d must be a unicode character, not %p" ;
64
61
public static final String ARG_MUST_NOT_BE_ZERO = "%s arg %d must not be zero" ;
65
62
public static final String ARG_MUST_NOT_BE_EMPTY = "%s arg %d must not be empty" ;
66
63
public static final String ARG_NOT_IN_RANGE = "%s arg not in range(%s)" ;
@@ -93,7 +90,6 @@ public abstract class ErrorMessages {
93
90
public static final String BAD_MEMBER_DESCR_TYPE_FOR_P = "bad memberdescr type for %p" ;
94
91
public static final String BAD_OPERAND_FOR = "bad operand type for %s%s: '%p'" ;
95
92
public static final String BAD_VALUES_IN_FDS_TO_KEEP = "bad value(s) in fds_to_keep" ;
96
- public static final String BAD_TYPECODE = "bad typecode (must be i, d, b, B, or l)" ;
97
93
public static final String BASE_OUT_OF_RANGE_FOR_INT = "base is out of range for int()" ;
98
94
public static final String BASES_MUST_BE_TYPES = "bases must be types" ;
99
95
public static final String BASES_ITEM_CAUSES_INHERITANCE_CYCLE = "a __bases__ item causes an inheritance cycle" ;
@@ -121,7 +117,6 @@ public abstract class ErrorMessages {
121
117
public static final String CANNOT_ASSIGN_TO = "cannot assign to %s" ;
122
118
public static final String CANNOT_ASSIGN_TO_COMPREHENSION = "cannot assign to %s comprehension" ;
123
119
public static final String CANNOT_BE_INTEPRETED_AS_LONG = "%s cannot be interpreted as long (type %p)" ;
124
- public static final String CANNOT_BE_NEGATIVE = "%s cannot be negative" ;
125
120
public static final String S_CANNOT_BE_NEGATIVE_INTEGER_D = "%s cannot be negative integer (%d)" ;
126
121
public static final String CANNOT_CALL_CTOR_OF = "cannot call constructor of %s" ;
127
122
public static final String CANNOT_CLOSE_EXPORTED_PTRS_EXIST = "cannot close exported pointers exist" ;
@@ -153,13 +148,9 @@ public abstract class ErrorMessages {
153
148
public static final String CANNOT_LOAD = "cannot load %s: %s" ;
154
149
public static final String CANNOT_LOAD_M = "cannot load %s: %m" ;
155
150
public static final String CANNOT_RELEASE_UNAQUIRED_LOCK = "cannot release un-acquired lock" ;
156
- public static final String CANNOT_RESIZE_BUFFER = "cannot resize buffer" ;
157
- public static final String CANNOT_SET_VERIFY_MODE_TO_CERT_NONE = "Cannot set verify_mode to CERT_NONE when check_hostname is enabled." ;
158
- public static final String CANNOT_SPECIFY_FILTERS = "Cannot specify filters except with FORMAT_RAW" ;
159
151
public static final String CANNOT_SPECIFY_BOTH_COMMA_AND_UNDERSCORE = "Cannot specify both ',' and '_'." ;
160
152
public static final String CANNOT_SPECIFY_C_WITH_C = "Cannot specify '%c' with '%c'." ;
161
153
public static final String CANNOT_USE_FD_AND_FOLLOW_SYMLINKS_TOGETHER = "%s: cannot use fd and follow_symlinks together" ;
162
- public static final String CANNOT_USE_TO_INITIALIZE_ARRAY = "cannot use a %p to initialize an array with typecode '%s'" ;
163
154
public static final String CANT_CONCAT_S_TO_P = "can't concat %s to %p" ;
164
155
public static final String CANT_CONVERT_TO_FLOAT = "can't convert %s to float" ;
165
156
public static final String CANT_CONVERT_TO_STR_EXPLICITELY = "Can't convert '%p' object to str implicitly" ;
@@ -169,7 +160,6 @@ public abstract class ErrorMessages {
169
160
public static final String CANT_EXTEND_JAVA_CLASS_NOT_TYPE = "Function extend needs a Java type as its argument not %p" ;
170
161
public static final String CANT_FIND_MODULE = "can't find module '%s'" ;
171
162
public static final String CANT_MULTIPLY_SEQ_BY_NON_INT = "can't multiply sequence by non-int of type '%p'" ;
172
- public static final String CANT_PICKLE_FUNC_OBJS = "can't pickle function objects" ;
173
163
public static final String CANT_SET_S_S = "can't set %s.%s" ;
174
164
public static final String CANT_SET_ATTRIBUTES_OF_TYPE = "can't set attributes of %s" ;
175
165
public static final String CANT_SET_ATTRIBUTES_OF_TYPE_S = "can't set attributes of built-in/extension type '%s'" ;
@@ -204,7 +194,6 @@ public abstract class ErrorMessages {
204
194
public static final String CORRUPTED_CAPI_LIB_OBJ = "corrupted C API library object: %s" ;
205
195
public static final String COULD_NOT_CONVERT_STRING_TO_COMPLEX = "could not convert string to complex: %s" ;
206
196
public static final String COULD_NOT_CONVERT_STRING_TO_FLOAT = "could not convert string to float: %s" ;
207
- public static final String COULD_NOT_GET_BYTES_OF_MEMORYVIEW = "could not get bytes of memoryview" ;
208
197
public static final String COUNT_FUNC_MATH = "count function in Math" ;
209
198
public static final String COVERAGE_TRACKER_NOT_RUNNING = "coverage tracker not running" ;
210
199
public static final String CREATING_SOCKETS_NOT_ALLOWED = "creating sockets not allowed" ;
@@ -223,10 +212,7 @@ public abstract class ErrorMessages {
223
212
public static final String SUPER_NO_CLASS = "super(): no arguments" ;
224
213
public static final String SUPER_EMPTY_CLASS = "super(): empty __class__ cell" ;
225
214
public static final String EMPTY_SEPARATOR = "empty separator" ;
226
- public static final String EMPTY_STR_FOR_COMPLEX = "empty string for complex()" ;
227
- public static final String ENCODING_WITHOUT_STR_ARG = "encoding without a string argument" ;
228
215
public static final String S_MUST_BE_NONE_OR_STRING = "%s must be None or a string, not %p" ;
229
- public static final String END_MUST_BE_NONE_OR_STRING = "end must be None or a string, not %p" ;
230
216
public static final String ERROR_5_WHILE_DECOMPRESSING = "Error -5 while decompressing data: incomplete or truncated stream" ;
231
217
public static final String ERROR_WRITING_FORKEXEC = "there was an error writing the fork_exec error to the error pipe" ;
232
218
public static final String ERROR_CALLING_SET_NAME = "Error calling __set_name__ on '%p' instance '%s' in '%N'" ;
@@ -269,7 +255,6 @@ public abstract class ErrorMessages {
269
255
public static final String FOREIGN_OBJ_HAS_NO_ATTR_S = "foreign object has no attribute '%s'" ;
270
256
public static final String FOREIGN_OBJ_ISNT_ITERABLE = "foreign object is not iterable" ;
271
257
public static final String FORMAT_REQUIRES_MAPPING = "format requires a mapping" ;
272
- public static final String FORMAT_SPEC_MUST_BE_STRING = "format_spec must be a string" ;
273
258
public static final String FORMATED_S_TOO_LONG = "formatted %s is too long (precision too large?)" ;
274
259
public static final String FREE_VAR_REFERENCED_BEFORE_ASSIGMENT = "free variable '%s' referenced before assignment in enclosing scope" ;
275
260
public static final String FUNC_CONSTRUCTION_NOT_SUPPORTED = "function construction not supported for (%p, %p, %p, %p, %p, %p)" ;
@@ -295,7 +280,6 @@ public abstract class ErrorMessages {
295
280
public static final String IDN_ENC_FAILED = "IDN encoding failed: %s" ;
296
281
public static final String IF_YOU_GIVE_ONLY_ONE_ARG_TO_DICT = "if you give only one argument to maketrans it must be a dict" ;
297
282
public static final String INVALID_INDEXING_OF_0_DIM_MEMORY = "invalid indexing of 0-dim memory" ;
298
- public static final String ILLEGAL_ARG = "illegal argument" ;
299
283
public static final String ILLEGAL_ENVIRONMENT_VARIABLE_NAME = "illegal environment variable name" ;
300
284
public static final String ILLEGAL_EXPRESSION_FOR_AUGMENTED_ASSIGNEMNT = "illegal expression for augmented assignment" ;
301
285
public static final String ILLEGAL_IP_STRING_PASSED_TO = "illegal IP address string passed to %s" ;
@@ -321,8 +305,6 @@ public abstract class ErrorMessages {
321
305
public static final String INTEGER_REQUIRED_GOT = "an integer is required (got type %p)" ;
322
306
public static final String INTERMEDIATE_OVERFLOW_IN = "intermediate overflow in %s" ;
323
307
public static final String INVALD_OR_UNREADABLE_CLASSPATH = "invalid or unreadable classpath: '%s' - %m" ;
324
- public static final String INVALID_OR_UNSUPPORTED_PROTOCOL_VERSION = "invalid or unsupported protocol version: %s" ;
325
- public static final String INVALID_OR_UNSUPPORTED_KEYSTORE = "invalid or unsupported keystore: %s" ;
326
308
public static final String INVALID_ARGS = "%s: invalid arguments" ;
327
309
public static final String INVALID_ARGS_FOR_ALLOCFUNC = "invalid arguments for allocfunc (expected 2 but got %s)" ;
328
310
public static final String INVALID_ARGS_FOR_FASTCALL_METHOD = "invalid arguments for fastcall method (expected 3 but got %s)" ;
@@ -333,7 +315,6 @@ public abstract class ErrorMessages {
333
315
public static final String INVALID_CONTAINER_FORMAT = "Invalid container format: %d" ;
334
316
public static final String INVALID_ESCAPE_AT = "invalid %s escape at position %d" ;
335
317
public static final String INVALID_ESCAPE_SEQ_AT = "invalid escape sequence '\\ %s' at position %d" ;
336
- public static final String INVALID_FILE_DESCRIPTOR = "invalid file descriptor" ;
337
318
public static final String INVALID_FILTER = "Invalid filter ID: %d" ;
338
319
public static final String INVALID_FILTER_CHAIN_FOR_FORMAT = "Invalid filter chain for FORMAT_ALONE - must be a single LZMA1 filter" ;
339
320
public static final String INVALID_INDEX_S = "invalid index %s" ;
@@ -364,14 +345,11 @@ public abstract class ErrorMessages {
364
345
public static final String INIT_TAKES_ONE_ARG = "%N.__init__() takes exactly one argument (the instance to initialize)" ;
365
346
public static final String INIT_TAKES_ONE_ARG_OBJECT = "object.__init__() takes exactly one argument (the instance to initialize)" ;
366
347
public static final String INVALID_VALUE_NAN = "Invalid value NaN (not a number)" ;
367
- public static final String INVALID_VALUE_FOR_VERIFY_MODE = "invalid value for verify_mode" ;
368
348
public static final String IS_NOT_SUBTYPE_OF = "%s.__new__(%N): %N is not a subtype of %s" ;
369
349
public static final String IS_NOT_TYPE_OBJ = "%s is not a type object (%p)" ;
370
350
public static final String ISINSTANCE_ARG_2_MUST_BE_TYPE_OR_TUPLE_OF_CLSS_WAS = "issubclass() arg 2 must be a class or tuple of classes" ;
371
351
public static final String ISINSTANCE_ARG_2_MUST_BE_TYPE_OR_TUPLE_OF_TYPE = "isinstance() arg 2 must be a type or tuple of types (was: %s)" ;
372
- public static final String ISNT_IN_BYTES_LITERAL = "%s is not in bytes literal" ;
373
352
public static final String ISSUBCLASS_MUST_BE_CLASS_OR_TUPLE = "issubclass() arg 2 must be a class or tuple of classes" ;
374
- public static final String ITER_RETURNED_NON_ITERABLE = "iter() returned non-iterator of type '%p'" ;
375
353
public static final String ITER_V_MUST_BE_CALLABLE = "iter(v, w): v must be callable" ;
376
354
public static final String KEYWORD_NAMES_MUST_BE_STR_GOT_P = "keyword names must be str, get %p" ;
377
355
public static final String KEYWORDS_MUST_BE_STRINGS = "%s() keywords must be strings" ;
@@ -395,7 +373,6 @@ public abstract class ErrorMessages {
395
373
public static final String MEMORYVIEW_INVALID_SLICE_KEY = "memoryview: invalid slice key" ;
396
374
public static final String MEMORYVIEW_A_BYTES_LIKE_OBJECT_REQUIRED_NOT_P = "memoryview: a bytes-like object is required, not '%p'" ;
397
375
public static final String MEMORYVIEW_INVALID_VALUE_FOR_FORMAT_S = "memoryview: invalid value for format '%s'" ;
398
- public static final String MEMORYVIEW_INVALID_TYPE_FOR_FORMAT_S = "memoryview: invalid type for format '%s'" ;
399
376
public static final String MEMORYVIEW_SLICE_ASSIGNMENT_RESTRICTED_TO_DIM_1 = "memoryview slice assignments are currently restricted to ndim = 1" ;
400
377
public static final String MEMORYVIEW_DIFFERENT_STRUCTURES = "memoryview assignment: lvalue and rvalue have different structures" ;
401
378
public static final String MEMORYVIEW_FORBIDDEN_RELEASED = "operation forbidden on released memoryview object" ;
@@ -502,7 +479,6 @@ public abstract class ErrorMessages {
502
479
public static final String PYTHON_INT_TOO_LARGE_TO_CONV_TO = "Python int too large to convert to %s" ;
503
480
public static final String PYTHON_INT_TOO_LARGE_TO_CONV_TO_C_TYPE = "Python int too large to convert to %s-byte C type" ;
504
481
public static final String RANGE_OUT_OF_BOUNDS = "range index out of range" ;
505
- public static final String RAW_FORMAT_NOT_SUPPORTED = "RAW format unsupported" ;
506
482
public static final String READ_BYTE_OUT_OF_RANGE = "read byte out of range" ;
507
483
public static final String READ_WRITE_BYTELIKE_OBJ = "read-write bytes-like object" ;
508
484
public static final String READONLY_ATTRIBUTE = "readonly attribute" ;
@@ -547,7 +523,6 @@ public abstract class ErrorMessages {
547
523
public static final String SHOULD_RETURN = "%s should return %s" ;
548
524
public static final String SHOULD_RETURN_NONE = "%s should return None" ;
549
525
public static final String SIGNAL_MUST_BE_SIGIGN_SIGDFL_OR_CALLABLE_OBJ = "signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object" ;
550
- public static final String SIGNED_CHAR_GREATER_THAN_MAX = "signed char is greater than maximum" ;
551
526
public static final String SIGNED_INT_GREATER_THAN_MAX = "signed integer is greater than maximum" ;
552
527
public static final String SIGNED_INT_LESS_THAN_MIN = "signed integer is less than minimum" ;
553
528
public static final String SIGNED_SHORT_INT_GREATER_THAN_MAX = "signed short integer is greater than maximum" ;
@@ -634,14 +609,10 @@ public abstract class ErrorMessages {
634
609
public static final String UNSUPPORTED_TARGET_SIZE = "Unsupported target size: %d" ;
635
610
public static final String UNSUPPORTED_USE_OF_SYS_EXECUTABLE = "internal error: unsupported use of sys.executable" ;
636
611
public static final String UTIME_CANNOT_USE_DIR_FD_AND_FOLLOW_SYMLINKS = "utime: cannot use dir_fd and follow_symlinks together on this platform" ;
637
- public static final String VALUE_EXPECTED = "%s value expected" ;
638
612
public static final String VALUE_TOO_LARGE_TO_FIT_INTO_INDEX = "value too large to fit into index-sized integer" ;
639
- public static final String VALUE_TOO_LARGE_FOR_S_TYPE = "Value too large for %s type" ;
640
613
public static final String WAS_NOT_POSSIBLE_TO_MARSHAL = "Was not possible to marshal" ;
641
614
public static final String WAS_NOT_POSSIBLE_TO_MARSHAL_P = "Was not possible to marshal %p" ;
642
615
public static final String WEAK_OBJ_GONE_AWAY = "weak object has gone away" ;
643
- public static final String WORK_DIR_NOT_ACCESSIBLE = "working directory %s is not accessible" ;
644
- public static final String WRITE_BYTE_OUT_OF_RANGE = "write byte out of range" ;
645
616
public static final String X_NOT_IN_LIST = "x not in list" ;
646
617
public static final String X_NOT_IN_TUPLE = "tuple.index(x): x not in tuple" ;
647
618
public static final String YOU_MAY_SPECIFY_EITHER_OR_BUT_NOT_BOTH = "%s: you may specify either '%s' or '%s' but not both" ;
@@ -676,9 +647,11 @@ public abstract class ErrorMessages {
676
647
public static final String SHOULD_HAVE_RETURNED_EXCEPTION = "calling %N should have returned an instance of BaseException, not %p" ;
677
648
public static final String STRING_KEYS_MUST_BE_LENGTH_1 = "string keys in translate table must be of length 1" ;
678
649
public static final String KEYS_IN_TRANSLATE_TABLE_MUST_BE_STRINGS_OR_INTEGERS = "keys in translate table must be strings or integers" ;
679
- public static final String EXPECTED_BYTES_P_FOUND = "expected bytes, %p found" ;
680
650
public static final String EMBEDDED_NULL_BYTE = "embedded null byte" ;
681
651
public static final String CANNOT_INTERN_P = "can't intern %p" ;
652
+ public static final String METHOD_REQUIRES_A_BYTES_OBJECT_GOT_P = "Method requires a 'bytes' object, got '%p'" ;
653
+ public static final String FIRST_ARG_MUST_BE_BYTES_OR_A_TUPLE_OF_BYTES_NOT_P = "first arg must be bytes or a tuple of bytes, not %p" ;
654
+ public static final String A_BYTES_LIKE_OBJECT_IS_REQUIRED_NOT_P = "a bytes-like object is required, not '%p'" ;
682
655
683
656
// SSL errors
684
657
public static final String SSL_SESSION_CLOSED = "SSL/TLS session closed cleanly." ;
@@ -700,9 +673,9 @@ public abstract class ErrorMessages {
700
673
public static final String CERTIFICATE_VERIFY_FAILED = "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: %s" ;
701
674
public static final String CONTEXT_DOESNT_SUPPORT_MIN_MAX = "The context's protocol doesn't support modification of highest and lowest version." ;
702
675
public static final String UNSUPPORTED_PROTOCOL_VERSION = "Unsupported protocol version 0x%x" ;
703
- public static final String METHOD_REQUIRES_A_BYTES_OBJECT_GOT_P = "Method requires a 'bytes' object, got '%p' " ;
704
- public static final String FIRST_ARG_MUST_BE_BYTES_OR_A_TUPLE_OF_BYTES_NOT_P = "first arg must be bytes or a tuple of bytes, not %p " ;
705
- public static final String A_BYTES_LIKE_OBJECT_IS_REQUIRED_NOT_P = "a bytes-like object is required, not '%p' " ;
676
+ public static final String CANNOT_SET_VERIFY_MODE_TO_CERT_NONE = "Cannot set verify_mode to CERT_NONE when check_hostname is enabled. " ;
677
+ public static final String INVALID_OR_UNSUPPORTED_PROTOCOL_VERSION = "invalid or unsupported protocol version: %s " ;
678
+ public static final String INVALID_VALUE_FOR_VERIFY_MODE = "invalid value for verify_mode " ;
706
679
707
680
// mmap
708
681
public static final String MEM_MAPPED_LENGTH_MUST_BE_POSITIVE = "memory mapped length must be positive" ;
@@ -769,7 +742,6 @@ public abstract class ErrorMessages {
769
742
public static final String S_RETURNED_TOO_MUCH_DATA = "%s returned too much data: %d bytes requested, %d returned" ;
770
743
public static final String S_SHOULD_RETURN_BYTES_NOT_P = " should have returned a bytes object, not '%p'" ;
771
744
public static final String BAD_MODE = "Must have exactly one of create/read/write/append mode and at most one plus" ;
772
- public static final String NEG_FD = "negative file descriptor" ;
773
745
public static final String CANNOT_USE_CLOSEFD = "Cannot use closefd=False with file name" ;
774
746
public static final String EXPECTED_INT_FROM_OPENER = "expected integer from opener" ;
775
747
public static final String OPENER_RETURNED_D = "opener returned %d" ;
@@ -779,7 +751,6 @@ public abstract class ErrorMessages {
779
751
public static final String S_TO_CLOSED_FILE = "%s to closed file" ;
780
752
781
753
// pickle errors
782
- public static final String CANNOT_PICKLE_OBJECT = "cannot pickle '%s' object" ;
783
754
public static final String CANNOT_PICKLE_OBJECT_TYPE = "cannot pickle '%p' object" ;
784
755
785
756
public static final String P_RETURNED_NON_P = "%p.%s returned non-%s (type %p). " +
0 commit comments