Pyramid-formencode-classic

Latest version: v0.9.1

Safety actively analyzes 723359 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

0.9.1

* `FormStash.register_error_main_exception` is now `FormStash.register_FormInvalid`
addressed several regressions; expanded tests

0.9.0

BACKWARDS INCOMPATIBLE CHANGES

Releases `0.7.0`, `0.8.0` and `0.9.0` were released in quick succession to
make significant changes to the API and functionality easier to adopt.

For most users, the general change will be this:

`FormInvalid` and `FormFieldInvalid` now require a `formStash`
`FormStash.__init__` now requires a schema
`FormStash.fatal_form` message is now `error_main`
`FormStash.fatal_field` message is now `error_field`

There are a few other changes, but the above are the most significant.

These changes were done to make the package more maintainable and usable - as Field exceptions can cascade onto Forms.

The 0.8.0 branch offers some additional control allowing complex error messages to
append, prepend, or overwrite existing errors. This control was stripped out
of the 0.9.0 branch, in favor of introducing special "meta-errors" about the form.

This release continues the work of 0.8.0 in trying to minimize and simplify
the API while still giving control of the meta/special errors.

FormStash-
the processed form data is now within a dict, ``ParsedForm
Changes:
self.defaults -> self.parsed_form["defaults"]
self.errors -> self.parsed_form["errors"]
self.results -> self.parsed_form["results"]
properties are used to make this (mostly) backwards compatible
`set_error_nothing_submitted` is now `set_error_nothing_submitted(_set_error__nothing_submitted)`
`set_error` now accepts `integrate_special_errors:bool`
`fatal_form` no longer accepts:
message_overwrite
message_append
message_prepend
`fatal_field` no longer accepts:
message_overwrite
message_append
message_prepend
`_raise_unique_FormInvalid` no longer accepts:
error_message_overwrite
error_message_append
error_message_prepend

* `exceptions.FormInvalid`
removed `error_main_overwrite`
removed `error_main_append`
removed `error_main_prepend`
added `integrate_special_errors`
added `error_no_submission_text`
* `exceptions.FormFieldInvalid`
removed `message_append`
removed `message_prepend`
removed `error_main_append`
removed `error_main_prepend`
added `raised_by`
added `integrate_special_errors`
added `error_no_submission_text`

0.8.0

BACKWARDS INCOMPATIBLE CHANGES

(unreleased)

This release was made to make the API easier to manage, as such, major
breaking changes were required.

Most of the work, and uglyness, comes from trying to control how the
"Nothing Submitted." message persists.

To maintain control of how this message renders, some kwargs were renamed
and others were added. A 0.9.0 branch removes many of these for an
alternate strategy.

BACKWARDS INCOMPATIBLE CHANGES

* `exceptions.FormInvalid`
kwargs:
`formStash` (formerly `form`) is now the first required arg
`message` is now `error_main`
`error_main_overwrite` is new
`message_append` is now `error_main_append`
`message_prepend` is now `error_main_prepend`
`raised_by` is new
`errors` arg and attribute are removed; use the formStash instead
* `exceptions.FormFieldInvalid`
kwargs:
`formStash` (formerly `form`) is now the first required arg
`message` is now `error_field`
`error_main` is new
`error_main_append` is new
`error_main_prepend` is new
`allow_unknown_fields` is new
`raised_by` is new
`errors` arg and attribute are removed; use the formStash instead
* `objects.FormStash.fatal_form`
kwargs:
`message` is now `error_main`
`error_main_overwrite` is new
* `objects.FormStash.fatal_field`
kwargs:
`field` arg[0] is now required
`message` is now `error_field`
`error_main` is new
`message_overwrite` is new
`allow_unknown_fields` is new
* removed `form_validate_simple`
* formatter_hidden
now stores error in "value" instead of "name"

Other changes:
`objects.FormStash::fatal_field`
* function typed to raise exception with `typing.NoReturn`

`objects.FormStash::fatal_form`
* `message` renamed to `error_main`
* function typed to raise exception with `typing.NoReturn`

0.7.0

BACKWARDS INCOMPATIBLE CHANGES
* `_form_validate_core`
* now requires `request`; this should not affect anything
* now requires `schema`; this should not affect anything
* `form_stash_object` now named `formStash`
* the `schema` is now stored in the `FormStash` result
* dropped `return_stash`; ALWAYS return a tuple
* dropped `raise_FormFieldInvalid` as it made no sense in context;
use `raise_FormInvalid`
* `form_validate`
* now requires `schema`; this should not affect anything
* dropped `return_stash`; ALWAYS return a tuple
* `form_validate_simple`
* now requires `schema`; this should not affect anything
* dropped `return_stash`; ALWAYS return a tuple
* `FormStash`
now requires a `schema`
* `FormInvalid`
kwarg `form` is now `formStash`
* `FormFieldInvalid`
kwarg `form` is now `formStash`

New:
beware that raising a `FormInvalid(formStash)` will invoke the seterror and utilize the append/prepend args

0.6.0

BACKWARDS INCOMPATIBLE CHANGE
* `form_validate` now requires `return_stash=True` - which is enabled by default.
To support `return_stash=False`, please call `form_validate_simple` instead.
This change was required to streamline typing and better standardize the library.
Background:
`form_validate` was renamed to `_form_validate_core`
the new `form_validate` ensures `return_stash==True` and invokes `_form_validate_core`
the new `form_validate_simple` ensures `return_stash==False` and invokes `_form_validate_core`

0.5.0

* drop py2
* mypy support
* reorganized a lot of code/functions into new files.
the relevant imports should be unchanged.

Page 1 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.