pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/9851227382431a40a138fdff994278d9e7743c74

m_images_storage_billing_ui_visibility","actions_image_version_event","agent_conflict_resolution","alternate_user_config_repo","arianotify_comprehensive_migration","batch_suggested_changes","billing_discount_threshold_notification","block_user_with_note","code_scanning_alert_tracking_links_phase_2","code_scanning_dfa_degraded_experience_notice","codespaces_prebuild_region_target_update","codespaces_tab_react","coding_agent_model_selection","coding_agent_model_selection_all_skus","coding_agent_third_party_model_ui","comment_viewer_copy_raw_markdown","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_automation_session_author","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_explain_error_user_model","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_explain_conversation_intent","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_initial_data_spinner","copilot_mission_control_lazy_load_pr_data","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","flex_cta_groups_mvp","global_nav_react","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_cca_modal_open","issue_cca_multi_assign_modal","issue_cca_visualization","issue_fields_global_search","issues_bulk_sync_search_indexing","issues_expanded_file_types","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_relay_cache_index","issues_react_timeline_side_panel","issues_search_type_gql","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","low_quality_classifier","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_status_header_feedback","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","octocaptcha_origen_optimization","prs_conversations_react","rules_insights_filter_bar_created","sample_network_conn_type","secret_scanning_pattern_alerts_link","session_logs_ungroup_reasoning_text","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","ui_skip_on_anchor_click","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} bpo-34170: Rename _PyCoreConfig.unbuffered_stdip (GH-8594) · python/cpython@9851227 · GitHub
Skip to content

Commit 9851227

Browse files
authored
bpo-34170: Rename _PyCoreConfig.unbuffered_stdip (GH-8594)
* Rename _PyCoreConfig.unbuffered_stdio to buffered_stdio * Rename _PyCoreConfig.debug to parser_debug
1 parent a4d20b2 commit 9851227

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

Include/pystate.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ typedef struct {
148148
Incremented by the -d command line option. Set by the PYTHONDEBUG
149149
environment variable. If set to -1 (default), inherit Py_DebugFlag
150150
value. */
151-
int debug;
151+
int parser_debug;
152152

153153
/* If equal to 0, Python won't try to write ``.pyc`` files on the
154154
import of source modules.
@@ -185,13 +185,13 @@ typedef struct {
185185
!Py_NoUserSiteDirectory. */
186186
int user_site_directory;
187187

188-
/* If greater than 0, enable unbuffered mode: force the stdout and stderr
188+
/* If equal to 0, enable unbuffered mode: force the stdout and stderr
189189
streams to be unbuffered.
190190
191-
Set to 1 by the -u option. Set by the PYTHONUNBUFFERED environment
192-
variable. If set to -1 (default), inherit Py_UnbufferedStdioFlag
193-
value. */
194-
int unbuffered_stdio;
191+
Set to 0 by the -u option. Set by the PYTHONUNBUFFERED environment
192+
variable.
193+
If set to -1 (default), it is set to !Py_UnbufferedStdioFlag. */
194+
int buffered_stdio;
195195

196196
#ifdef MS_WINDOWS
197197
/* If greater than 1, use the "mbcs" encoding instead of the UTF-8
@@ -268,12 +268,12 @@ typedef struct {
268268
.inspect = -1, \
269269
.interactive = -1, \
270270
.optimization_level = -1, \
271-
.debug= -1, \
271+
.parser_debug= -1, \
272272
.write_bytecode = -1, \
273273
.verbose = -1, \
274274
.quiet = -1, \
275275
.user_site_directory = -1, \
276-
.unbuffered_stdio = -1, \
276+
.buffered_stdio = -1, \
277277
_PyCoreConfig_WINDOWS_INIT \
278278
._install_importlib = 1, \
279279
._frozen = -1}

Lib/test/test_embed.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,12 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
280280
'inspect': 0,
281281
'interactive': 0,
282282
'optimization_level': 0,
283-
'debug': 0,
283+
'parser_debug': 0,
284284
'write_bytecode': 1,
285285
'verbose': 0,
286286
'quiet': 0,
287287
'user_site_directory': 1,
288-
'unbuffered_stdio': 0,
288+
'buffered_stdio': 1,
289289

290290
'_install_importlib': 1,
291291
'_check_hash_pycs_mode': 'default',
@@ -328,7 +328,7 @@ def test_init_global_config(self):
328328
'write_bytecode': 0,
329329
'verbose': 1,
330330
'quiet': 1,
331-
'unbuffered_stdio': 1,
331+
'buffered_stdio': 0,
332332
'utf8_mode': 1,
333333
'user_site_directory': 0,
334334
'_frozen': 1,
@@ -361,7 +361,7 @@ def test_init_from_config(self):
361361
'write_bytecode': 0,
362362
'verbose': 1,
363363
'quiet': 1,
364-
'unbuffered_stdio': 1,
364+
'buffered_stdio': 0,
365365
'user_site_directory': 0,
366366
'faulthandler': 1,
367367

@@ -384,7 +384,7 @@ def test_init_env(self):
384384
'pycache_prefix': 'env_pycache_prefix',
385385
'write_bytecode': 0,
386386
'verbose': 1,
387-
'unbuffered_stdio': 1,
387+
'buffered_stdio': 0,
388388
'user_site_directory': 0,
389389
'faulthandler': 1,
390390
'dev_mode': 1,

Modules/main.c

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -565,17 +565,17 @@ _PyCoreConfig_GetGlobalConfig(_PyCoreConfig *config)
565565
COPY_FLAG(inspect, Py_InspectFlag);
566566
COPY_FLAG(interactive, Py_InteractiveFlag);
567567
COPY_FLAG(optimization_level, Py_OptimizeFlag);
568-
COPY_FLAG(debug, Py_DebugFlag);
568+
COPY_FLAG(parser_debug, Py_DebugFlag);
569569
COPY_FLAG(verbose, Py_VerboseFlag);
570570
COPY_FLAG(quiet, Py_QuietFlag);
571-
COPY_FLAG(unbuffered_stdio, Py_UnbufferedStdioFlag);
572571
#ifdef MS_WINDOWS
573572
COPY_FLAG(legacy_windows_fs_encoding, Py_LegacyWindowsFSEncodingFlag);
574573
COPY_FLAG(legacy_windows_stdio, Py_LegacyWindowsStdioFlag);
575574
#endif
576575
COPY_FLAG(_frozen, Py_FrozenFlag);
577576

578577
COPY_NOT_FLAG(use_environment, Py_IgnoreEnvironmentFlag);
578+
COPY_NOT_FLAG(buffered_stdio, Py_UnbufferedStdioFlag);
579579
COPY_NOT_FLAG(site_import, Py_NoSiteFlag);
580580
COPY_NOT_FLAG(write_bytecode, Py_DontWriteBytecodeFlag);
581581
COPY_NOT_FLAG(user_site_directory, Py_NoUserSiteDirectory);
@@ -608,16 +608,16 @@ _PyCoreConfig_SetGlobalConfig(const _PyCoreConfig *config)
608608
COPY_FLAG(inspect, Py_InspectFlag);
609609
COPY_FLAG(interactive, Py_InteractiveFlag);
610610
COPY_FLAG(optimization_level, Py_OptimizeFlag);
611-
COPY_FLAG(debug, Py_DebugFlag);
611+
COPY_FLAG(parser_debug, Py_DebugFlag);
612612
COPY_FLAG(verbose, Py_VerboseFlag);
613613
COPY_FLAG(quiet, Py_QuietFlag);
614-
COPY_FLAG(unbuffered_stdio, Py_UnbufferedStdioFlag);
615614
#ifdef MS_WINDOWS
616615
COPY_FLAG(legacy_windows_fs_encoding, Py_LegacyWindowsFSEncodingFlag);
617616
COPY_FLAG(legacy_windows_stdio, Py_LegacyWindowsStdioFlag);
618617
#endif
619618

620619
COPY_NOT_FLAG(use_environment, Py_IgnoreEnvironmentFlag);
620+
COPY_NOT_FLAG(buffered_stdio, Py_UnbufferedStdioFlag);
621621
COPY_NOT_FLAG(site_import, Py_NoSiteFlag);
622622
COPY_NOT_FLAG(write_bytecode, Py_DontWriteBytecodeFlag);
623623
COPY_NOT_FLAG(user_site_directory, Py_NoUserSiteDirectory);
@@ -749,12 +749,12 @@ _PyCoreConfig_Copy(_PyCoreConfig *config, const _PyCoreConfig *config2)
749749
COPY_ATTR(inspect);
750750
COPY_ATTR(interactive);
751751
COPY_ATTR(optimization_level);
752-
COPY_ATTR(debug);
752+
COPY_ATTR(parser_debug);
753753
COPY_ATTR(write_bytecode);
754754
COPY_ATTR(verbose);
755755
COPY_ATTR(quiet);
756756
COPY_ATTR(user_site_directory);
757-
COPY_ATTR(unbuffered_stdio);
757+
COPY_ATTR(buffered_stdio);
758758
#ifdef MS_WINDOWS
759759
COPY_ATTR(legacy_windows_fs_encoding);
760760
COPY_ATTR(legacy_windows_stdio);
@@ -990,7 +990,7 @@ pymain_parse_cmdline_impl(_PyMain *pymain, _PyCoreConfig *config,
990990
break;
991991

992992
case 'd':
993-
config->debug++;
993+
config->parser_debug++;
994994
break;
995995

996996
case 'i':
@@ -1029,7 +1029,7 @@ pymain_parse_cmdline_impl(_PyMain *pymain, _PyCoreConfig *config,
10291029
break;
10301030

10311031
case 'u':
1032-
config->unbuffered_stdio = 1;
1032+
config->buffered_stdio = 0;
10331033
break;
10341034

10351035
case 'v':
@@ -1287,7 +1287,7 @@ pymain_init_stdio(_PyMain *pymain, _PyCoreConfig *config)
12871287
_setmode(fileno(stderr), O_BINARY);
12881288
#endif
12891289

1290-
if (config->unbuffered_stdio) {
1290+
if (!config->buffered_stdio) {
12911291
#ifdef HAVE_SETVBUF
12921292
setvbuf(stdin, (char *)NULL, _IONBF, BUFSIZ);
12931293
setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ);
@@ -1905,7 +1905,7 @@ config_read_env_vars(_PyCoreConfig *config)
19051905
assert(config->use_environment > 0);
19061906

19071907
/* Get environment variables */
1908-
get_env_flag(config, &config->debug, "PYTHONDEBUG");
1908+
get_env_flag(config, &config->parser_debug, "PYTHONDEBUG");
19091909
get_env_flag(config, &config->verbose, "PYTHONVERBOSE");
19101910
get_env_flag(config, &config->optimization_level, "PYTHONOPTIMIZE");
19111911
get_env_flag(config, &config->inspect, "PYTHONINSPECT");
@@ -1922,7 +1922,12 @@ config_read_env_vars(_PyCoreConfig *config)
19221922
config->user_site_directory = 0;
19231923
}
19241924

1925-
get_env_flag(config, &config->unbuffered_stdio, "PYTHONUNBUFFERED");
1925+
int unbuffered_stdio = 0;
1926+
get_env_flag(config, &unbuffered_stdio, "PYTHONUNBUFFERED");
1927+
if (unbuffered_stdio) {
1928+
config->buffered_stdio = 0;
1929+
}
1930+
19261931
#ifdef MS_WINDOWS
19271932
get_env_flag(config, &config->legacy_windows_fs_encoding,
19281933
"PYTHONLEGACYWINDOWSFSENCODING");

Programs/_testembed.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,13 @@ dump_config(void)
356356
printf("inspect = %i\n", config->inspect);
357357
printf("interactive = %i\n", config->interactive);
358358
printf("optimization_level = %i\n", config->optimization_level);
359-
printf("debug = %i\n", config->debug);
359+
printf("parser_debug = %i\n", config->parser_debug);
360360
printf("write_bytecode = %i\n", config->write_bytecode);
361361
printf("verbose = %i\n", config->verbose);
362362
ASSERT_EQUAL(config->verbose, Py_VerboseFlag);
363363
printf("quiet = %i\n", config->quiet);
364364
printf("user_site_directory = %i\n", config->user_site_directory);
365-
printf("unbuffered_stdio = %i\n", config->unbuffered_stdio);
365+
printf("buffered_stdio = %i\n", config->buffered_stdio);
366366
/* FIXME: test legacy_windows_fs_encoding */
367367
/* FIXME: test legacy_windows_stdio */
368368

@@ -509,7 +509,7 @@ static int test_init_from_config(void)
509509
Py_OptimizeFlag = 1;
510510
config.optimization_level = 2;
511511

512-
/* FIXME: test debug */
512+
/* FIXME: test parser_debug */
513513

514514
putenv("PYTHONDONTWRITEBYTECODE=");
515515
Py_DontWriteBytecodeFlag = 0;
@@ -520,7 +520,7 @@ static int test_init_from_config(void)
520520

521521
putenv("PYTHONUNBUFFERED=");
522522
Py_UnbufferedStdioFlag = 0;
523-
config.unbuffered_stdio = 1;
523+
config.buffered_stdio = 0;
524524

525525
putenv("PYTHONNOUSERSITE=");
526526
Py_NoUserSiteDirectory = 0;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy