File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
- {"translation" : " 82.99 %" , "updated_at" : " 2025-04-17T08:19:13Z " }
1
+ {"translation" : " 83.00 %" , "updated_at" : " 2025-04-18T01:47:04Z " }
Original file line number Diff line number Diff line change @@ -3914,6 +3914,9 @@ msgid ""
3914
3914
"to determine if a module is a package or not is to use ``hasattr(module, "
3915
3915
"'__path__')`` (:issue:`18065`)."
3916
3916
msgstr ""
3917
+ "冻结的包将不再把 ``__path__`` 设为一个包含包名的列表,它们现在会把它设为一个空列表。 "
3918
+ "当存在与冻结的包同名的目录时之前版本的行为可能会使导入系统错误地处理子模块。 确定一个模块是否属于包的正确方式是使用 ``hasattr(module,"
3919
+ " '__path__')`` (:issue:`18065`)。"
3917
3920
3918
3921
#: ../../whatsnew/3.4.rst:2297
3919
3922
msgid ""
@@ -3933,6 +3936,8 @@ msgid ""
3933
3936
" a warning that import will overwrite those files with a regular file "
3934
3937
"regardless of what type of file path they were originally."
3935
3938
msgstr ""
3939
+ "现在 :func:`py_compile.compile` 在它要写入的文件路径是符号链接或非常规文件时会引发 "
3940
+ ":exc:`FileExistsError`。 这是为了提示导入系统将用一个常规文件覆盖相应文件而不管原始文件路径是什么类型而发出警告。"
3936
3941
3937
3942
#: ../../whatsnew/3.4.rst:2310
3938
3943
msgid ""
@@ -3945,6 +3950,10 @@ msgid ""
3945
3950
"before and wish to continue to ignore syntax or decoding issues, catch all "
3946
3951
"three exceptions now."
3947
3952
msgstr ""
3953
+ "当被加载的源代码触发了 :exc:`SyntaxError` 或 :exc:`UnicodeDecodeError` 时 "
3954
+ ":meth:`importlib.abc.SourceLoader.get_source` 将不再引发 :exc:`ImportError`。 因为 "
3955
+ ":exc:`ImportError` 本意只是在应该找到源代码但却找不到时被引发,而在源代码已找到但结构不正确时使用此异常会感觉有些过度/过载。 "
3956
+ "如果你在之前是捕获 ImportError 并希望继续忽略语法或解码问题,现在应当捕获所有这三个异常。"
3948
3957
3949
3958
#: ../../whatsnew/3.4.rst:2319
3950
3959
msgid ""
You can’t perform that action at this time.
0 commit comments