Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84768ec

Browse files
committed
Merge remote-tracking branch 'upstream/3.13' into library/math
2 parents96d387a +7cf33e8 commit84768ec

File tree

514 files changed

+143025
-45662
lines changed

Some content is hidden

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

514 files changed

+143025
-45662
lines changed

‎.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version:2
2+
updates:
3+
-package-ecosystem:"github-actions"
4+
directory:"/"
5+
schedule:
6+
interval:monthly

‎.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
ci:
88
runs-on:ubuntu-latest
99
steps:
10-
-uses:actions/checkout@v2
10+
-uses:actions/checkout@v4
1111

1212
-name:Install Dependencies
1313
run:sudo apt-get install gettext

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: deploy-gh-page
33
on:
44
push:
55
branches:
6-
-"3.12"
6+
-"3.13"
77

88
jobs:
99
cd:
1010
runs-on:ubuntu-latest
1111
steps:
12-
-uses:actions/checkout@v2
12+
-uses:actions/checkout@v4
1313

1414
-name:Install Dependencies
1515
run:sudo apt-get install gettext
@@ -18,7 +18,7 @@ jobs:
1818
run:make all
1919

2020
-name:Deploy to gh page
21-
uses:JamesIves/github-pages-deploy-action@3.7.1
21+
uses:JamesIves/github-pages-deploy-action@v4.6.4
2222
with:
2323
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
2424
BRANCH:gh-pages

‎.github/workflows/py312-sync-cpython.ymlrenamed to‎.github/workflows/py313-sync-cpython.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
name:python-3.12-sync-with-cpython
1+
name:python-3.13-sync-with-cpython
22

33
on:
44
push:
55
branches:
6-
-"3.12"
6+
-"3.13"
77
schedule:
88
-cron:"0 0 * * *"
99

1010
jobs:
1111
sync:
1212
runs-on:ubuntu-latest
1313
env:
14-
VERSION:"3.12"
15-
BRANCH:"cron/sync/3.12"
14+
VERSION:"3.13"
15+
BRANCH:"cron/sync/3.13"
1616
steps:
17-
-uses:actions/checkout@v2
17+
-uses:actions/checkout@v4
1818
with:
1919
ref:${{ env.VERSION }}
2020

@@ -33,15 +33,15 @@ jobs:
3333
-name:Sync with CPython
3434
run:make clone && make merge && make rm_cpython
3535

36-
-uses:tibdex/github-app-token@v1
36+
-uses:tibdex/github-app-token@v2
3737
id:generate-token
3838
with:
3939
app_id:${{ secrets.APP_ID }}
4040
private_key:${{ secrets.APP_PRIVATE_KEY }}
4141

4242
-name:Create Pull Request
4343
id:cpr
44-
uses:peter-evans/create-pull-request@v3
44+
uses:peter-evans/create-pull-request@v6
4545
with:
4646
token:${{ steps.generate-token.outputs.token }}
4747
commit-message:sync with cpython ${{ env.LATEST_COMMIT_ID }}
@@ -50,15 +50,15 @@ jobs:
5050
base:${{ env.VERSION }}
5151
branch:${{ env.BRANCH }}
5252
delete-branch:false
53-
title:'Sync with CPython ${{ env.VERSION }}'
53+
title:"Sync with CPython ${{ env.VERSION }}"
5454
body:|
5555
Sync with CPython ${{ env.VERSION }}
5656
draft:true
5757
labels:|
5858
sync-cpython
5959
automation
60-
60+
6161
-name:Check outputs
6262
run:|
6363
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
64-
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
64+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

‎.github/workflows/summarize_progress.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
# added or changed files to the repository.
1414
contents:write
1515
steps:
16-
-uses:actions/checkout@v2
16+
-uses:actions/checkout@v4
1717

1818
-name:Install poetry
19-
uses:abatilo/actions-poetry@v2
19+
uses:abatilo/actions-poetry@v3
2020

2121
-name:Execute Check Process
2222
run:|
@@ -26,7 +26,7 @@ jobs:
2626

2727

2828
-name:Checkout wiki code
29-
uses:actions/checkout@v2
29+
uses:actions/checkout@v4
3030
with:
3131
repository:${{github.repository}}.wiki
3232
path:markdown

‎.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
*.mo
22
__pycache__
33
.DS_Store
4+
5+
# Environments
6+
.env
7+
.venv
8+
env/
9+
venv/
10+
ENV/
11+
env.bak/
12+
venv.bak/

‎.scripts/poetry.lock

Lines changed: 150 additions & 167 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Makefile

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Here is what you can do:
44
#
55
# - make all # Automatically build an html local version
6+
# - make build <po-file> # To build a single .po file
67
# - make todo # To list remaining tasks
78
# - make merge # To merge pot from upstream
89
# - make fuzzy # To find fuzzy strings
@@ -36,25 +37,23 @@ print('\n'.join(output))
3637
endef
3738
exportPRINT_HELP_PYSCRIPT# End of python section
3839

39-
CPYTHON_CLONE := ../cpython/
40+
CPYTHON_CLONE := ../cpython
41+
VERSION :=$(or$(VERSION), 3.13)
4042
SPHINX_CONF :=$(CPYTHON_CLONE)/Doc/conf.py
4143
LANGUAGE := zh_TW
4244
LC_MESSAGES :=$(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
4345
VENV := ~/.venvs/python-docs-i18n/
44-
PYTHON :=$(shell which python3)
4546
MODE := autobuild-dev-html
46-
BRANCH :=$(or$(VERSION),$(shell git describe --contains --all HEAD))
4747
JOBS := 4
4848

4949
.PHONY: all
50-
all:$(VENV)/bin/sphinx-build$(VENV)/bin/blurb clone## Automatically build an html local version
51-
mkdir -p$(LC_MESSAGES)
50+
all: prepare_deps## Automatically build an html local version
5251
fordirnamein$$(find. -name'*.po'| xargs -n1 dirname| sort -u| grep -v'^\.$$');do mkdir -p$(LC_MESSAGES)/$$dirname;done
5352
forfilein*.po*/*.po;do ln -f$$file$(LC_MESSAGES)/$$file;done
5453
.$(VENV)/bin/activate;$(MAKE) -C$(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0'$(MODE)
5554

5655
.PHONY: build
57-
build:$(VENV)/bin/sphinx-build$(VENV)/bin/blurb clone## Automatically build an html local version
56+
build:prepare_deps## Automatically build an html local version for a single file
5857
@$(eval target=$(filter-out$@,$(MAKECMDGOALS)))
5958
@if [-z$(target) ];then\
6059
echo"\x1B[1;31m""Please provide a file argument.""\x1B[m";\
@@ -68,32 +67,29 @@ build: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone ## Automatically build a
6867
echo"\x1B[1;31m""ERROR:$(target) not exist.""\x1B[m";\
6968
exit 1;\
7069
fi
71-
@mkdir -p$(LC_MESSAGES)
70+
7271
@$(eval dir=`echo $(target) | xargs -n1 dirname`)## Get dir
73-
# If the build target is in under directory
74-
# We should make direcotry in $(LC_MESSAGES) and link the file.
75-
@if [ $(dir) != "." ]; then \
76-
echo "mkdir -p $(LC_MESSAGES)/$(dir)"; \
77-
mkdir -p $(LC_MESSAGES)/$(dir); \
78-
echo "ln -f ./$(target) $(LC_MESSAGES)/$(target)"; \
79-
ln -f ./$(target) $(LC_MESSAGES)/$(target); \
80-
fi
81-
# Build
82-
@echo "----"
72+
@mkdir -p $(LC_MESSAGES)/$(dir)
73+
@ln -f ./$(target) $(LC_MESSAGES)/$(target)
74+
8375
@. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D language=$(LANGUAGE) -D locale_dirs=locales -D gettext_compact=0' SOURCES='$(basename $(target)).rst' html
8476

77+
8578
help:
8679
@python3 -c"$$PRINT_HELP_PYSCRIPT"<$(MAKEFILE_LIST)
8780

88-
clone:## Clone latest cpython repository to `../cpython/` if it doesn't exist
81+
.PHONY: prepare_deps
82+
prepare_deps:$(VENV)/bin/sphinx-build$(VENV)/bin/blurb upgrade_venv prepare_cpython## Prepare dependencies
83+
84+
.PHONY: prepare_cpython
85+
prepare_cpython:## Prepare CPython clone at `../cpython/`.
8986
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git$(CPYTHON_CLONE)||echo"cpython exists"
90-
cd$(CPYTHON_CLONE)&& git checkout$(BRANCH)
87+
cd$(CPYTHON_CLONE)&& git checkout$(VERSION)&& git pull origin$(VERSION)
88+
mkdir -p$(LC_MESSAGES)
9189

9290

9391
$(VENV)/bin/activate:
94-
mkdir -p$(VENV)
95-
$(PYTHON) -m venv$(VENV)
96-
92+
python3 -m venv$(VENV)
9793

9894
$(VENV)/bin/sphinx-build:$(VENV)/bin/activate
9995
.$(VENV)/bin/activate; python3 -m pip install sphinx python-docs-theme
@@ -107,7 +103,7 @@ $(VENV)/bin/blurb: $(VENV)/bin/activate
107103

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

112108

113109
.PHONY: progress
@@ -123,10 +119,7 @@ todo: ## List remaining tasks
123119

124120

125121
.PHONY: merge
126-
merge: upgrade_venv## To merge pot from upstream
127-
ifneq "$(shell cd$(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"
128-
$(error "You're merging from a different branch")
129-
endif
122+
merge: prepare_deps## To merge pot from upstream
130123
(cd$(CPYTHON_CLONE)/Doc; rm -f build/NEWS)
131124
(cd$(CPYTHON_CLONE)/Doc;$(VENV)/bin/sphinx-build -Q -b gettext -D gettext_compact=0. locales/pot/)
132125
find$(CPYTHON_CLONE)/Doc/locales/pot/ -name'*.pot'|\
@@ -145,7 +138,7 @@ endif
145138

146139
.PHONY: update_txconfig
147140
update_txconfig:
148-
curl -L https://rawgit.com/python-doc-ja/cpython-doc-catalog/catalog-$(BRANCH)/Doc/locales/.tx/config|\
141+
curl -L https://rawgit.com/python-doc-ja/cpython-doc-catalog/catalog-$(VERSION)/Doc/locales/.tx/config|\
149142
grep --invert-match'^file_filter = *'|\
150143
sed -e's/source_file = pot\/\(.*\)\.pot/trans.zh_TW = \1.po/'|\
151144
sed -n'w .tx/config'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp