pax_global_header00006660000000000000000000000064147054355420014523gustar00rootroot0000000000000052 comment=f9a999e5b7406db05d9e0e02dd85ab25253d40a6 wtforms-3.2.1/000077500000000000000000000000001470543554200132275ustar00rootroot00000000000000wtforms-3.2.1/.github/000077500000000000000000000000001470543554200145675ustar00rootroot00000000000000wtforms-3.2.1/.github/ISSUE_TEMPLATE.md000066400000000000000000000015341470543554200172770ustar00rootroot00000000000000### Actual Behavior ```python # Paste a minimal piece of code that causes the problem: # - try to avoid using side projects like flask-wtf # or wtforms-alchemy in your sample ; # - delete all the irrelevant code (comments, irrelevant fields etc.). # Here is an example: >>> import wtforms >>> class F(wtforms.Form): ... foo = wtforms.StringField() >>> f = F(foo="bar") >>> print(f.foo.shrug) Traceback (most recent call last): File "", line 1, in AttributeError: 'StringField' object has no attribute 'shrug' ``` ### Expected Behavior ```python # Show us, and explain what behavior you would have expected. # Here is an example: >>> import wtforms >>> class F(wtforms.Form): ... foo = wtforms.StringField() >>> f = F(foo="bar") >>> print(f.foo.shrug) ¯\_(ツ)_/¯ ``` ### Environment * Python version: * wtforms version: wtforms-3.2.1/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000006651470543554200203770ustar00rootroot00000000000000Describe the issue you are attempting to fix. Link to any relevant issues or pull requests. Describe what this patch does to fix the issue. wtforms-3.2.1/.github/workflows/000077500000000000000000000000001470543554200166245ustar00rootroot00000000000000wtforms-3.2.1/.github/workflows/pre-commit.yaml000066400000000000000000000010151470543554200215610ustar00rootroot00000000000000name: pre-commit on: pull_request: push: branches: [main, '*.x'] jobs: main: runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: 3.x - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - uses: pre-commit-ci/lite-action@9d882e7a565f7008d4faf128f27d1cb6503d4ebf # v1.0.2 if: ${{ !cancelled() }} wtforms-3.2.1/.github/workflows/publish.yaml000066400000000000000000000050711470543554200211610ustar00rootroot00000000000000name: Publish on: push: tags: - '*' jobs: build: runs-on: ubuntu-latest outputs: hash: ${{ steps.hash.outputs.hash }} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: '3.x' cache: pip - run: pip install -e . - run: pip install build # Use the commit date instead of the current date during the build. - run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV - run: python -m build # Generate hashes used for provenance. - name: generate hash id: hash run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: path: ./dist provenance: needs: [build] permissions: actions: read id-token: write contents: write # Can't pin with hash due to how this workflow works. uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0 with: base64-subjects: ${{ needs.build.outputs.hash }} create-release: # Upload the sdist, wheels, and provenance to a GitHub release. They remain # available as build artifacts for a while as well. needs: [provenance] runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - name: create release run: > gh release create --draft --repo ${{ github.repository }} ${{ github.ref_name }} *.intoto.jsonl/* artifact/* env: GH_TOKEN: ${{ github.token }} publish-pypi: needs: [provenance] # Wait for approval before attempting to upload to PyPI. This allows reviewing the # files in the draft release. environment: name: publish url: https://pypi.org/project/wtforms/${{ github.ref_name }} runs-on: ubuntu-latest permissions: id-token: write steps: - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0 with: repository-url: https://test.pypi.org/legacy/ packages-dir: artifact/ - uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0 with: packages-dir: artifact/ wtforms-3.2.1/.github/workflows/tests.yaml000066400000000000000000000016471470543554200206620ustar00rootroot00000000000000name: Tests on: push: branches: - main - '*.x' paths-ignore: - 'docs/**' - '*.md' - '*.rst' pull_request: paths-ignore: - 'docs/**' - '*.md' - '*.rst' jobs: tests: name: ${{ matrix.name || matrix.python }} runs-on: ${{ matrix.os || 'ubuntu-latest' }} strategy: fail-fast: false matrix: include: - {python: '3.13'} - {python: '3.12'} - {python: '3.11'} - {python: '3.10'} - {python: '3.9'} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: ${{ matrix.python }} allow-prereleases: true cache: pip - run: pip install tox - run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }} wtforms-3.2.1/.gitignore000066400000000000000000000002731470543554200152210ustar00rootroot00000000000000/.idea/ /.vscode/ /env/ /venv/ __pycache__/ *.pyc .eggs/ *.egg-info/ /build/ /dist/ /.pytest_cache/ /.tox/ .coverage .coverage.* /htmlcov/ /docs/_build/ /src/wtforms/locale/**/wtforms.mo wtforms-3.2.1/.pre-commit-config.yaml000066400000000000000000000005641470543554200175150ustar00rootroot00000000000000repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.9 hooks: - id: ruff - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - id: check-merge-conflict - id: debug-statements - id: fix-byte-order-marker - id: trailing-whitespace - id: end-of-file-fixer wtforms-3.2.1/.readthedocs.yaml000066400000000000000000000003251470543554200164560ustar00rootroot00000000000000version: 2 python: install: - method: pip path: . - requirements: docs/requirements.txt sphinx: builder: dirhtml formats: - pdf - epub build: os: "ubuntu-22.04" tools: python: "3.11" wtforms-3.2.1/CHANGES.rst000066400000000000000000000561111470543554200150350ustar00rootroot00000000000000.. currentmodule:: wtforms Version 3.2.1 ------------- Released 2024-10-21 - Fix :class:`~fields.SelectMultipleBase` import. :issue:`861` :pr:`862` Version 3.2.0 ------------- Released 2024-10-20 - Translations update: korean, chinese (traditional), portugese, russian, dutch, kazakh, swedish, turkish, slovak, ukranian, spanish, french. - Move the repository to the pallets-eco organization. :pr:`854` - Stop supporting Python 3.9 and start supporting Python 3.13 :pr:`855` - Removed `required` flag support from :class:`~fields.HiddenWidget`, :class:`~fields.RangeWidget` and :class:`~fields.SelectWidget` to conform to W3C :pr:`810` - :class:`~wtforms.validators.NoneOf` and :class:`~wtforms.validators.AnyOf` can validate multiple valued fields like :class:`~fields.SelectMultipleField` :pr:`538` :pr:`807` - Use GHA and pre-commit workflows inspired from Flask. :pr:`856` :pr:`860` - ⚠️Breaking change⚠️: Some deprecated code was removed (:pr:`859`): - :class:`~wtforms.Flags` can no longer be tuples. :issue:`467` - `iter_choices` needs a tuple of 4 items :issue:`816` - ⚠️Breaking change⚠️: The key for form errors moved from :data:`None` to empty string `""`. :issue:`829` :pr:`858` .. note:: If you need to keep the old behavior you can set the ``_form_error_key`` parameter of your form to :data:`None`. Version 3.1.2 ------------- Released 2024-01-06 - Fix :class:`~fields.SelectMultipleField` value coercion on validation. :issue:`822` :pr:`823` Version 3.1.1 ------------- Released 2023-11-01 - Display :class:`~wtforms.Flags` values in their repr. :pr:`808` - :class:`~fields.SelectField` and :class:`~fields.SelectMultipleField` ``choices`` can be `None` if `validate_choice` is `False` :pr:`809` - Documentation improvements :pr:`812` :pr:`815` :pr:`817` - Unit tests improvements :pr:`813` - Python 3.12 support :pr:`818` - Restored support for 3-items tuple return value from `iter_choices` :pr:`816` Version 3.1.0 ------------- Released 2023-10-10 - Documentation improvements :pr:`726` :pr:`733` :pr:`749` :pr:`767` :pr:`788` :pr:`789` :pr:`793` - Translation improvements :pr:`732` :pr:`734` :pr:`754` - Implement :class:`~fields.ColorField` :pr:`755` - Delayed import of ``email_validator``. :issue:`727` - ``