pyscriptc 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. pyscriptc/__init__.py +3 -0
  2. pyscriptc/__main__.py +3 -0
  3. pyscriptc/_posthog_token.py +1 -0
  4. pyscriptc/builtins.py +156 -0
  5. pyscriptc/canonical.py +167 -0
  6. pyscriptc/check.py +49 -0
  7. pyscriptc/cli.py +271 -0
  8. pyscriptc/coverage.py +388 -0
  9. pyscriptc/debug.py +120 -0
  10. pyscriptc/diagnostics.py +179 -0
  11. pyscriptc/errors.py +56 -0
  12. pyscriptc/ir.py +365 -0
  13. pyscriptc/llvm.py +2129 -0
  14. pyscriptc/log.py +127 -0
  15. pyscriptc/lower/__init__.py +1071 -0
  16. pyscriptc/lower/_calls.py +1499 -0
  17. pyscriptc/lower/_classes.py +969 -0
  18. pyscriptc/lower/_core.py +301 -0
  19. pyscriptc/lower/_expr.py +886 -0
  20. pyscriptc/lower/_stdlib.py +491 -0
  21. pyscriptc/lower/_stdlib_shared.py +93 -0
  22. pyscriptc/lower/_stmt.py +1173 -0
  23. pyscriptc/package.py +249 -0
  24. pyscriptc/restlower.py +1008 -0
  25. pyscriptc/runtime/ps_argv.c +28 -0
  26. pyscriptc/runtime/ps_b64.c +168 -0
  27. pyscriptc/runtime/ps_coll.c +133 -0
  28. pyscriptc/runtime/ps_dt.c +388 -0
  29. pyscriptc/runtime/ps_hash.c +411 -0
  30. pyscriptc/runtime/ps_help.c +219 -0
  31. pyscriptc/runtime/ps_hmac.c +120 -0
  32. pyscriptc/runtime/ps_io.c +198 -0
  33. pyscriptc/runtime/ps_island.c +272 -0
  34. pyscriptc/runtime/ps_json.c +402 -0
  35. pyscriptc/runtime/ps_mix.c +47 -0
  36. pyscriptc/runtime/ps_more.c +1089 -0
  37. pyscriptc/runtime/ps_osmore.c +447 -0
  38. pyscriptc/runtime/ps_path.c +547 -0
  39. pyscriptc/runtime/ps_re.c +1102 -0
  40. pyscriptc/runtime/ps_rt.c +1175 -0
  41. pyscriptc/runtime/ps_rt.h +189 -0
  42. pyscriptc/runtime/ps_struct.c +291 -0
  43. pyscriptc/runtime/ps_time.c +207 -0
  44. pyscriptc/runtime/ps_unicode.c +1521 -0
  45. pyscriptc/runtime/ps_url.c +327 -0
  46. pyscriptc/stdlib_queue.py +191 -0
  47. pyscriptc/stdmore.py +1596 -0
  48. pyscriptc/telemetry.py +219 -0
  49. pyscriptc-0.1.0.dist-info/METADATA +187 -0
  50. pyscriptc-0.1.0.dist-info/RECORD +54 -0
  51. pyscriptc-0.1.0.dist-info/WHEEL +5 -0
  52. pyscriptc-0.1.0.dist-info/entry_points.txt +2 -0
  53. pyscriptc-0.1.0.dist-info/licenses/LICENSE +201 -0
  54. pyscriptc-0.1.0.dist-info/top_level.txt +1 -0
pyscriptc/stdmore.py ADDED
@@ -0,0 +1,1596 @@
1
+ """Closed surface for the rest of the stdlib queue, paths, io, and the island.
2
+
3
+ Names that are not listed stay fences. Constants are read from the lowering
4
+ interpreter so a baked `sys.platform` matches the CPython oracle on this host.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import socket
10
+ import ssl
11
+ import stat
12
+ import sys
13
+ from typing import Any
14
+
15
+ _I: dict[str, Any] = {"kind": "int"}
16
+ _F: dict[str, Any] = {"kind": "float"}
17
+ _B: dict[str, Any] = {"kind": "bool"}
18
+ _S: dict[str, Any] = {"kind": "str"}
19
+ _BY: dict[str, Any] = {"kind": "bytes"}
20
+ _N: dict[str, Any] = {"kind": "none"}
21
+ _LS: dict[str, Any] = {"kind": "list", "elem": _S}
22
+ _DATE: dict[str, Any] = {"kind": "class", "name": "Date"}
23
+ _DT: dict[str, Any] = {"kind": "class", "name": "DateTime"}
24
+ _TOD: dict[str, Any] = {"kind": "class", "name": "Time"}
25
+ _DELTA: dict[str, Any] = {"kind": "class", "name": "TimeDelta"}
26
+ _STM: dict[str, Any] = {"kind": "class", "name": "StructTime"}
27
+ _PATH: dict[str, Any] = {"kind": "class", "name": "Path"}
28
+ _STAT: dict[str, Any] = {"kind": "class", "name": "Stat"}
29
+ _TEXT: dict[str, Any] = {"kind": "class", "name": "TextIO"}
30
+ _BIN: dict[str, Any] = {"kind": "class", "name": "BytesIO"}
31
+
32
+
33
+ def _sig(params: list[dict[str, Any]], ret: dict[str, Any], symbol: str) -> dict[str, Any]:
34
+ return {"params": params, "return": ret, "symbol": symbol}
35
+
36
+
37
+ _MISSING: Any = object()
38
+
39
+
40
+ def _host_attr(owner: Any, name: str) -> Any:
41
+ """`getattr(owner, name)`, or `_MISSING` when this host does not define it.
42
+
43
+ Many surface names are platform specific: EADV, CLONE_* and AF_CAN are Linux
44
+ only, and pathlib re-exports errno names on Linux but not on macOS. CPython
45
+ raises AttributeError for an absent name, so the table leaves it out instead
46
+ of failing the import on hosts that lack it.
47
+ """
48
+ return getattr(owner, name, _MISSING)
49
+
50
+
51
+ _ERRNO = (
52
+ "EACCES",
53
+ "EAGAIN",
54
+ "EBUSY",
55
+ "ECHILD",
56
+ "EEXIST",
57
+ "EINTR",
58
+ "EINVAL",
59
+ "EIO",
60
+ "EISDIR",
61
+ "ENOENT",
62
+ "ENOSPC",
63
+ "ENOTDIR",
64
+ "ENOTEMPTY",
65
+ "ENOTTY",
66
+ "EPERM",
67
+ "EPIPE",
68
+ "EROFS",
69
+ "ESRCH",
70
+ "EWOULDBLOCK",
71
+ "EXDEV",
72
+ )
73
+
74
+
75
+ # Harness probes whose body is `return module.NAME`, whose CPython value is an
76
+ # int that fits in signed 64-bit, on a module the 043 snapshot already marks
77
+ # lowered. Values are read from this interpreter in `_load_constants`.
78
+ _INT_SURFACE: dict[str, tuple[str, ...]] = {
79
+ "base64": (
80
+ "MAXBINSIZE",
81
+ "MAXLINESIZE",
82
+ ),
83
+ "ctypes": (
84
+ "DEFAULT_MODE",
85
+ "RTLD_GLOBAL",
86
+ "RTLD_LOCAL",
87
+ "SIZEOF_TIME_T",
88
+ ),
89
+ "datetime": (
90
+ "MAXYEAR",
91
+ "MINYEAR",
92
+ ),
93
+ "errno": (
94
+ "E2BIG",
95
+ "EADDRINUSE",
96
+ "EADDRNOTAVAIL",
97
+ "EADV",
98
+ "EAFNOSUPPORT",
99
+ "EALREADY",
100
+ "EBADE",
101
+ "EBADF",
102
+ "EBADFD",
103
+ "EBADMSG",
104
+ "EBADR",
105
+ "EBADRQC",
106
+ "EBADSLT",
107
+ "EBFONT",
108
+ "ECANCELED",
109
+ "ECHRNG",
110
+ "ECOMM",
111
+ "ECONNABORTED",
112
+ "ECONNREFUSED",
113
+ "ECONNRESET",
114
+ "EDEADLK",
115
+ "EDEADLOCK",
116
+ "EDESTADDRREQ",
117
+ "EDOM",
118
+ "EDOTDOT",
119
+ "EDQUOT",
120
+ "EFAULT",
121
+ "EFBIG",
122
+ "EHOSTDOWN",
123
+ "EHOSTUNREACH",
124
+ "EHWPOISON",
125
+ "EIDRM",
126
+ "EILSEQ",
127
+ "EINPROGRESS",
128
+ "EISCONN",
129
+ "EISNAM",
130
+ "EKEYEXPIRED",
131
+ "EKEYREJECTED",
132
+ "EKEYREVOKED",
133
+ "EL2HLT",
134
+ "EL2NSYNC",
135
+ "EL3HLT",
136
+ "EL3RST",
137
+ "ELIBACC",
138
+ "ELIBBAD",
139
+ "ELIBEXEC",
140
+ "ELIBMAX",
141
+ "ELIBSCN",
142
+ "ELNRNG",
143
+ "ELOOP",
144
+ "EMEDIUMTYPE",
145
+ "EMFILE",
146
+ "EMLINK",
147
+ "EMSGSIZE",
148
+ "EMULTIHOP",
149
+ "ENAMETOOLONG",
150
+ "ENAVAIL",
151
+ "ENETDOWN",
152
+ "ENETRESET",
153
+ "ENETUNREACH",
154
+ "ENFILE",
155
+ "ENOANO",
156
+ "ENOBUFS",
157
+ "ENOCSI",
158
+ "ENODATA",
159
+ "ENODEV",
160
+ "ENOEXEC",
161
+ "ENOKEY",
162
+ "ENOLCK",
163
+ "ENOLINK",
164
+ "ENOMEDIUM",
165
+ "ENOMEM",
166
+ "ENOMSG",
167
+ "ENONET",
168
+ "ENOPKG",
169
+ "ENOPROTOOPT",
170
+ "ENOSR",
171
+ "ENOSTR",
172
+ "ENOSYS",
173
+ "ENOTBLK",
174
+ "ENOTCONN",
175
+ "ENOTNAM",
176
+ "ENOTRECOVERABLE",
177
+ "ENOTSOCK",
178
+ "ENOTSUP",
179
+ "ENOTUNIQ",
180
+ "ENXIO",
181
+ "EOPNOTSUPP",
182
+ "EOVERFLOW",
183
+ "EOWNERDEAD",
184
+ "EPFNOSUPPORT",
185
+ "EPROTO",
186
+ "EPROTONOSUPPORT",
187
+ "EPROTOTYPE",
188
+ "ERANGE",
189
+ "EREMCHG",
190
+ "EREMOTE",
191
+ "EREMOTEIO",
192
+ "ERESTART",
193
+ "ERFKILL",
194
+ "ESHUTDOWN",
195
+ "ESOCKTNOSUPPORT",
196
+ "ESPIPE",
197
+ "ESRMNT",
198
+ "ESTALE",
199
+ "ESTRPIPE",
200
+ "ETIME",
201
+ "ETIMEDOUT",
202
+ "ETOOMANYREFS",
203
+ "ETXTBSY",
204
+ "EUCLEAN",
205
+ "EUNATCH",
206
+ "EUSERS",
207
+ "EXFULL",
208
+ ),
209
+ "inspect": (
210
+ "CO_ASYNC_GENERATOR",
211
+ "CO_COROUTINE",
212
+ "CO_GENERATOR",
213
+ "CO_HAS_DOCSTRING",
214
+ "CO_ITERABLE_COROUTINE",
215
+ "CO_METHOD",
216
+ "CO_NESTED",
217
+ "CO_NEWLOCALS",
218
+ "CO_NOFREE",
219
+ "CO_OPTIMIZED",
220
+ "CO_VARARGS",
221
+ "CO_VARKEYWORDS",
222
+ "TPFLAGS_IS_ABSTRACT",
223
+ ),
224
+ "io": (
225
+ "DEFAULT_BUFFER_SIZE",
226
+ "SEEK_CUR",
227
+ "SEEK_END",
228
+ "SEEK_SET",
229
+ ),
230
+ "logging": (
231
+ "CRITICAL",
232
+ "DEBUG",
233
+ "ERROR",
234
+ "FATAL",
235
+ "INFO",
236
+ "NOTSET",
237
+ "WARN",
238
+ "WARNING",
239
+ ),
240
+ "os": (
241
+ "CLD_CONTINUED",
242
+ "CLD_DUMPED",
243
+ "CLD_EXITED",
244
+ "CLD_KILLED",
245
+ "CLD_STOPPED",
246
+ "CLD_TRAPPED",
247
+ "CLONE_FILES",
248
+ "CLONE_FS",
249
+ "CLONE_NEWCGROUP",
250
+ "CLONE_NEWIPC",
251
+ "CLONE_NEWNET",
252
+ "CLONE_NEWNS",
253
+ "CLONE_NEWPID",
254
+ "CLONE_NEWTIME",
255
+ "CLONE_NEWUSER",
256
+ "CLONE_NEWUTS",
257
+ "CLONE_SIGHAND",
258
+ "CLONE_SYSVSEM",
259
+ "CLONE_THREAD",
260
+ "CLONE_VM",
261
+ "EFD_CLOEXEC",
262
+ "EFD_NONBLOCK",
263
+ "EFD_SEMAPHORE",
264
+ "EX_CANTCREAT",
265
+ "EX_CONFIG",
266
+ "EX_DATAERR",
267
+ "EX_IOERR",
268
+ "EX_NOHOST",
269
+ "EX_NOINPUT",
270
+ "EX_NOPERM",
271
+ "EX_NOUSER",
272
+ "EX_OK",
273
+ "EX_OSERR",
274
+ "EX_OSFILE",
275
+ "EX_PROTOCOL",
276
+ "EX_SOFTWARE",
277
+ "EX_TEMPFAIL",
278
+ "EX_UNAVAILABLE",
279
+ "EX_USAGE",
280
+ "F_LOCK",
281
+ "F_OK",
282
+ "F_TEST",
283
+ "F_TLOCK",
284
+ "F_ULOCK",
285
+ "GRND_NONBLOCK",
286
+ "GRND_RANDOM",
287
+ "MFD_ALLOW_SEALING",
288
+ "MFD_CLOEXEC",
289
+ "MFD_HUGETLB",
290
+ "MFD_HUGE_16GB",
291
+ "MFD_HUGE_16MB",
292
+ "MFD_HUGE_1GB",
293
+ "MFD_HUGE_1MB",
294
+ "MFD_HUGE_256MB",
295
+ "MFD_HUGE_2GB",
296
+ "MFD_HUGE_2MB",
297
+ "MFD_HUGE_32MB",
298
+ "MFD_HUGE_512KB",
299
+ "MFD_HUGE_512MB",
300
+ "MFD_HUGE_64KB",
301
+ "MFD_HUGE_8MB",
302
+ "MFD_HUGE_MASK",
303
+ "MFD_HUGE_SHIFT",
304
+ "NGROUPS_MAX",
305
+ "O_ACCMODE",
306
+ "O_APPEND",
307
+ "O_ASYNC",
308
+ "O_CLOEXEC",
309
+ "O_CREAT",
310
+ "O_DIRECT",
311
+ "O_DIRECTORY",
312
+ "O_DSYNC",
313
+ "O_EXCL",
314
+ "O_FSYNC",
315
+ "O_LARGEFILE",
316
+ "O_NDELAY",
317
+ "O_NOATIME",
318
+ "O_NOCTTY",
319
+ "O_NOFOLLOW",
320
+ "O_NONBLOCK",
321
+ "O_PATH",
322
+ "O_RDONLY",
323
+ "O_RDWR",
324
+ "O_RSYNC",
325
+ "O_SYNC",
326
+ "O_TMPFILE",
327
+ "O_TRUNC",
328
+ "O_WRONLY",
329
+ "POSIX_FADV_DONTNEED",
330
+ "POSIX_FADV_NOREUSE",
331
+ "POSIX_FADV_NORMAL",
332
+ "POSIX_FADV_RANDOM",
333
+ "POSIX_FADV_SEQUENTIAL",
334
+ "POSIX_FADV_WILLNEED",
335
+ "POSIX_SPAWN_CLOSE",
336
+ "POSIX_SPAWN_DUP2",
337
+ "POSIX_SPAWN_OPEN",
338
+ "PRIO_PGRP",
339
+ "PRIO_PROCESS",
340
+ "PRIO_USER",
341
+ "P_ALL",
342
+ "P_NOWAIT",
343
+ "P_NOWAITO",
344
+ "P_PGID",
345
+ "P_PID",
346
+ "P_PIDFD",
347
+ "P_WAIT",
348
+ "RTLD_DEEPBIND",
349
+ "RTLD_GLOBAL",
350
+ "RTLD_LAZY",
351
+ "RTLD_LOCAL",
352
+ "RTLD_NODELETE",
353
+ "RTLD_NOLOAD",
354
+ "RTLD_NOW",
355
+ "R_OK",
356
+ "SCHED_BATCH",
357
+ "SCHED_DEADLINE",
358
+ "SCHED_FIFO",
359
+ "SCHED_IDLE",
360
+ "SCHED_NORMAL",
361
+ "SCHED_OTHER",
362
+ "SCHED_RESET_ON_FORK",
363
+ "SCHED_RR",
364
+ "SEEK_CUR",
365
+ "SEEK_DATA",
366
+ "SEEK_END",
367
+ "SEEK_HOLE",
368
+ "SEEK_SET",
369
+ "SPLICE_F_MORE",
370
+ "SPLICE_F_MOVE",
371
+ "SPLICE_F_NONBLOCK",
372
+ "ST_APPEND",
373
+ "ST_MANDLOCK",
374
+ "ST_NOATIME",
375
+ "ST_NODEV",
376
+ "ST_NODIRATIME",
377
+ "ST_NOEXEC",
378
+ "ST_NOSUID",
379
+ "ST_RDONLY",
380
+ "ST_RELATIME",
381
+ "ST_SYNCHRONOUS",
382
+ "ST_WRITE",
383
+ "TFD_CLOEXEC",
384
+ "TFD_NONBLOCK",
385
+ "TFD_TIMER_ABSTIME",
386
+ "TMP_MAX",
387
+ "WCONTINUED",
388
+ "WEXITED",
389
+ "WNOHANG",
390
+ "WNOWAIT",
391
+ "WSTOPPED",
392
+ "WUNTRACED",
393
+ "W_OK",
394
+ "XATTR_CREATE",
395
+ "XATTR_REPLACE",
396
+ "XATTR_SIZE_MAX",
397
+ "X_OK",
398
+ ),
399
+ "pathlib": (
400
+ "E2BIG",
401
+ "EACCES",
402
+ "EADDRINUSE",
403
+ "EADDRNOTAVAIL",
404
+ "EADV",
405
+ "EAFNOSUPPORT",
406
+ "EAGAIN",
407
+ "EALREADY",
408
+ "EBADE",
409
+ "EBADF",
410
+ "EBADFD",
411
+ "EBADMSG",
412
+ "EBADR",
413
+ "EBADRQC",
414
+ "EBADSLT",
415
+ "EBFONT",
416
+ "EBUSY",
417
+ "ECANCELED",
418
+ "ECHILD",
419
+ "ECHRNG",
420
+ "ECOMM",
421
+ "ECONNABORTED",
422
+ "ECONNREFUSED",
423
+ "ECONNRESET",
424
+ "EDEADLK",
425
+ "EDEADLOCK",
426
+ "EDESTADDRREQ",
427
+ "EDOM",
428
+ "EDOTDOT",
429
+ "EDQUOT",
430
+ "EEXIST",
431
+ "EFAULT",
432
+ "EFBIG",
433
+ "EHOSTDOWN",
434
+ "EHOSTUNREACH",
435
+ "EHWPOISON",
436
+ "EIDRM",
437
+ "EILSEQ",
438
+ "EINPROGRESS",
439
+ "EINTR",
440
+ "EINVAL",
441
+ "EIO",
442
+ "EISCONN",
443
+ "EISDIR",
444
+ "EISNAM",
445
+ "EKEYEXPIRED",
446
+ "EKEYREJECTED",
447
+ "EKEYREVOKED",
448
+ "EL2HLT",
449
+ "EL2NSYNC",
450
+ "EL3HLT",
451
+ "EL3RST",
452
+ "ELIBACC",
453
+ "ELIBBAD",
454
+ "ELIBEXEC",
455
+ "ELIBMAX",
456
+ "ELIBSCN",
457
+ "ELNRNG",
458
+ "ELOOP",
459
+ "EMEDIUMTYPE",
460
+ "EMFILE",
461
+ "EMLINK",
462
+ "EMSGSIZE",
463
+ "EMULTIHOP",
464
+ "ENAMETOOLONG",
465
+ "ENAVAIL",
466
+ "ENETDOWN",
467
+ "ENETRESET",
468
+ "ENETUNREACH",
469
+ "ENFILE",
470
+ "ENOANO",
471
+ "ENOBUFS",
472
+ "ENOCSI",
473
+ "ENODATA",
474
+ "ENODEV",
475
+ "ENOENT",
476
+ "ENOEXEC",
477
+ "ENOKEY",
478
+ "ENOLCK",
479
+ "ENOLINK",
480
+ "ENOMEDIUM",
481
+ "ENOMEM",
482
+ "ENOMSG",
483
+ "ENONET",
484
+ "ENOPKG",
485
+ "ENOPROTOOPT",
486
+ "ENOSPC",
487
+ "ENOSR",
488
+ "ENOSTR",
489
+ "ENOSYS",
490
+ "ENOTBLK",
491
+ "ENOTCONN",
492
+ "ENOTDIR",
493
+ "ENOTEMPTY",
494
+ "ENOTNAM",
495
+ "ENOTRECOVERABLE",
496
+ "ENOTSOCK",
497
+ "ENOTSUP",
498
+ "ENOTTY",
499
+ "ENOTUNIQ",
500
+ "ENXIO",
501
+ "EOPNOTSUPP",
502
+ "EOVERFLOW",
503
+ "EOWNERDEAD",
504
+ "EPERM",
505
+ "EPFNOSUPPORT",
506
+ "EPIPE",
507
+ "EPROTO",
508
+ "EPROTONOSUPPORT",
509
+ "EPROTOTYPE",
510
+ "ERANGE",
511
+ "EREMCHG",
512
+ "EREMOTE",
513
+ "EREMOTEIO",
514
+ "ERESTART",
515
+ "ERFKILL",
516
+ "EROFS",
517
+ "ESHUTDOWN",
518
+ "ESOCKTNOSUPPORT",
519
+ "ESPIPE",
520
+ "ESRCH",
521
+ "ESRMNT",
522
+ "ESTALE",
523
+ "ESTRPIPE",
524
+ "ETIME",
525
+ "ETIMEDOUT",
526
+ "ETOOMANYREFS",
527
+ "ETXTBSY",
528
+ "EUCLEAN",
529
+ "EUNATCH",
530
+ "EUSERS",
531
+ "EWOULDBLOCK",
532
+ "EXDEV",
533
+ "EXFULL",
534
+ ),
535
+ "re": (
536
+ "I",
537
+ "IGNORECASE",
538
+ "L",
539
+ "LOCALE",
540
+ "M",
541
+ "MULTILINE",
542
+ "NOFLAG",
543
+ "S",
544
+ "U",
545
+ "UNICODE",
546
+ "VERBOSE",
547
+ "X",
548
+ ),
549
+ "shutil": ("COPY_BUFSIZE",),
550
+ "socket": (
551
+ "AF_ALG",
552
+ "AF_APPLETALK",
553
+ "AF_ASH",
554
+ "AF_ATMPVC",
555
+ "AF_ATMSVC",
556
+ "AF_AX25",
557
+ "AF_BRIDGE",
558
+ "AF_CAN",
559
+ "AF_DECnet",
560
+ "AF_ECONET",
561
+ "AF_IPX",
562
+ "AF_IRDA",
563
+ "AF_KEY",
564
+ "AF_LLC",
565
+ "AF_NETBEUI",
566
+ "AF_NETLINK",
567
+ "AF_NETROM",
568
+ "AF_PACKET",
569
+ "AF_PPPOX",
570
+ "AF_RDS",
571
+ "AF_ROSE",
572
+ "AF_ROUTE",
573
+ "AF_SECURITY",
574
+ "AF_SNA",
575
+ "AF_TIPC",
576
+ "AF_UNIX",
577
+ "AF_UNSPEC",
578
+ "AF_VSOCK",
579
+ "AF_WANPIPE",
580
+ "AF_X25",
581
+ "AI_ADDRCONFIG",
582
+ "AI_ALL",
583
+ "AI_CANONNAME",
584
+ "AI_NUMERICHOST",
585
+ "AI_NUMERICSERV",
586
+ "AI_PASSIVE",
587
+ "AI_V4MAPPED",
588
+ "ALG_OP_DECRYPT",
589
+ "ALG_OP_ENCRYPT",
590
+ "ALG_OP_SIGN",
591
+ "ALG_OP_VERIFY",
592
+ "ALG_SET_AEAD_ASSOCLEN",
593
+ "ALG_SET_AEAD_AUTHSIZE",
594
+ "ALG_SET_IV",
595
+ "ALG_SET_KEY",
596
+ "ALG_SET_OP",
597
+ "ALG_SET_PUBKEY",
598
+ "CAN_BCM",
599
+ "CAN_BCM_CAN_FD_FRAME",
600
+ "CAN_BCM_RX_ANNOUNCE_RESUME",
601
+ "CAN_BCM_RX_CHANGED",
602
+ "CAN_BCM_RX_CHECK_DLC",
603
+ "CAN_BCM_RX_DELETE",
604
+ "CAN_BCM_RX_FILTER_ID",
605
+ "CAN_BCM_RX_NO_AUTOTIMER",
606
+ "CAN_BCM_RX_READ",
607
+ "CAN_BCM_RX_RTR_FRAME",
608
+ "CAN_BCM_RX_SETUP",
609
+ "CAN_BCM_RX_STATUS",
610
+ "CAN_BCM_RX_TIMEOUT",
611
+ "CAN_BCM_SETTIMER",
612
+ "CAN_BCM_STARTTIMER",
613
+ "CAN_BCM_TX_ANNOUNCE",
614
+ "CAN_BCM_TX_COUNTEVT",
615
+ "CAN_BCM_TX_CP_CAN_ID",
616
+ "CAN_BCM_TX_DELETE",
617
+ "CAN_BCM_TX_EXPIRED",
618
+ "CAN_BCM_TX_READ",
619
+ "CAN_BCM_TX_RESET_MULTI_IDX",
620
+ "CAN_BCM_TX_SEND",
621
+ "CAN_BCM_TX_SETUP",
622
+ "CAN_BCM_TX_STATUS",
623
+ "CAN_EFF_FLAG",
624
+ "CAN_EFF_MASK",
625
+ "CAN_ERR_FLAG",
626
+ "CAN_ERR_MASK",
627
+ "CAN_ISOTP",
628
+ "CAN_J1939",
629
+ "CAN_RAW",
630
+ "CAN_RAW_ERR_FILTER",
631
+ "CAN_RAW_FD_FRAMES",
632
+ "CAN_RAW_FILTER",
633
+ "CAN_RAW_JOIN_FILTERS",
634
+ "CAN_RAW_LOOPBACK",
635
+ "CAN_RAW_RECV_OWN_MSGS",
636
+ "CAN_RTR_FLAG",
637
+ "CAN_SFF_MASK",
638
+ "EAGAIN",
639
+ "EAI_ADDRFAMILY",
640
+ "EAI_AGAIN",
641
+ "EAI_BADFLAGS",
642
+ "EAI_FAIL",
643
+ "EAI_FAMILY",
644
+ "EAI_MEMORY",
645
+ "EAI_NODATA",
646
+ "EAI_NONAME",
647
+ "EAI_OVERFLOW",
648
+ "EAI_SERVICE",
649
+ "EAI_SOCKTYPE",
650
+ "EAI_SYSTEM",
651
+ "EBADF",
652
+ "ETHERTYPE_ARP",
653
+ "ETHERTYPE_IP",
654
+ "ETHERTYPE_IPV6",
655
+ "ETHERTYPE_VLAN",
656
+ "ETH_P_ALL",
657
+ "EWOULDBLOCK",
658
+ "INADDR_ALLHOSTS_GROUP",
659
+ "INADDR_ANY",
660
+ "INADDR_BROADCAST",
661
+ "INADDR_LOOPBACK",
662
+ "INADDR_MAX_LOCAL_GROUP",
663
+ "INADDR_NONE",
664
+ "INADDR_UNSPEC_GROUP",
665
+ "IOCTL_VM_SOCKETS_GET_LOCAL_CID",
666
+ "IPPORT_RESERVED",
667
+ "IPPORT_USERRESERVED",
668
+ "IPPROTO_AH",
669
+ "IPPROTO_DSTOPTS",
670
+ "IPPROTO_EGP",
671
+ "IPPROTO_ESP",
672
+ "IPPROTO_FRAGMENT",
673
+ "IPPROTO_GRE",
674
+ "IPPROTO_HOPOPTS",
675
+ "IPPROTO_ICMP",
676
+ "IPPROTO_ICMPV6",
677
+ "IPPROTO_IDP",
678
+ "IPPROTO_IGMP",
679
+ "IPPROTO_IP",
680
+ "IPPROTO_IPIP",
681
+ "IPPROTO_IPV6",
682
+ "IPPROTO_NONE",
683
+ "IPPROTO_PIM",
684
+ "IPPROTO_PUP",
685
+ "IPPROTO_RAW",
686
+ "IPPROTO_ROUTING",
687
+ "IPPROTO_RSVP",
688
+ "IPPROTO_SCTP",
689
+ "IPPROTO_TCP",
690
+ "IPPROTO_TP",
691
+ "IPPROTO_UDP",
692
+ "IPPROTO_UDPLITE",
693
+ "IPV6_CHECKSUM",
694
+ "IPV6_DONTFRAG",
695
+ "IPV6_DSTOPTS",
696
+ "IPV6_HOPLIMIT",
697
+ "IPV6_HOPOPTS",
698
+ "IPV6_JOIN_GROUP",
699
+ "IPV6_LEAVE_GROUP",
700
+ "IPV6_MULTICAST_HOPS",
701
+ "IPV6_MULTICAST_IF",
702
+ "IPV6_MULTICAST_LOOP",
703
+ "IPV6_NEXTHOP",
704
+ "IPV6_PATHMTU",
705
+ "IPV6_PKTINFO",
706
+ "IPV6_RECVDSTOPTS",
707
+ "IPV6_RECVERR",
708
+ "IPV6_RECVHOPLIMIT",
709
+ "IPV6_RECVHOPOPTS",
710
+ "IPV6_RECVPATHMTU",
711
+ "IPV6_RECVPKTINFO",
712
+ "IPV6_RECVRTHDR",
713
+ "IPV6_RECVTCLASS",
714
+ "IPV6_RTHDR",
715
+ "IPV6_RTHDRDSTOPTS",
716
+ "IPV6_RTHDR_TYPE_0",
717
+ "IPV6_TCLASS",
718
+ "IPV6_UNICAST_HOPS",
719
+ "IPV6_V6ONLY",
720
+ "IP_ADD_MEMBERSHIP",
721
+ "IP_ADD_SOURCE_MEMBERSHIP",
722
+ "IP_BIND_ADDRESS_NO_PORT",
723
+ "IP_BLOCK_SOURCE",
724
+ "IP_DEFAULT_MULTICAST_LOOP",
725
+ "IP_DEFAULT_MULTICAST_TTL",
726
+ "IP_DROP_MEMBERSHIP",
727
+ "IP_DROP_SOURCE_MEMBERSHIP",
728
+ "IP_FREEBIND",
729
+ "IP_HDRINCL",
730
+ "IP_MAX_MEMBERSHIPS",
731
+ "IP_MULTICAST_IF",
732
+ "IP_MULTICAST_LOOP",
733
+ "IP_MULTICAST_TTL",
734
+ "IP_OPTIONS",
735
+ "IP_PKTINFO",
736
+ "IP_RECVERR",
737
+ "IP_RECVOPTS",
738
+ "IP_RECVORIGDSTADDR",
739
+ "IP_RECVRETOPTS",
740
+ "IP_RECVTOS",
741
+ "IP_RECVTTL",
742
+ "IP_RETOPTS",
743
+ "IP_TOS",
744
+ "IP_TRANSPARENT",
745
+ "IP_TTL",
746
+ "IP_UNBLOCK_SOURCE",
747
+ "J1939_EE_INFO_NONE",
748
+ "J1939_EE_INFO_TX_ABORT",
749
+ "J1939_FILTER_MAX",
750
+ "J1939_IDLE_ADDR",
751
+ "J1939_MAX_UNICAST_ADDR",
752
+ "J1939_NLA_BYTES_ACKED",
753
+ "J1939_NLA_PAD",
754
+ "J1939_NO_ADDR",
755
+ "J1939_NO_NAME",
756
+ "J1939_NO_PGN",
757
+ "J1939_PGN_ADDRESS_CLAIMED",
758
+ "J1939_PGN_ADDRESS_COMMANDED",
759
+ "J1939_PGN_MAX",
760
+ "J1939_PGN_PDU1_MAX",
761
+ "J1939_PGN_REQUEST",
762
+ "MSG_CMSG_CLOEXEC",
763
+ "MSG_CONFIRM",
764
+ "MSG_CTRUNC",
765
+ "MSG_DONTROUTE",
766
+ "MSG_DONTWAIT",
767
+ "MSG_EOR",
768
+ "MSG_ERRQUEUE",
769
+ "MSG_FASTOPEN",
770
+ "MSG_MORE",
771
+ "MSG_NOSIGNAL",
772
+ "MSG_OOB",
773
+ "MSG_PEEK",
774
+ "MSG_TRUNC",
775
+ "MSG_WAITALL",
776
+ "NETLINK_CRYPTO",
777
+ "NETLINK_DNRTMSG",
778
+ "NETLINK_FIREWALL",
779
+ "NETLINK_IP6_FW",
780
+ "NETLINK_NFLOG",
781
+ "NETLINK_ROUTE",
782
+ "NETLINK_USERSOCK",
783
+ "NETLINK_XFRM",
784
+ "NI_DGRAM",
785
+ "NI_IDN",
786
+ "NI_MAXHOST",
787
+ "NI_MAXSERV",
788
+ "NI_NAMEREQD",
789
+ "NI_NOFQDN",
790
+ "NI_NUMERICHOST",
791
+ "NI_NUMERICSERV",
792
+ "PACKET_BROADCAST",
793
+ "PACKET_FASTROUTE",
794
+ "PACKET_HOST",
795
+ "PACKET_LOOPBACK",
796
+ "PACKET_MULTICAST",
797
+ "PACKET_OTHERHOST",
798
+ "PACKET_OUTGOING",
799
+ "PF_CAN",
800
+ "PF_PACKET",
801
+ "PF_RDS",
802
+ "SCM_CREDENTIALS",
803
+ "SCM_J1939_DEST_ADDR",
804
+ "SCM_J1939_DEST_NAME",
805
+ "SCM_J1939_ERRQUEUE",
806
+ "SCM_J1939_PRIO",
807
+ "SCM_RIGHTS",
808
+ "SHUT_RD",
809
+ "SHUT_RDWR",
810
+ "SHUT_WR",
811
+ "SOCK_CLOEXEC",
812
+ "SOCK_NONBLOCK",
813
+ "SOCK_RAW",
814
+ "SOCK_RDM",
815
+ "SOCK_SEQPACKET",
816
+ "SOL_ALG",
817
+ "SOL_CAN_BASE",
818
+ "SOL_CAN_RAW",
819
+ "SOL_IP",
820
+ "SOL_SOCKET",
821
+ "SOL_TCP",
822
+ "SOL_TIPC",
823
+ "SOL_UDP",
824
+ "SOMAXCONN",
825
+ "SO_ACCEPTCONN",
826
+ "SO_BINDTODEVICE",
827
+ "SO_BINDTOIFINDEX",
828
+ "SO_BROADCAST",
829
+ "SO_DEBUG",
830
+ "SO_DOMAIN",
831
+ "SO_DONTROUTE",
832
+ "SO_ERROR",
833
+ "SO_INCOMING_CPU",
834
+ "SO_J1939_ERRQUEUE",
835
+ "SO_J1939_FILTER",
836
+ "SO_J1939_PROMISC",
837
+ "SO_J1939_SEND_PRIO",
838
+ "SO_KEEPALIVE",
839
+ "SO_LINGER",
840
+ "SO_MARK",
841
+ "SO_OOBINLINE",
842
+ "SO_ORIGINAL_DST",
843
+ "SO_PASSCRED",
844
+ "SO_PASSSEC",
845
+ "SO_PEERCRED",
846
+ "SO_PEERSEC",
847
+ "SO_PRIORITY",
848
+ "SO_PROTOCOL",
849
+ "SO_RCVBUF",
850
+ "SO_RCVLOWAT",
851
+ "SO_RCVTIMEO",
852
+ "SO_REUSEADDR",
853
+ "SO_REUSEPORT",
854
+ "SO_SNDBUF",
855
+ "SO_SNDLOWAT",
856
+ "SO_SNDTIMEO",
857
+ "SO_TYPE",
858
+ "SO_VM_SOCKETS_BUFFER_MAX_SIZE",
859
+ "SO_VM_SOCKETS_BUFFER_MIN_SIZE",
860
+ "SO_VM_SOCKETS_BUFFER_SIZE",
861
+ "TCP_CONGESTION",
862
+ "TCP_CORK",
863
+ "TCP_DEFER_ACCEPT",
864
+ "TCP_FASTOPEN",
865
+ "TCP_INFO",
866
+ "TCP_KEEPCNT",
867
+ "TCP_KEEPIDLE",
868
+ "TCP_KEEPINTVL",
869
+ "TCP_LINGER2",
870
+ "TCP_MAXSEG",
871
+ "TCP_MD5SIG",
872
+ "TCP_NODELAY",
873
+ "TCP_QUEUE_SEQ",
874
+ "TCP_QUICKACK",
875
+ "TCP_REPAIR",
876
+ "TCP_REPAIR_OPTIONS",
877
+ "TCP_REPAIR_QUEUE",
878
+ "TCP_SYNCNT",
879
+ "TCP_THIN_DUPACK",
880
+ "TCP_THIN_LINEAR_TIMEOUTS",
881
+ "TCP_TIMESTAMP",
882
+ "TCP_USER_TIMEOUT",
883
+ "TCP_WINDOW_CLAMP",
884
+ "TIPC_ADDR_ID",
885
+ "TIPC_ADDR_NAME",
886
+ "TIPC_ADDR_NAMESEQ",
887
+ "TIPC_CFG_SRV",
888
+ "TIPC_CLUSTER_SCOPE",
889
+ "TIPC_CONN_TIMEOUT",
890
+ "TIPC_CRITICAL_IMPORTANCE",
891
+ "TIPC_DEST_DROPPABLE",
892
+ "TIPC_HIGH_IMPORTANCE",
893
+ "TIPC_IMPORTANCE",
894
+ "TIPC_LOW_IMPORTANCE",
895
+ "TIPC_MEDIUM_IMPORTANCE",
896
+ "TIPC_NODE_SCOPE",
897
+ "TIPC_PUBLISHED",
898
+ "TIPC_SRC_DROPPABLE",
899
+ "TIPC_SUBSCR_TIMEOUT",
900
+ "TIPC_SUB_CANCEL",
901
+ "TIPC_SUB_PORTS",
902
+ "TIPC_SUB_SERVICE",
903
+ "TIPC_TOP_SRV",
904
+ "TIPC_WAIT_FOREVER",
905
+ "TIPC_WITHDRAWN",
906
+ "TIPC_ZONE_SCOPE",
907
+ "UDPLITE_RECV_CSCOV",
908
+ "UDPLITE_SEND_CSCOV",
909
+ "VMADDR_CID_ANY",
910
+ "VMADDR_CID_HOST",
911
+ "VMADDR_CID_LOCAL",
912
+ "VMADDR_PORT_ANY",
913
+ "VM_SOCKETS_INVALID_VERSION",
914
+ ),
915
+ "ssl": (
916
+ "ALERT_DESCRIPTION_ACCESS_DENIED",
917
+ "ALERT_DESCRIPTION_BAD_CERTIFICATE",
918
+ "ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE",
919
+ "ALERT_DESCRIPTION_BAD_CERTIFICATE_STATUS_RESPONSE",
920
+ "ALERT_DESCRIPTION_BAD_RECORD_MAC",
921
+ "ALERT_DESCRIPTION_CERTIFICATE_EXPIRED",
922
+ "ALERT_DESCRIPTION_CERTIFICATE_REVOKED",
923
+ "ALERT_DESCRIPTION_CERTIFICATE_UNKNOWN",
924
+ "ALERT_DESCRIPTION_CERTIFICATE_UNOBTAINABLE",
925
+ "ALERT_DESCRIPTION_CLOSE_NOTIFY",
926
+ "ALERT_DESCRIPTION_DECODE_ERROR",
927
+ "ALERT_DESCRIPTION_DECOMPRESSION_FAILURE",
928
+ "ALERT_DESCRIPTION_DECRYPT_ERROR",
929
+ "ALERT_DESCRIPTION_HANDSHAKE_FAILURE",
930
+ "ALERT_DESCRIPTION_ILLEGAL_PARAMETER",
931
+ "ALERT_DESCRIPTION_INSUFFICIENT_SECURITY",
932
+ "ALERT_DESCRIPTION_INTERNAL_ERROR",
933
+ "ALERT_DESCRIPTION_NO_RENEGOTIATION",
934
+ "ALERT_DESCRIPTION_PROTOCOL_VERSION",
935
+ "ALERT_DESCRIPTION_RECORD_OVERFLOW",
936
+ "ALERT_DESCRIPTION_UNEXPECTED_MESSAGE",
937
+ "ALERT_DESCRIPTION_UNKNOWN_CA",
938
+ "ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY",
939
+ "ALERT_DESCRIPTION_UNRECOGNIZED_NAME",
940
+ "ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE",
941
+ "ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION",
942
+ "ALERT_DESCRIPTION_USER_CANCELLED",
943
+ "CERT_NONE",
944
+ "CERT_OPTIONAL",
945
+ "CERT_REQUIRED",
946
+ "OPENSSL_VERSION_NUMBER",
947
+ "OP_ALL",
948
+ "OP_CIPHER_SERVER_PREFERENCE",
949
+ "OP_ENABLE_KTLS",
950
+ "OP_ENABLE_MIDDLEBOX_COMPAT",
951
+ "OP_IGNORE_UNEXPECTED_EOF",
952
+ "OP_LEGACY_SERVER_CONNECT",
953
+ "OP_NO_COMPRESSION",
954
+ "OP_NO_RENEGOTIATION",
955
+ "OP_NO_SSLv2",
956
+ "OP_NO_SSLv3",
957
+ "OP_NO_TICKET",
958
+ "OP_NO_TLSv1",
959
+ "OP_NO_TLSv1_1",
960
+ "OP_NO_TLSv1_2",
961
+ "OP_NO_TLSv1_3",
962
+ "OP_SINGLE_DH_USE",
963
+ "OP_SINGLE_ECDH_USE",
964
+ "PROTOCOL_SSLv23",
965
+ "PROTOCOL_TLS",
966
+ "PROTOCOL_TLS_CLIENT",
967
+ "PROTOCOL_TLS_SERVER",
968
+ "PROTOCOL_TLSv1",
969
+ "PROTOCOL_TLSv1_1",
970
+ "PROTOCOL_TLSv1_2",
971
+ "SOCK_STREAM",
972
+ "SOL_SOCKET",
973
+ "SO_TYPE",
974
+ "SSL_ERROR_EOF",
975
+ "SSL_ERROR_INVALID_ERROR_CODE",
976
+ "SSL_ERROR_SSL",
977
+ "SSL_ERROR_SYSCALL",
978
+ "SSL_ERROR_WANT_CONNECT",
979
+ "SSL_ERROR_WANT_READ",
980
+ "SSL_ERROR_WANT_WRITE",
981
+ "SSL_ERROR_WANT_X509_LOOKUP",
982
+ "SSL_ERROR_ZERO_RETURN",
983
+ "VERIFY_ALLOW_PROXY_CERTS",
984
+ "VERIFY_CRL_CHECK_CHAIN",
985
+ "VERIFY_CRL_CHECK_LEAF",
986
+ "VERIFY_DEFAULT",
987
+ "VERIFY_X509_PARTIAL_CHAIN",
988
+ "VERIFY_X509_STRICT",
989
+ "VERIFY_X509_TRUSTED_FIRST",
990
+ ),
991
+ "stat": (
992
+ "FILE_ATTRIBUTE_ARCHIVE",
993
+ "FILE_ATTRIBUTE_COMPRESSED",
994
+ "FILE_ATTRIBUTE_DEVICE",
995
+ "FILE_ATTRIBUTE_DIRECTORY",
996
+ "FILE_ATTRIBUTE_ENCRYPTED",
997
+ "FILE_ATTRIBUTE_HIDDEN",
998
+ "FILE_ATTRIBUTE_INTEGRITY_STREAM",
999
+ "FILE_ATTRIBUTE_NORMAL",
1000
+ "FILE_ATTRIBUTE_NOT_CONTENT_INDEXED",
1001
+ "FILE_ATTRIBUTE_NO_SCRUB_DATA",
1002
+ "FILE_ATTRIBUTE_OFFLINE",
1003
+ "FILE_ATTRIBUTE_READONLY",
1004
+ "FILE_ATTRIBUTE_REPARSE_POINT",
1005
+ "FILE_ATTRIBUTE_SPARSE_FILE",
1006
+ "FILE_ATTRIBUTE_SYSTEM",
1007
+ "FILE_ATTRIBUTE_TEMPORARY",
1008
+ "FILE_ATTRIBUTE_VIRTUAL",
1009
+ "SF_APPEND",
1010
+ "SF_ARCHIVED",
1011
+ "SF_DATALESS",
1012
+ "SF_FIRMLINK",
1013
+ "SF_IMMUTABLE",
1014
+ "SF_NOUNLINK",
1015
+ "SF_RESTRICTED",
1016
+ "SF_SETTABLE",
1017
+ "SF_SNAPSHOT",
1018
+ "ST_ATIME",
1019
+ "ST_CTIME",
1020
+ "ST_DEV",
1021
+ "ST_GID",
1022
+ "ST_INO",
1023
+ "ST_MODE",
1024
+ "ST_MTIME",
1025
+ "ST_NLINK",
1026
+ "ST_SIZE",
1027
+ "ST_UID",
1028
+ "S_ENFMT",
1029
+ "S_IEXEC",
1030
+ "S_IFBLK",
1031
+ "S_IFCHR",
1032
+ "S_IFDOOR",
1033
+ "S_IFIFO",
1034
+ "S_IFPORT",
1035
+ "S_IFSOCK",
1036
+ "S_IFWHT",
1037
+ "S_IREAD",
1038
+ "S_IRGRP",
1039
+ "S_IROTH",
1040
+ "S_IRWXG",
1041
+ "S_IRWXO",
1042
+ "S_IRWXU",
1043
+ "S_ISGID",
1044
+ "S_ISUID",
1045
+ "S_ISVTX",
1046
+ "S_IWGRP",
1047
+ "S_IWOTH",
1048
+ "S_IWRITE",
1049
+ "S_IWUSR",
1050
+ "S_IXGRP",
1051
+ "S_IXOTH",
1052
+ "S_IXUSR",
1053
+ "UF_APPEND",
1054
+ "UF_COMPRESSED",
1055
+ "UF_DATAVAULT",
1056
+ "UF_HIDDEN",
1057
+ "UF_IMMUTABLE",
1058
+ "UF_NODUMP",
1059
+ "UF_NOUNLINK",
1060
+ "UF_OPAQUE",
1061
+ "UF_SETTABLE",
1062
+ "UF_TRACKED",
1063
+ ),
1064
+ "subprocess": (
1065
+ "PIPE",
1066
+ "STDOUT",
1067
+ ),
1068
+ "sys": (
1069
+ "api_version",
1070
+ "hexversion",
1071
+ "maxunicode",
1072
+ ),
1073
+ "tempfile": ("TMP_MAX",),
1074
+ "time": (
1075
+ "CLOCK_BOOTTIME",
1076
+ "CLOCK_MONOTONIC",
1077
+ "CLOCK_MONOTONIC_RAW",
1078
+ "CLOCK_PROCESS_CPUTIME_ID",
1079
+ "CLOCK_REALTIME",
1080
+ "CLOCK_THREAD_CPUTIME_ID",
1081
+ "altzone",
1082
+ "daylight",
1083
+ "timezone",
1084
+ ),
1085
+ }
1086
+
1087
+
1088
+ # Harness str probes on modules the 044 snapshot already marks lowered.
1089
+ # The fold is len * 1000 + ord(first), or 0 when the string is empty.
1090
+ # Values are read from this interpreter. Code points above Latin-1 are omitted.
1091
+ _STR_SURFACE: dict[str, tuple[str, ...]] = {
1092
+ "asyncio": (
1093
+ "FIRST_COMPLETED",
1094
+ "FIRST_EXCEPTION",
1095
+ ),
1096
+ "inspect": (
1097
+ "AGEN_CREATED",
1098
+ "AGEN_RUNNING",
1099
+ "AGEN_SUSPENDED",
1100
+ "CORO_CLOSED",
1101
+ "CORO_CREATED",
1102
+ "CORO_RUNNING",
1103
+ "CORO_SUSPENDED",
1104
+ "GEN_CLOSED",
1105
+ "GEN_CREATED",
1106
+ "GEN_RUNNING",
1107
+ "GEN_SUSPENDED",
1108
+ ),
1109
+ "os": (
1110
+ "curdir",
1111
+ "defpath",
1112
+ "devnull",
1113
+ "extsep",
1114
+ "linesep",
1115
+ "name",
1116
+ "pardir",
1117
+ "pathsep",
1118
+ "sep",
1119
+ ),
1120
+ "posixpath": (
1121
+ "curdir",
1122
+ "defpath",
1123
+ "devnull",
1124
+ "extsep",
1125
+ "pardir",
1126
+ "pathsep",
1127
+ "sep",
1128
+ ),
1129
+ "ssl": (
1130
+ "PEM_FOOTER",
1131
+ "PEM_HEADER",
1132
+ ),
1133
+ "sys": (
1134
+ "abiflags",
1135
+ "base_exec_prefix",
1136
+ "base_prefix",
1137
+ "byteorder",
1138
+ "copyright",
1139
+ "exec_prefix",
1140
+ "float_repr_style",
1141
+ "platlibdir",
1142
+ "prefix",
1143
+ ),
1144
+ "tempfile": ("template",),
1145
+ }
1146
+
1147
+
1148
+ # Harness bool probes on modules the 045 snapshot already marks lowered.
1149
+ # The probe is `if module.NAME: return 1` else `return 0`.
1150
+ _BOOL_SURFACE: dict[str, tuple[str, ...]] = {
1151
+ "logging": (
1152
+ "logAsyncioTasks",
1153
+ "logMultiprocessing",
1154
+ "logProcesses",
1155
+ "logThreads",
1156
+ "raiseExceptions",
1157
+ ),
1158
+ "os": ("supports_bytes_environ",),
1159
+ "posixpath": ("supports_unicode_filenames",),
1160
+ "socket": ("has_ipv6",),
1161
+ "ssl": (
1162
+ "HAS_ALPN",
1163
+ "HAS_ECDH",
1164
+ "HAS_NEVER_CHECK_COMMON_NAME",
1165
+ "HAS_NPN",
1166
+ "HAS_PHA",
1167
+ "HAS_PSK",
1168
+ "HAS_SSLv2",
1169
+ "HAS_SSLv3",
1170
+ "HAS_TLSv1",
1171
+ "HAS_TLSv1_1",
1172
+ "HAS_TLSv1_2",
1173
+ "HAS_TLSv1_3",
1174
+ ),
1175
+ "sys": ("dont_write_bytecode",),
1176
+ }
1177
+
1178
+
1179
+ # Synthetic classes installed when their module is imported. TextIO and BytesIO
1180
+ # are installed for every module because builtin open returns them.
1181
+ ALWAYS_CLASSES: tuple[str, ...] = ("TextIO", "BytesIO")
1182
+
1183
+ MODULE_CLASSES: dict[str, tuple[str, ...]] = {
1184
+ "datetime": ("Date", "DateTime", "Time", "TimeDelta"),
1185
+ "time": ("StructTime",),
1186
+ "pathlib": ("Path",),
1187
+ "os": ("Stat",),
1188
+ "collections": ("Deque",),
1189
+ "hmac": ("Hmac",),
1190
+ "importlib.resources": ("Path",),
1191
+ }
1192
+
1193
+ CLASS_FIELDS: dict[str, list[dict[str, Any]]] = {
1194
+ "Date": [{"name": name, "type": _I} for name in ("year", "month", "day")],
1195
+ "DateTime": [
1196
+ {"name": name, "type": _I} for name in ("year", "month", "day", "hour", "minute", "second", "microsecond")
1197
+ ],
1198
+ "Time": [{"name": name, "type": _I} for name in ("hour", "minute", "second", "microsecond")],
1199
+ "TimeDelta": [{"name": name, "type": _I} for name in ("days", "seconds", "microseconds")],
1200
+ "StructTime": [
1201
+ {"name": name, "type": _I}
1202
+ for name in ("tm_year", "tm_mon", "tm_mday", "tm_hour", "tm_min", "tm_sec", "tm_wday", "tm_yday", "tm_isdst")
1203
+ ],
1204
+ "Path": [{"name": "_path", "type": _S}],
1205
+ "Stat": [
1206
+ {"name": "st_mode", "type": _I},
1207
+ {"name": "st_size", "type": _I},
1208
+ {"name": "st_mtime", "type": _F},
1209
+ ],
1210
+ "Deque": [],
1211
+ "TextIO": [],
1212
+ "BytesIO": [],
1213
+ "Hmac": [
1214
+ {"name": "_key", "type": _BY},
1215
+ {"name": "_msg", "type": _BY},
1216
+ {"name": "_alg", "type": _I},
1217
+ ],
1218
+ }
1219
+
1220
+ # i64 field packs compared lexicographically. Path compares its string.
1221
+ LEX_CLASSES = frozenset({"Date", "DateTime", "Time", "TimeDelta"})
1222
+ COMPARE_CLASSES = LEX_CLASSES | {"Path"}
1223
+
1224
+ TYPE_ALIAS: dict[tuple[str, str], str] = {
1225
+ ("datetime", "date"): "Date",
1226
+ ("datetime", "datetime"): "DateTime",
1227
+ ("datetime", "time"): "Time",
1228
+ ("datetime", "timedelta"): "TimeDelta",
1229
+ ("pathlib", "Path"): "Path",
1230
+ ("collections", "deque"): "Deque",
1231
+ ("io", "StringIO"): "TextIO",
1232
+ ("io", "BytesIO"): "BytesIO",
1233
+ ("time", "struct_time"): "StructTime",
1234
+ ("os", "stat_result"): "Stat",
1235
+ }
1236
+
1237
+ # Instance methods. `elem` means the deque's element type.
1238
+ CLASS_METHODS: dict[str, dict[str, dict[str, Any]]] = {
1239
+ "Date": {
1240
+ "isoformat": _sig([], _S, "ps_date_iso"),
1241
+ "toordinal": _sig([], _I, "ps_date_ord"),
1242
+ "weekday": _sig([], _I, "ps_date_weekday"),
1243
+ },
1244
+ "DateTime": {
1245
+ "isoformat": _sig([], _S, "ps_dt_iso"),
1246
+ "date": _sig([], _DATE, "ps_dt_date"),
1247
+ "time": _sig([], _TOD, "ps_dt_time"),
1248
+ },
1249
+ "Time": {"isoformat": _sig([], _S, "ps_tod_iso")},
1250
+ "TimeDelta": {"total_seconds": _sig([], _F, "ps_delta_total")},
1251
+ "Path": {
1252
+ "as_posix": _sig([], _S, "ps_path_posix"),
1253
+ "exists": _sig([], _B, "ps_path_exists_p"),
1254
+ "is_file": _sig([], _B, "ps_path_isfile_p"),
1255
+ "is_dir": _sig([], _B, "ps_path_isdir_p"),
1256
+ "read_text": _sig([], _S, "ps_path_read_text"),
1257
+ "read_bytes": _sig([], _BY, "ps_path_read_bytes"),
1258
+ "write_text": _sig([_S], _I, "ps_path_write_text"),
1259
+ "write_bytes": _sig([_BY], _I, "ps_path_write_bytes"),
1260
+ "joinpath": _sig([_S], _PATH, "ps_path_joinpath"),
1261
+ },
1262
+ "TextIO": {
1263
+ "read": _sig([], _S, "ps_io_read"),
1264
+ "write": _sig([_S], _I, "ps_io_write"),
1265
+ "close": _sig([], _N, "ps_io_close"),
1266
+ "getvalue": _sig([], _S, "ps_io_value"),
1267
+ },
1268
+ "BytesIO": {
1269
+ "read": _sig([], _BY, "ps_io_read"),
1270
+ "write": _sig([_BY], _I, "ps_io_write"),
1271
+ "close": _sig([], _N, "ps_io_close"),
1272
+ "getvalue": _sig([], _BY, "ps_io_value"),
1273
+ },
1274
+ "Deque": {
1275
+ "append": {"params": ["elem"], "return": _N, "symbol": "ps_deque_append"},
1276
+ "appendleft": {"params": ["elem"], "return": _N, "symbol": "ps_deque_appendleft"},
1277
+ "pop": {"params": [], "return": "elem", "symbol": "ps_deque_pop"},
1278
+ "popleft": {"params": [], "return": "elem", "symbol": "ps_deque_popleft"},
1279
+ },
1280
+ "Hmac": {"digest": _sig([], _BY, "ps_hmac_finish")},
1281
+ }
1282
+
1283
+ PATH_ATTRS: dict[str, tuple[dict[str, Any], str]] = {
1284
+ "name": (_S, "ps_path_name"),
1285
+ "suffix": (_S, "ps_path_suffix"),
1286
+ "stem": (_S, "ps_path_stem"),
1287
+ "parent": (_PATH, "ps_path_parent"),
1288
+ }
1289
+
1290
+ REST_FIXED: dict[str, dict[str, dict[str, Any]]] = {
1291
+ "datetime": {
1292
+ "date.today": _sig([], _DATE, "ps_date_today"),
1293
+ "date.fromisoformat": _sig([_S], _DATE, "ps_date_fromiso"),
1294
+ "date.fromordinal": _sig([_I], _DATE, "ps_date_fromord"),
1295
+ "datetime.now": _sig([], _DT, "ps_dt_now"),
1296
+ "datetime.fromisoformat": _sig([_S], _DT, "ps_dt_fromiso"),
1297
+ },
1298
+ "time": {
1299
+ "time": _sig([], _F, "ps_time_time"),
1300
+ "monotonic": _sig([], _F, "ps_time_monotonic"),
1301
+ "strftime": _sig([_S, _STM], _S, "ps_time_strftime"),
1302
+ "mktime": _sig([_STM], _F, "ps_time_mktime"),
1303
+ },
1304
+ "os": {
1305
+ "getcwd": _sig([], _S, "ps_os_getcwd"),
1306
+ "listdir": _sig([_S], _LS, "ps_os_listdir"),
1307
+ "getenv": _sig([_S], _S, "ps_os_getenv"),
1308
+ "remove": _sig([_S], _N, "ps_os_remove"),
1309
+ "rename": _sig([_S, _S], _N, "ps_os_rename"),
1310
+ "makedirs": _sig([_S], _N, "ps_os_makedirs"),
1311
+ "stat": _sig([_S], _STAT, "ps_os_stat"),
1312
+ },
1313
+ "posixpath": {
1314
+ "basename": _sig([_S], _S, "ps_path_base"),
1315
+ "dirname": _sig([_S], _S, "ps_path_dir"),
1316
+ "split": _sig([_S], _LS, "ps_path_split"),
1317
+ "splitext": _sig([_S], _LS, "ps_path_splitext"),
1318
+ "normpath": _sig([_S], _S, "ps_path_norm"),
1319
+ "isabs": _sig([_S], _B, "ps_path_isabs"),
1320
+ "abspath": _sig([_S], _S, "ps_path_abs"),
1321
+ "exists": _sig([_S], _B, "ps_path_exists"),
1322
+ "isfile": _sig([_S], _B, "ps_path_isfile"),
1323
+ "isdir": _sig([_S], _B, "ps_path_isdir"),
1324
+ },
1325
+ "stat": {
1326
+ "S_ISREG": _sig([_I], _B, "ps_stat_isreg"),
1327
+ "S_ISDIR": _sig([_I], _B, "ps_stat_isdir"),
1328
+ "S_ISLNK": _sig([_I], _B, "ps_stat_islnk"),
1329
+ },
1330
+ "fnmatch": {
1331
+ "fnmatch": _sig([_S, _S], _B, "ps_fnmatch"),
1332
+ "filter": _sig([_LS, _S], _LS, "ps_fnfilter"),
1333
+ },
1334
+ "warnings": {"warn": _sig([_S], _N, "ps_warn")},
1335
+ "inspect": {"cleandoc": _sig([_S], _S, "ps_island_cleandoc")},
1336
+ "logging": {
1337
+ "info": _sig([_S], _N, "ps_island_log_info"),
1338
+ "warning": _sig([_S], _N, "ps_island_log_warning"),
1339
+ },
1340
+ "socket": {"gethostname": _sig([], _S, "ps_island_hostname")},
1341
+ "threading": {"active_count": _sig([], _I, "ps_island_threads")},
1342
+ "subprocess": {"check_output": _sig([{"kind": "list", "elem": _S}], _BY, "ps_island_check_output")},
1343
+ "unicodedata": {
1344
+ "category": _sig([_S], _S, "ps_unicode_category"),
1345
+ "combining": _sig([_S], _I, "ps_unicode_combining"),
1346
+ "normalize": _sig([_S, _S], _S, "ps_unicode_normalize"),
1347
+ "is_normalized": _sig([_S, _S], _B, "ps_unicode_is_normalized"),
1348
+ "bidirectional": _sig([_S], _S, "ps_unicode_bidirectional"),
1349
+ "east_asian_width": _sig([_S], _S, "ps_unicode_east_asian_width"),
1350
+ "mirrored": _sig([_S], _B, "ps_unicode_mirrored"),
1351
+ "decimal": _sig([_S], _I, "ps_unicode_decimal"),
1352
+ "digit": _sig([_S], _I, "ps_unicode_digit"),
1353
+ "numeric": _sig([_S], _F, "ps_unicode_numeric"),
1354
+ "decomposition": _sig([_S], _S, "ps_unicode_decomposition"),
1355
+ "lookup": _sig([_S], _S, "ps_unicode_lookup"),
1356
+ },
1357
+ "tempfile": {
1358
+ "gettempdir": _sig([], _S, "ps_temp_getdir"),
1359
+ "gettempprefix": _sig([], _S, "ps_temp_prefix"),
1360
+ "mkdtemp": _sig([], _S, "ps_temp_mkdtemp"),
1361
+ },
1362
+ "shutil": {
1363
+ "copyfile": _sig([_S, _S], _S, "ps_shutil_copyfile"),
1364
+ "rmtree": _sig([_S], _N, "ps_shutil_rmtree"),
1365
+ },
1366
+ }
1367
+
1368
+ # Callable, but only in a particular statement shape.
1369
+ FOR_ONLY = frozenset({("itertools", "repeat"), ("itertools", "chain")})
1370
+ WITH_ONLY = frozenset({("contextlib", "suppress"), ("contextlib", "nullcontext"), ("importlib.resources", "as_file")})
1371
+
1372
+ CALL_FENCES: dict[tuple[str, str], str] = {
1373
+ ("importlib", "import_module"): "import_module returns a module",
1374
+ ("asyncio", "run"): "coroutines are not lowered",
1375
+ ("sys", "exit"): "",
1376
+ ("functools", "partial"): "functools.partial is not lowered",
1377
+ ("functools", "wraps"): "decorators are not lowered",
1378
+ ("functools", "lru_cache"): "decorators are not lowered",
1379
+ ("functools", "cmp_to_key"): "functools.cmp_to_key is not lowered",
1380
+ ("itertools", "count"): "infinite iterators are not lowered",
1381
+ ("itertools", "cycle"): "infinite iterators are not lowered",
1382
+ ("operator", "itemgetter"): "operator.itemgetter is not a value",
1383
+ ("operator", "attrgetter"): "operator.attrgetter is not a value",
1384
+ ("operator", "methodcaller"): "operator.methodcaller is not a value",
1385
+ ("contextlib", "contextmanager"): "decorators are not lowered",
1386
+ ("threading", "current_thread"): "threading.current_thread is only lowered for .name",
1387
+ }
1388
+
1389
+ OPERATORS = frozenset({"add", "sub", "mul", "floordiv", "neg", "eq", "ne", "lt", "le", "gt", "ge", "concat"})
1390
+
1391
+ CTYPES = frozenset({"c_char", "c_int", "c_long", "c_int64", "c_size_t", "c_void_p"})
1392
+
1393
+ REST_MODULES = frozenset(
1394
+ {
1395
+ "datetime",
1396
+ "time",
1397
+ "collections",
1398
+ "functools",
1399
+ "itertools",
1400
+ "operator",
1401
+ "contextlib",
1402
+ "os",
1403
+ "posixpath",
1404
+ "pathlib",
1405
+ "stat",
1406
+ "fnmatch",
1407
+ "warnings",
1408
+ "io",
1409
+ "sys",
1410
+ "importlib",
1411
+ "inspect",
1412
+ "threading",
1413
+ "logging",
1414
+ "asyncio",
1415
+ "subprocess",
1416
+ "socket",
1417
+ "ssl",
1418
+ "ctypes",
1419
+ "string",
1420
+ "bisect",
1421
+ "errno",
1422
+ "importlib.resources",
1423
+ "hmac",
1424
+ "unicodedata",
1425
+ "tempfile",
1426
+ "atexit",
1427
+ "shutil",
1428
+ }
1429
+ )
1430
+
1431
+
1432
+ def _ir_const(value: Any) -> tuple[Any, dict[str, Any]] | None:
1433
+ if isinstance(value, bool):
1434
+ return value, _B
1435
+ if isinstance(value, int):
1436
+ return str(int(value)), _I
1437
+ if isinstance(value, str):
1438
+ if any(ord(ch) > 127 for ch in value):
1439
+ return None
1440
+ return value, _S
1441
+ if isinstance(value, float):
1442
+ return repr(value), _F
1443
+ return None
1444
+
1445
+
1446
+ def _load_constants() -> tuple[dict[tuple[str, str], tuple[Any, dict[str, Any]]], dict[str, int]]:
1447
+ import asyncio
1448
+ import ctypes
1449
+ import errno
1450
+ import importlib
1451
+ import inspect
1452
+ import logging
1453
+ import re
1454
+ import string
1455
+ import subprocess
1456
+ import threading
1457
+ import unicodedata
1458
+ import warnings
1459
+
1460
+ raw: dict[tuple[str, str], Any] = {
1461
+ ("sys", "platform"): sys.platform,
1462
+ ("sys", "version"): sys.version,
1463
+ ("sys", "executable"): sys.executable,
1464
+ ("sys", "maxsize"): sys.maxsize,
1465
+ ("socket", "AF_INET"): int(socket.AF_INET),
1466
+ ("socket", "AF_INET6"): int(socket.AF_INET6),
1467
+ ("socket", "SOCK_STREAM"): int(socket.SOCK_STREAM),
1468
+ ("socket", "SOCK_DGRAM"): int(socket.SOCK_DGRAM),
1469
+ ("ssl", "OPENSSL_VERSION"): ssl.OPENSSL_VERSION,
1470
+ ("ssl", "HAS_SNI"): bool(ssl.HAS_SNI),
1471
+ ("stat", "S_IFREG"): int(stat.S_IFREG),
1472
+ ("stat", "S_IFDIR"): int(stat.S_IFDIR),
1473
+ ("stat", "S_IFLNK"): int(stat.S_IFLNK),
1474
+ ("stat", "S_IRUSR"): int(stat.S_IRUSR),
1475
+ ("string", "ascii_lowercase"): string.ascii_lowercase,
1476
+ ("string", "ascii_uppercase"): string.ascii_uppercase,
1477
+ ("string", "ascii_letters"): string.ascii_letters,
1478
+ ("string", "digits"): string.digits,
1479
+ ("string", "hexdigits"): string.hexdigits,
1480
+ ("string", "octdigits"): string.octdigits,
1481
+ ("string", "punctuation"): string.punctuation,
1482
+ ("string", "whitespace"): string.whitespace,
1483
+ ("string", "printable"): string.printable,
1484
+ ("unicodedata", "unidata_version"): unicodedata.unidata_version,
1485
+ ("re", "A"): int(re.A),
1486
+ ("re", "ASCII"): int(re.ASCII),
1487
+ ("re", "DEBUG"): int(re.DEBUG),
1488
+ ("re", "DOTALL"): int(re.DOTALL),
1489
+ ("warnings", "defaultaction"): warnings.defaultaction,
1490
+ ("threading", "TIMEOUT_MAX"): threading.TIMEOUT_MAX,
1491
+ ("logging", "BASIC_FORMAT"): logging.BASIC_FORMAT,
1492
+ ("asyncio", "ALL_COMPLETED"): asyncio.ALL_COMPLETED,
1493
+ ("subprocess", "DEVNULL"): int(subprocess.DEVNULL),
1494
+ }
1495
+ agen_closed = _host_attr(inspect, "AGEN_CLOSED")
1496
+ if agen_closed is not _MISSING:
1497
+ raw[("inspect", "AGEN_CLOSED")] = agen_closed
1498
+ for name in _ERRNO:
1499
+ value = _host_attr(errno, name)
1500
+ if value is not _MISSING:
1501
+ raw[("errno", name)] = int(value)
1502
+ for module, names in _INT_SURFACE.items():
1503
+ mod = importlib.import_module(module)
1504
+ for name in names:
1505
+ value = _host_attr(mod, name)
1506
+ if value is not _MISSING:
1507
+ raw[(module, name)] = int(value)
1508
+ for module, names in _STR_SURFACE.items():
1509
+ mod = importlib.import_module(module)
1510
+ for name in names:
1511
+ value = _host_attr(mod, name)
1512
+ if value is not _MISSING:
1513
+ raw[(module, name)] = value
1514
+ for module, names in _BOOL_SURFACE.items():
1515
+ mod = importlib.import_module(module)
1516
+ for name in names:
1517
+ value = _host_attr(mod, name)
1518
+ if value is not _MISSING:
1519
+ raw[(module, name)] = bool(value)
1520
+ found: dict[tuple[str, str], tuple[Any, dict[str, Any]]] = {}
1521
+ for key, value in raw.items():
1522
+ shaped = _ir_const(value)
1523
+ if shaped is not None:
1524
+ found[key] = shaped
1525
+ sizeof: dict[str, int] = {}
1526
+ for name in CTYPES:
1527
+ sizeof[name] = ctypes.sizeof(getattr(ctypes, name))
1528
+ return found, sizeof
1529
+
1530
+
1531
+ CONSTANTS, SIZEOF = _load_constants()
1532
+
1533
+
1534
+ def module_constant(module: str, member: str) -> tuple[Any, dict[str, Any]] | None:
1535
+ return CONSTANTS.get((module, member))
1536
+
1537
+
1538
+ def fixed_spec(module: str, member: str) -> dict[str, Any] | None:
1539
+ return REST_FIXED.get(module, {}).get(member)
1540
+
1541
+
1542
+ def type_alias(module: str, member: str) -> str | None:
1543
+ return TYPE_ALIAS.get((module, member))
1544
+
1545
+
1546
+ def slot_size(typ: dict[str, Any]) -> int:
1547
+ kind = typ["kind"]
1548
+ if kind in {"int", "float", "list", "dict", "class"}:
1549
+ return 8
1550
+ if kind in {"str", "bytes"}:
1551
+ return 16
1552
+ raise ValueError(f"no slot size for {kind}")
1553
+
1554
+
1555
+ def member_callable(module: str, member: str) -> bool:
1556
+ if fixed_spec(module, member) is not None:
1557
+ return True
1558
+ if type_alias(module, member) is not None:
1559
+ return True
1560
+ if (module, member) in FOR_ONLY or (module, member) in WITH_ONLY:
1561
+ return True
1562
+ if (module, member) in CALL_FENCES:
1563
+ return True
1564
+ if module == "operator" and member in OPERATORS:
1565
+ return True
1566
+ if module == "ctypes" and member in {"sizeof", *CTYPES}:
1567
+ return True
1568
+ if module == "datetime" and member in {"date", "datetime", "time", "timedelta"}:
1569
+ return True
1570
+ if module == "time" and member in {"sleep", "gmtime", "localtime"}:
1571
+ return True
1572
+ if module == "collections" and member in {"deque", "OrderedDict"}:
1573
+ return True
1574
+ if module == "functools" and member == "reduce":
1575
+ return True
1576
+ if module == "posixpath" and member == "join":
1577
+ return True
1578
+ if module == "pathlib" and member == "Path":
1579
+ return True
1580
+ if module == "io" and member in {"StringIO", "BytesIO"}:
1581
+ return True
1582
+ if module == "bisect" and member in {"bisect_left", "bisect_right"}:
1583
+ return True
1584
+ if module == "hmac" and member in {"new", "digest", "compare_digest"}:
1585
+ return True
1586
+ if module == "unicodedata" and member == "name":
1587
+ return True
1588
+ if module == "importlib.resources" and member == "files":
1589
+ return True
1590
+ if module == "atexit" and member == "register":
1591
+ return True
1592
+ if module == "enum" and member in {"Enum", "IntEnum"}:
1593
+ return True
1594
+ if module == "dataclasses" and member == "dataclass":
1595
+ return True
1596
+ return False