10000 gh-104400: pygettext: use an AST parser instead of a tokenizer by tomasr8 · Pull Request #104402 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104400: pygettext: use an AST parser instead of a tokenizer #104402

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

Merged
merged 40 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ce99920
Move test_i18n into a separate folder
tomasr8 May 10, 2023
4234c0b
Switch to AST-based message extraction
tomasr8 May 10, 2023
d431951
Add news entry
tomasr8 May 11, 2023
5721857
Merge branch 'main' into better-pygettext
tomasr8 Jun 12, 2023
42277e8
Fix comment
tomasr8 Jun 13, 2023
03f698f
Merge branch 'main' into better-pygettext
tomasr8 Jun 13, 2023
705b608
Merge branch 'main' into better-pygettext
tomasr8 Jun 15, 2023
a16274f
Merge branch 'main' into better-pygettext
tomasr8 Jun 16, 2023
f291862
Merge branch 'main' into better-pygettext
tomasr8 Jul 19, 2023
ca4cd02
Merge remote-tracking branch 'upstream/main' into better-pygettext
tomasr8 Nov 29, 2024
22c44b4
Fix conflicts
tomasr8 Nov 29, 2024
5625422
Remove unrelated changes
tomasr8 Nov 29, 2024
a80d92e
Use match-case
tomasr8 Nov 29, 2024
7fe3df5
Reorder methods
tomasr8 Nov 29, 2024
a6b1d54
Test f-strings
tomasr8 Nov 29, 2024
46eba7a
Improve error messages
tomasr8 Nov 29, 2024
424ad6a
Update news entry
tomasr8 Nov 30, 2024
7d58283
Fix error messages
tomasr8 Nov 30, 2024
6e7ca58
Add tests for error messages
tomasr8 Nov 30, 2024
7cfa879
Normalize line endings on Windows
tomasr8 Nov 30, 2024
53e0664
Merge branch 'main' into better-pygettext
AA-Turner Feb 2, 2025
c85bc8e
Merge branch 'main' into better-pygettext
AA-Turner Feb 2, 2025
5170691
Merge remote-tracking branch 'upstream/main' into better-pygettext
tomasr8 Feb 5, 2025
de52a20
Simplify docstring extraction
tomasr8 Feb 5, 2025
7caef48
:seal:
tomasr8 Feb 5, 2025
2409f72
Readability improvements
tomasr8 Feb 5, 2025
3a84af8
Fix tests
tomasr8 Feb 5, 2025
7f9c244
Remove unused method
tomasr8 Feb 5, 2025
3efa0ba
PEP8 fixes
tomasr8 Feb 5, 2025
3f22a99
Use f-strings
tomasr8 Feb 5, 2025
9856868
Simplifications
tomasr8 Feb 5, 2025
84e2d24
Add a comment
tomasr8 Feb 6, 2025
006e4a8
Remove walrus
tomasr8 Feb 6, 2025
d684780
Remove redundant function
tomasr8 Feb 6, 2025
084405f
Add visit_file to GettextVisitor
tomasr8 Feb 6, 2025
1ad8d76
Simplify reading files
tomasr8 Feb 6, 2025
29ec497
Reject calls with var-positional arguments
tomasr8 Feb 6, 2025
621cf01
Use more specific visit functions
tomasr8 Feb 6, 2025
a3e866d
Use aliases for some visit methods
tomasr8 Feb 6, 2025
4d51b08
Remove walrus
tomasr8 Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/main' into better-pygettext
  • Loading branch information
tomasr8 committed Nov 29, 2024
commit ca4cd02f1eae1247fc84abb049910410a55e016e
The diff you're trying to view is too large. We only load the first 3000 changed files.
71 changes: 2 additions & 69 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,16 @@
variables:
coverage: false

trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
trigger: ['main', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']

jobs:
- job: Prebuild
displayName: Pre-build checks

pool:
vmImage: ubuntu-22.04
vmImage: ubuntu-24.04

steps:
- template: ./prebuild-checks.yml


- job: macOS_CI_Tests
displayName: macOS CI Tests
dependsOn: Prebuild
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
# bpo-39837: macOS tests on Azure Pipelines are disabled
condition: false

variables:
testRunTitle: '$(build.sourceBranchName)-macos'
testRunPlatform: macos

pool:
vmImage: macos-10.15

steps:
- template: ./macos-steps.yml


- job: Ubuntu_CI_Tests
displayName: Ubuntu CI Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: ubuntu-22.04

variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.1u

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt


- job: Ubuntu_Coverage_CI_Tests
displayName: Ubuntu CI Tests (coverage)
dependsOn: Prebuild
condition: |
and(
and(
succeeded(),
eq(variables['coverage'], 'true')
),
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
)

pool:
vmImage: ubuntu-22.04

variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.1u

steps:
- template: ./posix-steps.yml
parameters:
dependencies: apt
coverage: true


- job: Windows_CI_Tests
displayName: Windows CI Tests
dependsOn: Prebuild
Expand Down
27 changes: 0 additions & 27 deletions .azure-pipelines/macos-steps.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .azure-pipelines/posix-deps-apt.sh

This file was deleted.

83 changes: 0 additions & 83 deletions .azure-pipelines/posix-steps.yml

This file was deleted.

111 changes: 0 additions & 111 deletions .azure-pipelines/pr.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ exclude_lines =
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
raise AssertionError\(

# Empty bodies in protocols or abstract methods
^\s*def [a-zA-Z0-9_]+\(.*\)(\s*->.*)?:\s*\.\.\.(\s*#.*)?$
^\s*\.\.\.(\s*#.*)?$

.*# pragma: no cover
.*# pragma: no branch
Expand Down
24 changes: 0 additions & 24 deletions .devcontainer/Dockerfile

This file was deleted.

4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"build": {
"dockerfile": "Dockerfile"
},
"image": "ghcr.io/python/devcontainer:2024.09.25.11038928730",
"onCreateCommand": [
// Install common tooling.
"dnf",
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0