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

Skip to content

Commit 8203b80

Browse files
authored
Merge branch '3.13' into cron/sync/3.13
2 parents 66f8df1 + 1a480de commit 8203b80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+454
-447
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ jobs:
1616
- name: Install Dependencies
1717
run: sudo apt-get install gettext
1818

19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
21+
1922
- name: Validate
2023
run: VERSION=${{ github.event.repository.default_branch }} JOBS=4 MODE=html make all

.github/workflows/deploy-gh-page.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
- name: Install Dependencies
1515
run: sudo apt-get install gettext
1616

17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v5
19+
1720
- name: Build
1821
run: JOBS=4 MODE=html make all
1922

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@ prepare_cpython: ## Prepare CPython clone at `../cpython/`.
8989

9090

9191
$(VENV)/bin/activate:
92-
python3 -m venv $(VENV)
92+
uv venv $(VENV)
9393

9494
$(VENV)/bin/sphinx-build: $(VENV)/bin/activate
95-
. $(VENV)/bin/activate; python3 -m pip install sphinx python-docs-theme
95+
. $(VENV)/bin/activate; uv pip install sphinx python-docs-theme
9696

9797
$(VENV)/bin/sphinx-lint: $(VENV)/bin/activate
98-
. $(VENV)/bin/activate; python3 -m pip install sphinx-lint
98+
. $(VENV)/bin/activate; uv pip install sphinx-lint
9999

100100
$(VENV)/bin/blurb: $(VENV)/bin/activate
101-
. $(VENV)/bin/activate; python3 -m pip install blurb
101+
. $(VENV)/bin/activate; uv pip install blurb
102102

103103

104104
.PHONY: upgrade_venv
105105
upgrade_venv: $(VENV)/bin/activate ## Upgrade the venv that compiles the doc
106-
@. $(VENV)/bin/activate; python3 -m pip install -q --upgrade sphinx python-docs-theme blurb sphinx-lint
106+
@. $(VENV)/bin/activate; uv pip install -q --upgrade sphinx python-docs-theme blurb sphinx-lint
107107

108108

109109
.PHONY: progress

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ the PSF for inclusion in the documentation.
8484
- `安裝好 git <https://help.github.com/articles/set-up-git/>`_\ (Windows
8585
上請參考 https://gitforwindows.org/)
8686
- 一個 ``.po`` 檔的編輯器。推薦使用 `Poedit <https://poedit.net>`_,若熟悉 po 檔用一般文字編輯器亦可。
87+
- 參考 `uv Installation <https://docs.astral.sh/uv/getting-started/installation/>`_ 安裝 uv,以便在本機端預覽翻譯成果。
8788
- macOS 的使用者還需要先利用 `homebrew <https://brew.sh/index_zh-tw>`_ 安裝 gettext,屆時 Sphinx 會使用到。
8889

8990
.. code-block:: bash
@@ -232,7 +233,7 @@ the PSF for inclusion in the documentation.
232233
其中最簡單的貢獻方式就是更新 *fuzzy entries*,讓曾經翻譯的內容保持與最新版本的文件
233234
同步。請參考\ `尋找有翻譯過但需校閱的 fuzzy entries`_ 段落。
234235

235-
此外,當前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
236+
此外,目前的目標為完成 **Tutorial** 的翻譯,因此在 ``tutorial/`` 底下的所有
236237
po 檔皆為首要的翻譯對象。你也可以幫忙校對已經翻譯過的內容。
237238

238239

c-api/cell.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ msgid ""
8989
"reference to any current content of the cell. *value* may be ``NULL``. "
9090
"*cell* must be non-``NULL``."
9191
msgstr ""
92-
"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件當前內容的參"
92+
"將 cell 物件 *cell* 的內容設為 *value*。這將釋放任何對 cell 物件目前內容的參"
9393
"照。*value* 可以為 ``NULL``。*cell* 必須不為 ``NULL``。"
9494

9595
#: ../../c-api/cell.rst:58

c-api/codec.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ msgstr "編解碼器註冊表和支援函式"
2424

2525
#: ../../c-api/codec.rst:8
2626
msgid "Register a new codec search function."
27-
msgstr "註冊一個新的編解碼器搜索函式。"
27+
msgstr "註冊一個新的編解碼器搜尋函式。"
2828

2929
#: ../../c-api/codec.rst:10
3030
msgid ""
3131
"As side effect, this tries to load the :mod:`!encodings` package, if not yet "
3232
"done, to make sure that it is always first in the list of search functions."
3333
msgstr ""
3434
"作為副作用 (side effect),這會嘗試載入 :mod:`!encodings`\\ (如果尚未完成),"
35-
"以確保它始終位於搜索函式列表中的第一個。"
35+
"以確保它始終位於搜尋函式列表中的第一個。"
3636

3737
#: ../../c-api/codec.rst:15
3838
msgid ""
3939
"Unregister a codec search function and clear the registry's cache. If the "
4040
"search function is not registered, do nothing. Return 0 on success. Raise an "
4141
"exception and return -1 on error."
4242
msgstr ""
43-
"取消註冊編解碼器搜索函式並清除註冊表 (registry) 的快取。如果搜索函式並未被註"
43+
"取消註冊編解碼器搜尋函式並清除註冊表 (registry) 的快取。如果搜尋函式並未被註"
4444
"冊,則不執行任何操作。成功回傳 0,發生錯誤時會引發例外並回傳 -1。"
4545

4646
#: ../../c-api/codec.rst:23

c-api/datetime.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ msgid ""
3838
msgstr ""
3939
":mod:`datetime` 模組提供各種日期和時間物件。在使用任何這些函式之前,必須將標"
4040
"頭檔 :file:`datetime.h` 引入於原始碼中(請注意,:file:`Python.h` 並無引入該標"
41-
"頭檔),且巨集 :c:macro:`!PyDateTime_IMPORT` 必須被調用,而這通常作為模組初始"
41+
"頭檔),且巨集 :c:macro:`!PyDateTime_IMPORT` 必須被叫用,而這通常作為模組初始"
4242
"化函式的一部分。該巨集將指向 C 結構的指標放入靜態變數 :c:data:`!"
4343
"PyDateTimeAPI` 中,該變數會被以下巨集使用。"
4444

c-api/file.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ msgid ""
3838
msgstr ""
3939
"這些 API 是用於內建檔案物件的 Python 2 C API 的最小模擬 (minimal emulation),"
4040
"它過去依賴於 C 標準函式庫對於緩衝 I/O (:c:expr:`FILE*`) 的支援。在 Python 3 "
41-
"中,檔案和串流使用新的 :mod:`io` 模組,它在操作系統的低階無緩衝 I/O 上定義了"
41+
"中,檔案和串流使用新的 :mod:`io` 模組,它在作業系統的低階無緩衝 I/O 上定義了"
4242
"多個層級。下面描述的函式是這些新 API 的便捷 C 包裝器,主要用於直譯器中的內部"
4343
"錯誤報告;建議第三方程式碼改為存取 :mod:`io` API。"
4444

@@ -55,15 +55,15 @@ msgstr ""
5555
"從已打開檔案 *fd* 的檔案描述器建立一個 Python 檔案物件。引數 *name*、"
5656
"*encoding*、*errors* 和 *newline* 可以為 ``NULL`` 以使用預設值; *buffering* "
5757
"可以是 *-1* 以使用預設值。 *name* 被忽略並保留以實作向後相容性。失敗時回傳 "
58-
"``NULL``。有關引數的更全面描述,請參閱 :func:`io.open` 函式文檔。"
58+
"``NULL``。有關引數的更全面描述,請參閱 :func:`io.open` 函式文件。"
5959

6060
#: ../../c-api/file.rst:31
6161
msgid ""
6262
"Since Python streams have their own buffering layer, mixing them with OS-"
6363
"level file descriptors can produce various issues (such as unexpected "
6464
"ordering of data)."
6565
msgstr ""
66-
"由於 Python 串流有自己的緩衝層,將它們與操作系統層級檔案描述器混合使用會產生"
66+
"由於 Python 串流有自己的緩衝層,將它們與作業系統層級檔案描述器混合使用會產生"
6767
"各種問題(例如資料的排序不符合預期)。"
6868

6969
#: ../../c-api/file.rst:35

c-api/intro.po

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ msgid ""
179179
"option:`prefix <--prefix>` include the platform specific headers from :"
180180
"option:`exec_prefix <--exec-prefix>`."
181181
msgstr ""
182-
"要引入標頭,請將兩個(如果不同)目錄放在編譯器的引入搜索路徑 (search path) "
183-
"中。*不要*\\ 將父目錄放在搜索路徑上,然後使用 ``#include <pythonX.Y/Python."
182+
"要引入標頭,請將兩個(如果不同)目錄放在編譯器的引入搜尋路徑 (search path) "
183+
"中。*不要*\\ 將父目錄放在搜尋路徑上,然後使用 ``#include <pythonX.Y/Python."
184184
"h>``;這會在多平台建置上壞掉,因為 :option:`prefix <--prefix>` 下獨立於平台的"
185185
"標頭包括來自 :option:`exec_prefix <--exec-prefix>` 的平台特定標頭。"
186186

@@ -600,7 +600,7 @@ msgid ""
600600
msgstr ""
601601
"然而,一個常見的陷阱是從一個 list 中提取一個物件並保留它一段時間而不取得其參"
602602
"照。某些其他操作可能會從列表中刪除該物件,減少其參照計數並可能取消分配它。真"
603-
"正的危險是看似無害的操作可能會呼叫可以執行此操作的任意 Python 程式碼;有一個"
603+
"正的危險是看似無害的操作可能會叫用可以執行此操作的任意 Python 程式碼;有一個"
604604
"程式碼路徑允許控制權從 :c:func:`Py_DECREF` 回歸使用者,因此幾乎任何操作都有潛"
605605
"在危險。"
606606

@@ -702,7 +702,7 @@ msgid ""
702702
msgstr ""
703703
"這裡 :c:func:`PyLong_FromLong` 會回傳一個新的參照,它立即被 :c:func:"
704704
"`PyTuple_SetItem` 竊取。如果你想繼續使用一個物件,儘管對它的參照將被竊取,請"
705-
"在呼叫參照竊取函式之前使用 :c:func:`Py_INCREF` 來獲取另一個參照。"
705+
"在呼叫參照竊取函式之前使用 :c:func:`Py_INCREF` 來取得另一個參照。"
706706

707707
#: ../../c-api/intro.rst:427
708708
msgid ""
@@ -839,7 +839,7 @@ msgstr ""
839839
"重要的是要意識到你是否擁有一個函式回傳的參照只取決於你呼叫哪個函式 --- *羽毛 "
840840
"(plumage)*(作為引數傳遞給函式的物件之型別)\\ *不會進入它!*\\ 因此,如果你"
841841
"使用 :c:func:`PyList_GetItem` 從 list 中提取一個項目,你不會擁有其參照 --- 但"
842-
"如果你使用 :c:func:`PySequence_GetItem` 從同一 list 中獲取相同的項目(且恰好"
842+
"如果你使用 :c:func:`PySequence_GetItem` 從同一 list 中取得相同的項目(且恰好"
843843
"使用完全相同的引數),你確實會擁有對回傳物件的參照。"
844844

845845
#: ../../c-api/intro.rst:497
@@ -1189,8 +1189,8 @@ msgid ""
11891189
msgstr ""
11901190
"在大多數系統上(特別是在 Unix 和 Windows 上,儘管細節略有不同),:c:func:"
11911191
"`Py_Initialize` 會假設Python 函式庫相對於 Python 直譯器可執行檔案的位置固定,"
1192-
"並根據其對標準 Python 直譯器可執行檔案位置的最佳猜測來計算模組搜索路徑。或者"
1193-
"更詳細地說,它會在 shell 命令搜索路徑(環境變數 :envvar:`PATH`)中找到名為 :"
1192+
"並根據其對標準 Python 直譯器可執行檔案位置的最佳猜測來計算模組搜尋路徑。或者"
1193+
"更詳細地說,它會在 shell 命令搜尋路徑(環境變數 :envvar:`PATH`)中找到名為 :"
11941194
"file:`python` 的可執行檔案,並在其父目錄中查找一個名為 :file:`lib/python{X.Y}"
11951195
"` 的目錄的相對位置。"
11961196

@@ -1223,7 +1223,7 @@ msgid ""
12231223
"func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)."
12241224
msgstr ""
12251225
"嵌入的應用程式可以透過在呼叫 :c:func:`Py_Initialize` *之前*\\ 呼叫 "
1226-
"``Py_SetProgramName(file)`` 來引導搜索。請注意 :envvar:`PYTHONHOME` 仍然覆蓋"
1226+
"``Py_SetProgramName(file)`` 來引導搜尋。請注意 :envvar:`PYTHONHOME` 仍然覆蓋"
12271227
"它並且 :envvar:`PYTHONPATH` 仍然插入在標準路徑的前面。需要完全控制權的應用程"
12281228
"式必須實作自己的 :c:func:`Py_GetPath`、:c:func:`Py_GetPrefix`、:c:func:"
12291229
"`Py_GetExecPrefix` 和 :c:func:`Py_GetProgramFullPath`\\(全部定義在 :file:"
@@ -1245,7 +1245,7 @@ msgstr ""
12451245
"有時會希望能夠「取消初始化 (uninitialize)」Python。例如,應用程式可能想要重新"
12461246
"開始(再次呼叫 :c:func:`Py_Initialize`)或者應用程式簡單地完成了對 Python 的"
12471247
"使用並想要釋放 Python 分配的記憶體。這可以透過呼叫 :c:func:`Py_FinalizeEx` 來"
1248-
"完成。如果 Python 當前處於初始化狀態,函式 :c:func:`Py_IsInitialized` 會回傳 "
1248+
"完成。如果 Python 目前處於初始化狀態,函式 :c:func:`Py_IsInitialized` 會回傳 "
12491249
"true。有關這些功能的更多資訊將在後面的章節中給出。請注意 :c:func:"
12501250
"`Py_FinalizeEx` *不會*\\ 釋放由 Python 直譯器分配的所有記憶體,例如目前無法釋"
12511251
"放被擴充模組所分配的記憶體。"
@@ -1309,7 +1309,7 @@ msgid ""
13091309
"well. Upon exit, all existing references are printed. (In interactive mode "
13101310
"this happens after every statement run by the interpreter.)"
13111311
msgstr ""
1312-
"定義 :c:macro:`Py_TRACE_REFS` 來啟用參照追蹤(參見\\ :option:`調用 --with-"
1312+
"定義 :c:macro:`Py_TRACE_REFS` 來啟用參照追蹤(參見\\ :option:`設定 --with-"
13131313
"trace-refs 選項 <--with-trace-refs>`)。當有定義時,透過向每個 :c:type:"
13141314
"`PyObject` 新增兩個額外欄位來維護有效物件的循環雙向鍊表 (circular doubly "
13151315
"linked list)。全體分配也有被追蹤。退出時將印出所有現行參照。(在交互模式下,"

c-api/long.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,11 @@ msgstr "object(物件)"
640640

641641
#: ../../c-api/long.rst:8
642642
msgid "long integer"
643-
msgstr "long integer(長整数)"
643+
msgstr "long integer(長整數)"
644644

645645
#: ../../c-api/long.rst:8
646646
msgid "integer"
647-
msgstr "integer(整数)"
647+
msgstr "integer(整數)"
648648

649649
#: ../../c-api/long.rst:144
650650
msgid "LONG_MAX (C macro)"
@@ -653,7 +653,7 @@ msgstr "LONG_MAX(C 巨集)"
653653
#: ../../c-api/long.rst:144 ../../c-api/long.rst:204 ../../c-api/long.rst:247
654654
#: ../../c-api/long.rst:262 ../../c-api/long.rst:278 ../../c-api/long.rst:294
655655
msgid "OverflowError (built-in exception)"
656-
msgstr "OverflowError(内建例外)"
656+
msgstr "OverflowError(內建例外)"
657657

658658
#: ../../c-api/long.rst:247
659659
msgid "PY_SSIZE_T_MAX (C macro)"

c-api/perfmaps.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ msgid ""
7575
"information about the cause of a failure."
7676
msgstr ""
7777
"建立/打開 perf map 檔案成功時回傳 ``0``,失敗時回傳 ``-1``,建立鎖時失敗則回"
78-
"傳 ``-2``。檢查 ``errno`` 以獲取更多造成失敗的資訊。"
78+
"傳 ``-2``。檢查 ``errno`` 以取得更多造成失敗的資訊。"
7979

8080
#: ../../c-api/perfmaps.rst:35
8181
msgid ""

c-api/refcounting.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ msgid ""
238238
"object in a temporary variable, update the list data structure, and then "
239239
"call :c:func:`Py_DECREF` for the temporary variable."
240240
msgstr ""
241-
"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`~object."
241+
"釋放函式可以導致任意 Python 程式碼被叫用(例如,當釋放具有 :meth:`~object."
242242
"__del__` 方法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但​​執行的程"
243-
"式碼可以自由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之"
243+
"式碼可以自由存取所有 Python 全域變數。這意味著在叫用 :c:func:`Py_DECREF` 之"
244244
"前,可從全域變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程"
245245
"式碼應將已刪除物件的參照複製到臨時變數中,更新 list 資料結構,然後為臨時變數"
246246
"呼叫 :c:func:`Py_DECREF`。"

c-api/sequence.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ msgstr ""
202202

203203
#: ../../c-api/sequence.rst:21 ../../c-api/sequence.rst:123
204204
msgid "built-in function"
205-
msgstr "built-in function(内建函式)"
205+
msgstr "built-in function(內建函式)"
206206

207207
#: ../../c-api/sequence.rst:21
208208
msgid "len"
209209
msgstr "len"
210210

211211
#: ../../c-api/sequence.rst:123
212212
msgid "tuple"
213-
msgstr "tuple(元组)"
213+
msgstr "tuple(元組)"

faq/extending.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ msgid ""
9595
"<https://github.com/scipy/weave>`_ are also alternatives for wrapping C++ "
9696
"libraries."
9797
msgstr ""
98-
"如果你需要連接到當前不存在 Python 擴充的某些 C 或 C++ 函式庫,你可以嘗試使用 "
98+
"如果你需要連接到目前不存在 Python 擴充的某些 C 或 C++ 函式庫,你可以嘗試使用 "
9999
"`SWIG <https://www.swig.org>`_ 等工具包裝函式庫的資料型別和函式。`SIP "
100100
"<https://github.com/Python-SIP/sip>`__、`CXX <https://cxx.sourceforge.net/"
101101
">`_ `Boost <https://www.boost.org/libs /python/doc/index.html>`_ 或 `Weave "

0 commit comments

Comments
 (0)