Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f689492

Browse files
committed
Because MWH changed the bytecode again, moved the magic number *back*
to 62011. This should get the snake-farm to throw away its old .pyc files, amongst others.
1 parent b2d2bc9 commit f689492

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Python/import.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *);
5252
MWH, 2002-08-03: Removed SET_LINENO. Couldn't be bothered figuring
5353
out the MAGIC schemes, so just incremented it by 10.
5454
55+
GvR, 2002-08-31: Because MWH changed the bytecode again, moved the
56+
magic number *back* to 62011. This should get the snake-farm to
57+
throw away its old .pyc files, amongst others.
58+
5559
Known values:
5660
Python 1.5: 20121
5761
Python 1.5.1: 20121
@@ -64,8 +68,9 @@ extern time_t PyOS_GetLastModificationTime(char *, FILE *);
6468
Python 2.2: 60717
6569
Python 2.3a0: 62011
6670
Python 2.3a0: 62021
71+
Python 2.3a0: 62011 (!)
6772
*/
68-
#define MAGIC (62021 | ((long)'\r'<<16) | ((long)'\n'<<24))
73+
#define MAGIC (62011 | ((long)'\r'<<16) | ((long)'\n'<<24))
6974

7075
/* Magic word as global; note that _PyImport_Init() can change the
7176
value of this global to accommodate for alterations of how the

0 commit comments

Comments
 (0)