Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spurious diff if the cases generator is run on Windows #108319

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

AlexWaygood
Copy link
Member

I noticed this while testing #108112 -- if I run python Tools/cases_generator/generate_cases.py locally on my Windows machine currently, it produces this spurious diff:

diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h
index e35db0c4c5..4879ab1c46 100644
--- a/Include/internal/pycore_opcode_metadata.h
+++ b/Include/internal/pycore_opcode_metadata.h
@@ -1,6 +1,6 @@
 // This file is generated by Tools/cases_generator/generate_cases.py
 // from:
-//   Python/bytecodes.c
+//   Python\bytecodes.c
 // Do not edit!
 
 #ifndef Py_BUILD_CORE
diff --git a/Include/opcode_ids.h b/Include/opcode_ids.h
index cd43716415..b91d8217d6 100644
--- a/Include/opcode_ids.h
+++ b/Include/opcode_ids.h
@@ -1,6 +1,6 @@
 // This file is generated by Tools/cases_generator/generate_cases.py
 // from:
-//   Python/bytecodes.c
+//   Python\bytecodes.c
 // Do not edit!
 
 #ifndef Py_OPCODE_IDS_H
diff --git a/Lib/_opcode_metadata.py b/Lib/_opcode_metadata.py
index b02aa771c3..d053765655 100644
--- a/Lib/_opcode_metadata.py
+++ b/Lib/_opcode_metadata.py
@@ -1,6 +1,6 @@
 # This file is generated by Tools/cases_generator/generate_cases.py
 # from:
-#   Python/bytecodes.c
+#   Python\bytecodes.c
 # Do not edit!
 
 _specializations = {
diff --git a/Python/abstract_interp_cases.c.h b/Python/abstract_interp_cases.c.h
index 1b99b929fa..34153df3d2 100644
--- a/Python/abstract_interp_cases.c.h
+++ b/Python/abstract_interp_cases.c.h
@@ -1,6 +1,6 @@
 // This file is generated by Tools/cases_generator/generate_cases.py
 // from:
-//   Python/bytecodes.c
+//   Python\bytecodes.c
 // Do not edit!
 
         case NOP: {
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 89a5bbfecd..401e6ea4dc 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -1,6 +1,6 @@
 // This file is generated by Tools/cases_generator/generate_cases.py
 // from:
-//   Python/bytecodes.c
+//   Python\bytecodes.c
 // Do not edit!
 
         case NOP: {
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index f6322df566..48d1039495 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -1,6 +1,6 @@
 // This file is generated by Tools/cases_generator/generate_cases.py
 // from:
-//   Python/bytecodes.c
+//   Python\bytecodes.c
 // Do not edit!
 
         TARGET(NOP) {

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, perfect fix! I think we dropped this when some of that code was cleaned up. :-(

@bedevere-bot
Copy link

There's a new commit after the PR has been approved.

@gvanrossum: please review the changes made to this pull request.

@AlexWaygood AlexWaygood deleted the cases-generator-windows branch August 22, 2023 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants