@@ -120,6 +120,7 @@ public abstract class ErrorMessages {
120
120
public static final String CALLING_NATIVE_FUNC_EXPECTED_ARGS = "Calling native function %s expected %d arguments but got %d." ;
121
121
public static final String CALLING_NATIVE_FUNC_FAILED = "Calling native function %s failed: %m" ;
122
122
public static final String DECODER_RETURNED_P_INSTEAD_OF_BYTES = "'%s' decoder returned '%p' instead of 'str'; use codecs.decode() to decode to arbitrary types" ;
123
+ public static final String ENCODER_RETURNED_P_INSTEAD_OF_BYTES = "'%s' encoder returned '%p' instead of 'bytes'; use codecs.encode() to encode to arbitrary types" ;
123
124
public static final String S_ENCODER_RETURNED_P_INSTEAD_OF_BYTES = "'%s' encoder returned '%p' instead of 'bytes'; use codecs.encode() to encode to arbitrary types" ;
124
125
public static final String ENCODER_S_RETURNED_S_INSTEAD_OF_BYTES = "encoder %s returned %s instead of bytes; use codecs.encode() to encode to arbitrary types" ;
125
126
public static final String DECODER_S_RETURNED_P_INSTEAD_OF_STR = "'%s' decoder returned '%p' instead of 'str'; use codecs.decode() to decode to arbitrary types" ;
@@ -168,6 +169,7 @@ public abstract class ErrorMessages {
168
169
public static final String CANNOT_SPECIFY_C_WITH_C = "Cannot specify '%c' with '%c'." ;
169
170
public static final String CANNOT_USE_FD_AND_FOLLOW_SYMLINKS_TOGETHER = "%s: cannot use fd and follow_symlinks together" ;
170
171
public static final String CANT_CONCAT_P_TO_S = "can't concat %p to %s" ;
172
+ public static final String CANT_CONVERT_TO_FLOAT = "can't convert %s to float" ;
171
173
public static final String CANT_CONVERT_TO_STR_EXPLICITELY = "Can't convert '%p' object to str implicitly" ;
172
174
public static final String CANT_COMPARE = "Can't compare %p and %p" ;
173
175
public static final String CANT_DELETE = "can't delete '%s'" ;
@@ -219,6 +221,7 @@ public abstract class ErrorMessages {
219
221
public static final String DICT_CHANGED_DURING_COMPARISON = "dictionary changed during comparison operation" ;
220
222
public static final String CHANGED_SIZE_DURING_ITERATION = "%s changed size during iteration" ;
221
223
public static final String DICT_MUST_BE_SET_TO_DICT = "__dict__ must be set to a dictionary, not a '%p'" ;
224
+ public static final String DICT_OF_P_OBJECTS_HAS_NO_ATTR = "'%p' dict of '%p' object has no attribute '__setitem__'" ;
222
225
public static final String DICT_UPDATE_SEQ_ELEM_HAS_LENGTH_2_REQUIRED = "dictionary update sequence element #%d has length %d; 2 is required" ;
223
226
public static final String DIVISION_BY_ZERO = "division by zero" ;
224
227
public static final String S_DIVISION_BY_ZERO = "%s division by zero" ;
@@ -279,7 +282,9 @@ public abstract class ErrorMessages {
279
282
public static final String FORMATED_S_TOO_LONG = "formatted %s is too long (precision too large?)" ;
280
283
public static final String FREE_VAR_REFERENCED_BEFORE_ASSIGMENT = "free variable '%s' referenced before assignment in enclosing scope" ;
281
284
public static final String FUNC_CONSTRUCTION_NOT_SUPPORTED = "function construction not supported for (%p, %p, %p, %p, %p, %p)" ;
285
+ public static final String FUNC_TAKES_AT_LEAST_D_ARGS = "function takes at least %d arguments (%d given)" ;
282
286
public static final String FUNC_TAKES_EXACTLY_D_ARGS = "function takes exaclty %d arguments (%d given)" ;
287
+ public static final String FUNC_S_MUST_BE_S_NOT_P = "%s() %s must be %s, not %p" ;
283
288
public static final String GENERATOR_EXPR_MUST_BE_PARENTHESIZED = "Generator expression must be parenthesized" ;
284
289
public static final String GENERATOR_IGNORED_EXIT = "generator ignored GeneratorExit" ;
285
290
public static final String GENERATOR_RAISED_STOPITER = "generator raised StopIteration" ;
@@ -307,22 +312,26 @@ public abstract class ErrorMessages {
307
312
public static final String INVALID_INDEXING_OF_0_DIM_MEMORY = "invalid indexing of 0-dim memory" ;
308
313
public static final String ILLEGAL_ENVIRONMENT_VARIABLE_NAME = "illegal environment variable name" ;
309
314
public static final String ILLEGAL_EXPRESSION_FOR_AUGMENTED_ASSIGNEMNT = "illegal expression for augmented assignment" ;
315
+ public static final String ILLEGAL_IP_STRING_PASSED_TO = "illegal IP address string passed to %s" ;
310
316
public static final String ILLEGAL_SOCKET_ADDR_ARG = "%s: illegal sockaddr argument" ;
311
317
public static final String S_ILLEGAL_TIME_TUPLE_ARG = "%s: illegal time tuple argument" ;
312
318
public static final String IMPORT_STAR_ONLY_ALLOWED_AT_MODULE_LEVEL = "import * only allowed at module level" ;
313
319
public static final String INCOMPLETE_FORMAT = "incomplete format" ;
320
+ public static final String INDEX_NOT_INT = "%s: index not int" ;
314
321
public static final String INDEX_OUT_OF_BOUNDS = "index out of bounds" ;
315
322
public static final String INDEX_OUT_OF_BOUNDS_ON_DIMENSION_D = "index out of bounds on dimension %d" ;
316
323
public static final String INDEX_OUT_OF_RANGE = "index out of range" ;
317
324
public static final String INDEX_RETURNED_NON_INT = "__index__ returned non-int (type %p)" ;
318
325
public static final String INPUT_TOO_LONG = "input too long" ;
319
326
public static final String INSTANCE_EX_MAY_NOT_HAVE_SEP_VALUE = "instance exception may not have a separate value" ;
327
+ public static final String INSTANCE_HAS_NO_ATTR_S = "%s instance has no attribute '%s'" ;
320
328
public static final String INT_CANT_CONVERT_STRING_WITH_EXPL_BASE = "int() can't convert non-string with explicit base" ;
321
329
public static final String INT_TOO_LARGE_TO_CONVERT_TO_FLOAT = "int too large to convert to float" ;
322
330
public static final String INTEGER_DIVISION_BY_ZERO = "ZeroDivisionError: integer division or modulo by zero" ;
323
331
public static final String INTEGER_DIVISION_RESULT_TOO_LARGE = "integer division result too large for a float" ;
324
332
public static final String S_EXPECTED_GOT_P = "%s argument expected, got %p" ;
325
333
public static final String REC_LIMIT_GREATER_THAN_1 = "recursion limit must be greater or equal than 1" ;
334
+ public static final String INTEGER_GREATER_THAN_MAX = "integer is greater than maximum" ;
326
335
public static final String INTEGER_REQUIRED = "an integer is required" ;
327
336
public static final String INTEGER_REQUIRED_GOT = "an integer is required (got type %p)" ;
328
337
public static final String INTERMEDIATE_OVERFLOW_IN = "intermediate overflow in %s" ;
@@ -341,6 +350,7 @@ public abstract class ErrorMessages {
341
350
public static final String INVALID_FILTER = "Invalid filter ID: %d" ;
342
351
public static final String INVALID_FILTER_CHAIN_FOR_FORMAT = "Invalid filter chain for FORMAT_ALONE - must be a single LZMA1 filter" ;
343
352
public static final String INVALID_INDEX_S = "invalid index %s" ;
353
+ public static final String INVALID_INPUT_ELEM_TYPE = "Invalid input element type '%p'" ;
344
354
public static final String INVALID_INSTANTIATION_OF_FOREIGN_OBJ = "invalid instantiation of foreign object" ;
345
355
public static final String INVALID_ITEM_RETURNED_FROM_NATIVE_SEQ = "Invalid item type %s returned from native sequence storage (expected: %s)" ;
346
356
public static final String INVALID_LITERAL_FOR_INT_WITH_BASE = "invalid literal for int() with base %s: %s" ;
@@ -380,6 +390,7 @@ public abstract class ErrorMessages {
380
390
public static final String ITER_V_MUST_BE_CALLABLE = "iter(v, w): v must be callable" ;
381
391
public static final String KEYWORD_NAMES_MUST_BE_STR_GOT_P = "keyword names must be str, get %p" ;
382
392
public static final String KEYWORDS_S_MUST_BE_STRINGS = "%s() keywords must be strings" ;
393
+ public static final String KEYWORDS_MUST_BE_STRINGS = "keywords must be strings" ;
383
394
public static final String KLASS_ARG_IS_NOT_HOST_OBJ = "klass argument '%p' is not a host object" ;
384
395
public static final String LAZY_INITIALIZATION_FAILED = "lazy initialization of type %s failed" ;
385
396
public static final String LEFT_BRACKET_WO_RIGHT_BRACKET_IN_ARG = "')' without '(' in argument parsing" ;
@@ -447,7 +458,9 @@ public abstract class ErrorMessages {
447
458
public static final String MUST_BE_TUPLE_OF_CLASSES_NOT_P = "%s.%s must be tuple of classes, not '%p'" ;
448
459
public static final String MUST_RETURN_2TUPLE = "%p.__divmod__() must return a 2-tuple, not %p" ;
449
460
public static final String S_MUST_RETURN_TUPLE = "%s must return a tuple (object, integer)" ;
461
+ public static final String MUST_S_ITER_RETURN_2TUPLE = "%s iterator must return 2-tuples" ;
450
462
public static final String S_MUST_RETURN_S_NOT_P = "%s must return a %s, not %p" ;
463
+ public static final String S_MUST_RETURN_S_OR_S = "%s must return a %s or %s" ;
451
464
public static final String MUTATED_DURING_UPDATE = "%s mutated during update" ;
452
465
public static final String NAME_IS_USED_BEFORE_GLOBAL = "name '%s' is used prior to global declaration" ;
453
466
public static final String NAME_IS_ASSIGNED_BEFORE_GLOBAL = "name '%s' is assigned to before global declaration" ;
@@ -505,12 +518,15 @@ public abstract class ErrorMessages {
505
518
public static final String ONLY_S_AND_S_AMY_FOLLOW_S = "Only %s and %s may follow %s" ;
506
519
public static final String ORDER_MUST_BE_C_F_OR_A = "order must be 'C', 'F' or 'A'" ;
507
520
public static final String PATH_SHOULD_BE_STR_BYTES_PATHLIKE_NOT_P = "path should be string, bytes, or os.PathLike, not %p" ;
521
+ public static final String PACKED_IP_WRONG_LENGTH = "packed IP wrong length for %s" ;
522
+ public static final String PACKET_IP_WRONG_LENGTH_FOR = "packed IP wrong length for %s" ;
508
523
public static final String PATCHED_DATETIME_CLASS = "patched datetime class: %r" ;
509
524
public static final String POLYGLOT_ACCESS_NOT_ALLOWED = "polyglot access is not allowed" ;
510
525
public static final String POLYGLOT_EVAL_MUST_PASS_STRINGS = "polyglot.eval must pass strings as either 'path' or a 'string' keyword" ;
511
526
public static final String POLYGLOT_EVAL_WITH_STRING_MUST_PASS_LANG = "polyglot.eval with a string argument must pass a language or mime-type" ;
512
527
public static final String POP_FROM_EMPTY_SET = "pop from an emtpy set" ;
513
528
public static final String POP_INDEX_OUT_OF_RANGE = "pop index out of range" ;
529
+ public static final String PORT_PROTO_NOT_FOUND = "port/proto not found" ;
514
530
public static final String PRIVATE_IDENTIFIER_TOO_LARGE_TO_BE_MANGLED = "private identifier too large to be mangled" ;
515
531
public static final String PROVIDED_OBJ_NOT_ARRAY = "provided object is not an array" ;
516
532
public static final String PYTHON_INT_TOO_LARGE_TO_CONV_TO = "Python int too large to convert to %s" ;
@@ -529,6 +545,7 @@ public abstract class ErrorMessages {
529
545
public static final String S_FORMAT_INTEGER_IS_REQUIRED_NOT_S = "%%%s format: an integer is required, not %p" ;
530
546
public static final String C_ARG_NOT_IN_RANGE256_DECIMAL = "%%c arg not in range(256)" ;
531
547
public static final String C_REQUIRES_INT_IN_BYTE_RANGE_OR_SINGLE_BYTE = "%%c requires an integer in range(256) or a single byte" ;
548
+ public static final String REQUIRES_OBJ_THAT_IMPLEMENTS_S = " %%r requires an object that implements %s" ;
532
549
public static final String REQUIRES_STRING_AS_LEFT_OPERAND = "'in <string>' requires string as left operand, not %P" ;
533
550
public static final String REQUIRES_STR_OBJECT_BUT_RECEIVED_P = "'%s' requires a 'str' object but received a '%p'" ;
534
551
public static final String RETURN_OUTSIDE_FUNC = "'return' outside function" ;
@@ -608,6 +625,7 @@ public abstract class ErrorMessages {
608
625
public static final String TAKES_FROM_D_TO_D_POS_ARG_S_BUT_D_POS_ARG_S = "%s() takes from %d to %d positional argument%s but %d positional argument%s (and %d keyword-only argument%s) were given%s" ;
609
626
public static final String TAKES_FROM_D_TO_D_POS_ARG_S_BUT_D_S_GIVEN_S = "%s() takes from %d to %d positional argument%s but %d %s given%s" ;
610
627
public static final String TAKES_EXACTLY_D_ARGUMENTS_D_GIVEN = "%s() takes exactly %d arguments (%d given)" ;
628
+ public static final String TAKES_EXACTLY_S_ARGUMENTS_D_GIVEN = "%s() takes exactly %s arguments (%d given)" ;
611
629
public static final String TAKES_NO_KEYWORD_ARGS = "%s takes no keyword arguments" ;
612
630
public static final String THROW_THIRD_ARG_MUST_BE_TRACEBACK = "throw() third argument must be a traceback object" ;
613
631
public static final String TDATAOBJECT_SHOULD_NOT_HAVE_MORE_LINKS = "_tee_dataobject should not have more than %s links" ;
@@ -643,6 +661,7 @@ public abstract class ErrorMessages {
643
661
public static final String UNHASHABLE_TYPE_P = "unhashable type: '%p'" ;
644
662
public static final String UNHASHABLE_TYPE = "unhashable type" ;
645
663
public static final String UNINITIALIZED_S_OBJECT = "uninitialized classmethod object" ;
664
+ public static final String UNKNOWN_ADDR_FAMILY = "unknown address family %d" ;
646
665
public static final String UNKNOWN_ATTR = "Unknown attribute: '%s'" ;
647
666
public static final String UNKNOWN_ENCODING = "unknown encoding %s" ;
648
667
public static final String UNKNOWN_ERROR_HANDLER = "unknown error handler name '%s'" ;
@@ -669,6 +688,7 @@ public abstract class ErrorMessages {
669
688
public static final String UNSUPPORTED_USE_OF_SYS_EXECUTABLE = "internal error: unsupported use of sys.executable" ;
670
689
public static final String UTIME_CANNOT_USE_DIR_FD_AND_FOLLOW_SYMLINKS = "utime: cannot use dir_fd and follow_symlinks together on this platform" ;
671
690
public static final String VALUE_TOO_LARGE_TO_FIT_INTO_INDEX = "value too large to fit into index-sized integer" ;
691
+ public static final String WAS_NOT_POSSIBLE_TO_MARSHAL = "Was not possible to marshal" ;
672
692
public static final String WAS_NOT_POSSIBLE_TO_MARSHAL_P = "Was not possible to marshal %p" ;
673
693
public static final String WEAK_OBJ_GONE_AWAY = "weak object has gone away" ;
674
694
public static final String X_NOT_IN_LIST = "x not in list" ;
@@ -852,6 +872,7 @@ public abstract class ErrorMessages {
852
872
public static final String ILLEGAL_STATE_ARGUMENT = "illegal state argument" ;
853
873
public static final String STATE_ARGUMENT_MUST_BE_A_TUPLE = "state argument must be a tuple" ;
854
874
public static final String STATE_ARGUMENT_D_MUST_BE_A_S = "state argument %d must be a %s" ;
875
+ public static final String REENTRANT_CALL_INSIDE_S_REPR = "reentrant call inside %s.__repr__" ;
855
876
public static final String EXISTING_EXPORTS_OF_DATA_OBJECT_CANNOT_BE_RE_SIZED = "Existing exports of data: object cannot be re-sized" ;
856
877
public static final String SECOND_ITEM_OF_STATE_MUST_BE_AN_INTEGER_NOT_P = "second item of state must be an integer, not %p" ;
857
878
public static final String WRITE_COULD_NOT_COMPLETE_WITHOUT_BLOCKING = "write could not complete without blocking" ;
@@ -861,6 +882,7 @@ public abstract class ErrorMessages {
861
882
public static final String DEQUE_MUTATED_DURING_ITERATION = "deque mutated during iteration" ;
862
883
public static final String DEQUE_INDEX_OUT_OF_RANGE = "deque index out of range" ;
863
884
public static final String CAN_ONLY_CONCATENATE_DEQUE_NOT_P_TO_DEQUE = "can only concatenate deque (not \" %p\" ) to deque" ;
885
+ public static final String MULTI_PHASE_INIT_OF_EXTENSION_MODULE_S = "multi-phase init of extension module %s" ;
864
886
public static final String INIT_S_RETURNED_AN_UNEXPECTED_VALUE = "HPyInit_%s returned an unexpected value (expected a Python module)." ;
865
887
866
888
// ctypes
@@ -903,6 +925,7 @@ public abstract class ErrorMessages {
903
925
public static final String ARGUMENT_D = "argument %d: " ;
904
926
public static final String FFI_CALL_FAILED = "ffi_call failed" ;
905
927
public static final String FFI_PREP_CIF_FAILED = "ffi_prep_cif failed" ;
928
+ public static final String NO_FFI_TYPE_FOR_RESULT = "No ffi_type for result" ;
906
929
public static final String INT_TOO_LONG_TO_CONVERT = "int too long to convert" ;
907
930
public static final String CAST_ARGUMENT_2_MUST_BE_A_POINTER_TYPE_NOT_S = "cast() argument 2 must be a pointer type, not %s" ;
908
931
public static final String WRONG_TYPE = "wrong type" ;
@@ -921,6 +944,9 @@ public abstract class ErrorMessages {
921
944
public static final String OUT_PARAMETER_D_MUST_BE_A_POINTER_TYPE_NOT_S = "'out' parameter %d must be a pointer type, not %s" ;
922
945
public static final String ARGUMENT_MUST_BE_CALLABLE_OR_INTEGER_FUNCTION_ADDRESS = "argument must be callable or integer function address" ;
923
946
public static final String CANNOT_CONSTRUCT_INSTANCE_OF_THIS_CLASS_NO_ARGTYPES = "cannot construct instance of this class: no argtypes" ;
947
+ public static final String INVALID_RESULT_TYPE_FOR_CALLBACK_FUNCTION = "invalid result type for callback function" ;
948
+ public static final String FFI_PREP_CIF_FAILED_WITH_D = "ffi_prep_cif failed with %d" ;
949
+ public static final String FFI_PREP_CLOSURE_FAILED_WITH_D = "ffi_prep_closure failed with %d" ;
924
950
public static final String THE_ERRCHECK_ATTRIBUTE_MUST_BE_CALLABLE = "the errcheck attribute must be callable" ;
925
951
public static final String RESTYPE_MUST_BE_A_TYPE_A_CALLABLE_OR_NONE = "restype must be a type, a callable, or None" ;
926
952
public static final String THIS_FUNCTION_TAKES_AT_LEAST_D_ARGUMENT_S_D_GIVEN = "this function takes at least %d argument%s (%d given)" ;
0 commit comments