<commit_before>Release Notes
=============

v4.0.0b3
--------

:date: 2019-04-10

NB: This is a beta release and these notes are subject to change.

This is major release and contains breaking changes. Please read the notes below carefully.

**Requests Removal**

Given that ``botocore`` has moved to using ``urllib3`` directly for making HTTP requests, we'll be doing the same (via ``botocore``). This means the following:

* The ``session_cls`` option is no longer supported.
* The ``request_timeout_seconds`` parameter is no longer supported. ``connect_timeout_seconds`` and ``read_timeout_seconds`` are available instead.

  + Note that the timeouts for connection and read are now ``15`` and ``30`` seconds respectively. This represents a change from the previous ``60`` second combined ``requests`` timeout.
* *Wrapped* exceptions (i.e ``exc.cause``) that were from ``requests.exceptions`` will now be comparable ones from ``botocore.exceptions`` instead.

**Deprecation of old APIs**

Support for `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`_ has been
removed. See a complete list of affected ``Model`` methods below:

* ``update_item``: removed in favor of ``update``.
* ``rate_limited_scan``: removed in favor of ``scan`` and ``ResultIterator``.

  + Relatedly, the ``allow_rate_limited_scan_without_consumed_capacity`` option has been removed.
* ``delete``: ``conditional_operator`` and ``**expected_values`` kwargs removed. Use ``condition`` instead.
* ``update``: ``attributes``, ``conditional_operator`` and ``**expected_values`` kwargs removed. Use ``actions`` and ``condition`` instead.<commit_msg>release notes: key attribute types must match table (#663)<commit_after>Release Notes
=============

v4.0.0b3
--------

:date: 2019-04-10

NB: This is a beta release and these notes are subject to change.

This is major release and contains breaking changes. Please read the notes below carefully.

**Requests Removal**

Given that ``botocore`` has moved to using ``urllib3`` directly for making HTTP requests, we'll be doing the same (via ``botocore``). This means the following:

* The ``session_cls`` option is no longer supported.
* The ``request_timeout_seconds`` parameter is no longer supported. ``connect_timeout_seconds`` and ``read_timeout_seconds`` are available instead.

  + Note that the timeouts for connection and read are now ``15`` and ``30`` seconds respectively. This represents a change from the previous ``60`` second combined ``requests`` timeout.
* *Wrapped* exceptions (i.e ``exc.cause``) that were from ``requests.exceptions`` will now be comparable ones from ``botocore.exceptions`` instead.

**Key attribute types must match table**

The previous release would call `DescribeTable` to discover table metadata
and would use the key types as defined in the DynamoDB table. This could obscure
type mismatches e.g. where a table's hash key is a number (`N`) in DynamoDB,
but defined in PynamoDB as a `UnicodeAttribute`.

With this release, we're always using the PynamoDB model's definition
of all attributes including the key attributes.

**Deprecation of old APIs**

Support for `Legacy Conditional Parameters <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.html>`_ has been
removed. See a complete list of affected ``Model`` methods below:

* ``update_item``: removed in favor of ``update``.
* ``rate_limited_scan``: removed in favor of ``scan`` and ``ResultIterator``.

  + Relatedly, the ``allow_rate_limited_scan_without_consumed_capacity`` option has been removed.
* ``delete``: ``conditional_operator`` and ``**expected_values`` kwargs removed. Use ``condition`` instead.
* ``update``: ``attributes``, ``conditional_operator`` and ``**expected_values`` kwargs removed. Use ``actions`` and ``condition`` instead.
{'fraction_non_alphanumeric': 0.12445358704037028, 'fraction_numerical': 0.010542555926973516, 'mean_word_length': 5.526845637583893, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3672925', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1033, 'n_words': 446}