Summary
This is an emergency release to fix a critical Batch bug spotted by @kimberlyamandalu, where multiple failed records weren't reported due to dictionary key uniqueness - If you are using BatchProcessor
, please update to 1.24.1 as soon as possible.
New official tutorial
Thanks to the gigantic effort by @mploski and @am29d on reviewing it, we now finally have an official tutorial covering core Powertools features. The tutorial demonstrates how new customers can add one feature at a time. It also opens the door to create other tutorials covering other complex features in more depth.
Please do let us know your thoughts and what other tutorials we should focus on next ;-)
New tiny function to copy Logger config to external loggers
A common question we receive is: How can I enable powertools logging for imported libraries?
Thanks to @mploski, we now have a tiny standalone function you can use to copy your current Logger config to any or a select list of loggers you want.
Why would people want that? It's a fair question. Reason is sometimes you want external libraries to have the exact same structured logging that your application has. This function allows you to specify which explicit loggers you wanna copy config to (or all), and whether you want to set a different log level.
import logging
from aws_lambda_powertools import Logger
from aws_lambda_powertools.logging import utils
logger = Logger()
external_logger = logging.logger()
utils.copy_config_to_registered_loggers(source_logger=logger)
external_logger.info("test message")
Big thanks to new contributors @thehananbhat @j2clerck on helping us make documentation better (critical to us!).
Changes
πNew features and non-breaking changes
π Minor Changes
- fix(data-classes): docstring typos and clean up (#937) by @michaelbrewer
π Documentation updates
- docs(tutorial): fix path to images (#963) by @mploski
- docs(batch): snippet typo in custom batch processor (#961) by @thehananbhat
- docs(batch): snippet typo on batch processed messages iteration (#951) by @j2clerck
- docs(nav): make REST and GraphQL event handlers more explicit (#959) by @heitorlessa
- docs(logger): fix code block syntax in FAQ (#952) by @mozz100
- docs(tutorial): add new tutorial covering core features (#769) by @mploski
- docs(homepage): link to typescript version (#950) by @michaelbrewer
- fix(parameters): appconfig internal _get docstrings (#934) by @ran-isenberg
- docs(batch): fix typo in context manager keyword (#938) by @heitorlessa
- feat(logger): clone powertools logger config to any Python logger (#927) by @mploski
π Bug and hot fixes
- fix(batch): report multiple failures (#967) by @heitorlessa
- fix(parameters): appconfig internal _get docstrings (#934) by @ran-isenberg
π§ Maintenance
- docs(tutorial): fix path to images (#963) by @mploski
- chore(deps): bump pydantic from 1.8.2 to 1.9.0 (#933) by @dependabot
- chore(deps-dev): bump mypy from 0.930 to 0.931 (#941) by @dependabot
This release was made possible by the following contributors:
@dependabot, @dependabot[bot], @heitorlessa, @j2clerck, @michaelbrewer, @mozz100, @mploski, @ran-isenberg, @thehananbhat and Michal Ploski