Fast Base64 encoding/decoding in Python

Overview

Fast Base64 implementation

license-status pypi-status python-versions Documentation Status gha-status codecov-status

This project is a wrapper on libbase64.

It aims to provide a fast base64 implementation for base64 encoding/decoding.

Installation

pip install pybase64

Usage

pybase64 uses the same API as Python base64 "modern interface" (introduced in Python 2.4) for an easy integration.

To get the fastest decoding, it is recommended to use the pybase64.b64decode and validate=True when possible.

import pybase64

print(pybase64.b64encode(b'>>>foo???', altchars='_:'))
# b'Pj4_Zm9vPz8:'
print(pybase64.b64decode(b'Pj4_Zm9vPz8:', altchars='_:', validate=True))
# b'>>>foo???'

# Standard encoding helpers
print(pybase64.standard_b64encode(b'>>>foo???'))
# b'Pj4+Zm9vPz8/'
print(pybase64.standard_b64decode(b'Pj4+Zm9vPz8/'))
# b'>>>foo???'

# URL safe encoding helpers
print(pybase64.urlsafe_b64encode(b'>>>foo???'))
# b'Pj4-Zm9vPz8_'
print(pybase64.urlsafe_b64decode(b'Pj4-Zm9vPz8_'))
# b'>>>foo???'

A command-line tool is also provided. It has encode, decode and benchmark subcommands.

usage: pybase64 [-h] [-V] {benchmark,encode,decode} ...

pybase64 command-line tool.

positional arguments:
  {benchmark,encode,decode}
                        tool help
    benchmark           -h for usage
    encode              -h for usage
    decode              -h for usage

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit

Full documentation on Read the Docs.

Benchmark

Running Python 3.7.2, Apple LLVM version 10.0.0 (clang-1000.11.45.5), Mac OS X 10.14.2 on an Intel Core i7-4870HQ @ 2.50GHz

pybase64 0.5.0 (C extension active - AVX2)
bench: altchars=None, validate=False
pybase64._pybase64.encodebytes:   1734.776 MB/s (13,271,472 bytes -> 17,928,129 bytes)
pybase64._pybase64.b64encode:     4039.539 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode:     1854.423 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.encodebytes:                 78.352 MB/s (13,271,472 bytes -> 17,928,129 bytes)
base64.b64encode:                  539.840 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode:                  287.826 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=None, validate=True
pybase64._pybase64.b64encode:     4156.607 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode:     4107.997 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode:                  559.342 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode:                  143.674 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=False
pybase64._pybase64.b64encode:     2786.776 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode:     1124.136 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode:                  322.427 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode:                  205.195 MB/s (17,695,296 bytes -> 13,271,472 bytes)
bench: altchars=b'-_', validate=True
pybase64._pybase64.b64encode:     2806.271 MB/s (13,271,472 bytes -> 17,695,296 bytes)
pybase64._pybase64.b64decode:     2740.456 MB/s (17,695,296 bytes -> 13,271,472 bytes)
base64.b64encode:                  314.709 MB/s (13,271,472 bytes -> 17,695,296 bytes)
base64.b64decode:                  121.803 MB/s (17,695,296 bytes -> 13,271,472 bytes)

Changelog

1.2.0

  • Release the GIL
  • Publish CPython 3.10 wheels
  • Drop python 3.5 support

1.1.4

  • Add macOS arm64 wheel

1.1.3

  • GitHub Actions: fix build on tag

1.1.2

  • Add PyPy wheels
  • Add aarch64, ppc64le & s390x manylinux wheels

1.1.1

  • Move CI from TravisCI/AppVeyor to GitHub Actions
  • Fix publication of Linux/macOS wheels

1.1.0

  • Add b64encode_as_string, same as b64encode but returns a str object instead of a bytes object
  • Add b64decode_as_bytearray, same as b64decode but returns a bytarray object instead of a bytes object
  • Speed-Up decoding from UCS1 strings

1.0.2

  • Update base64 library
  • Publish python 3.9 wheels

1.0.1

  • Publish python 3.8 wheels

1.0.0

  • Drop python 3.4 support
  • Drop python 2.7 support

0.5.0

  • Publish python 3.7 wheels
  • Drop python 3.3 support

0.4.0

  • Speed-up decoding when validate==False

0.3.1

  • Fix deployment issues

0.3.0

  • Add encodebytes function

0.2.1

  • Fixed invalid results on Windows

0.2.0

  • Added documentation

  • Added subcommands to the main script:

    • help
    • version
    • encode
    • decode
    • benchmark

0.1.2

  • Updated base64 native library

0.1.1

  • Fixed deployment issues

0.1.0

  • First public release
Comments
  • encoding to string and decoding to bytearray optimizations

    encoding to string and decoding to bytearray optimizations

    Hi, I'm developing serializejson, a python library for fast serialization and deserialization of python objects in JSON designed as a safe, interoperable and human-readable drop-in replacement for the Python pickle package.

    I use PyBase64 for bytes and bytesarray encoding in json. When encoding and decoding bytes and bytesarrays, most of the time is spend in avoidable copies rather really encoding and decoding in base64.

    example with line profiler :

    import pybase64
    import json
    
    @profile
    def encode_bytearray(bytearray_):
        bytes_b64 = pybase64.b64encode(bytearray_) # 1.05 msec, 29% of time
        string_b64 = bytes_b64.decode("ascii")     # 1.44 msec, 40% of time  
        string_json = f'"{string_b64}"'            # 1.10 msec, 30% of time
        return string_json
    
    @profile
    def decode_bytearray(string_json_without_quotes):
        bytes_b64 = string_json_without_quotes.encode("ascii")  # 1.13 msec, 28% of time 
        bytes_decoded = pybase64.b64decode(bytes_b64)           # 2.00 msec, 52% of time 
        #bytes_decoded = pybase64.b64decode(string_b64)         # 3.72 msec   
        bytearray_decoded  = bytearray(bytes_decoded)           # 0.86 msec, 20% of time
        return bytearray_decoded
    
    # encoding :
    bytearray_ = bytearray(range(256)) * 12000
    string_json = encode_bytearray(bytearray_)
    
    # decoding : 
    string_json_without_quotes = json.loads(string_json)
    print(string_json_without_quotes.isascii())
    bytearray_decoded = decode_bytearray(string_json)
    

    When encoding, 70% of time is lost in avoidable copies. I would like to know if it could be possible to add an option to encode directly in string to avoid a first copy with bytes_b64.decode("ascii"), and if it could be possible to add an option to encode directly in string with double quotes, to avoid a second copy just for adding double quotes for Json.

    When loading, 48 % of time is lost in avoidable copies. First, strangely, decoding directly from string is slower than passing by intermediary encoding in bytes even if the string is already ASCII (string_json_without_quotes.isascii() is True) and so continuous ascii in memory. Secondly, I would know if it could be possible to add an option to b64decode (or a new function) for decoding directly in bytesarray, in order to avoid a second copy passing by an intermediary bytes. Sadly, I don't know C and C++ and I'm not comfortable to fork your project or propose a pull request for this améliorations.

    Tanks a lot .

    Baptiste

    enhancement 
    opened by SmartAudioTools 6
  • Bump cibuildwheel from 0.10.0 to 0.10.1

    Bump cibuildwheel from 0.10.0 to 0.10.1

    Bumps cibuildwheel from 0.10.0 to 0.10.1.

    Commits
    • f1bba58 Bump version
    • 56218d8 Merge pull request #123 from YannickJadoul/fix-issue-122
    • d79ca07 Running 'pip install --upgrade setuptools' with 'sudo' on macOS, fixing #122
    • c6f4f01 Update README.md
    • 586b3c7 Update openssl patch from 1.0.2p to 1.0.2q on macOS
    • 0b4475e Update Python from 3.6.7, 3.7.1 to 3.6.8, 3.7.2 on macOS
    • 38b3b0a Merge pull request #114 from YannickJadoul/deterministic-preamble-order
    • 5adfce9 Merge pull request #113 from xanderyzwich/master
    • bc83839 Sorting build options dict items when printing preamble
    • 481b1cb Revert "Uninstalling oclint in Travis CI config to fix HomeBrew upgrade of gc...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies 
    opened by dependabot-preview[bot] 5
  • Add encodebytes function

    Add encodebytes function

    A newline needs to be inserted after every 76 characters.

    https://docs.python.org/2/library/base64.html#base64.encodestring https://docs.python.org/2/library/base64.html#base64.decodestring

    enhancement 
    opened by thestick613 5
  • pybase64 returns invalid results on Windows

    pybase64 returns invalid results on Windows

    pybase64 encode created not base64 encoded stream

    Hi there,

    I wanted to encode an image:

    import requests import pybase64

    image_url = 'http://www.123freeicons.com/wp-content/uploads/Images/Nature/003-tick-weather-icons-l.jpg'
    image = requests.get(image_url).content
    image_base64 = pybase64.b64encode(image)
    

    the returned stream contained non ascii characters. Maybe "just" encode and decode are exchanged (I did not try). But the same behaviour is found when used standrad or url_safe encoding.

    used: windows 7 64 bit, Python 3.6.1 64 bit 4 cores cpu

    checked standard lib, it created good base64 encoding

    BR, George

    bug 
    opened by GeorgeFischhof 5
  • Bump cibuildwheel from 0.10.1 to 0.10.2

    Bump cibuildwheel from 0.10.1 to 0.10.2

    Bumps cibuildwheel from 0.10.1 to 0.10.2.

    Commits
    • 054c273 Bump version
    • 87a9d17 Merge pull request #131 from mayeut/openssl-1.0.2r
    • 1d3c59d Update openssl patch from 1.0.2q to 1.0.2r on macOS
    • 0b791db Merge pull request #130 from YannickJadoul/macos-python-2.7.16
    • 44256e4 Revert "Running 'pip install --upgrade setuptools' with 'sudo' on macOS, fixi...
    • b579cd5 Updating version of Python 2.7 to 2.7.16 on macOS
    • 8523b25 Merge pull request #128 from YannickJadoul/fix-bashlex-install-permission
    • 637a251 Fixing issue #127 by avoiding bashlex 0.13 in 'install_requires'
    • a6ff864 Merge pull request #125 from ushuz/patch-1
    • 79f0443 Add missing date to changelog
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies python 
    opened by dependabot-preview[bot] 4
  • build(deps): bump sphinx from 5.3.0 to 6.0.0

    build(deps): bump sphinx from 5.3.0 to 6.0.0

    Bumps sphinx from 5.3.0 to 6.0.0.

    Release notes

    Sourced from sphinx's releases.

    v6.0.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b2

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 6.0.0 (released Dec 29, 2022)

    Dependencies

    • #10468: Drop Python 3.6 support
    • #10470: Drop Python 3.7, Docutils 0.14, Docutils 0.15, Docutils 0.16, and Docutils 0.17 support. Patch by Adam Turner

    Incompatible changes

    • #7405: Removed the jQuery and underscore.js JavaScript frameworks.

      These frameworks are no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript to modern standards, or use the mitigation below.

      The first option is to use the sphinxcontrib.jquery_ extension, which has been developed by the Sphinx team and contributors. To use this, add sphinxcontrib.jquery to the extensions list in conf.py, or call app.setup_extension("sphinxcontrib.jquery") if you develop a Sphinx theme or extension.

      The second option is to manually ensure that the frameworks are present. To re-add jQuery and underscore.js, you will need to copy jquery.js and underscore.js from the Sphinx repository_ to your static directory, and add the following to your layout.html:

      .. code-block:: html+jinja

      {%- block scripts %} {{ super() }} {%- endblock %}

      .. _sphinxcontrib.jquery: https://github.com/sphinx-contrib/jquery/

      Patch by Adam Turner.

    • #10471, #10565: Removed deprecated APIs scheduled for removal in Sphinx 6.0. See :ref:dev-deprecated-apis for details. Patch by Adam Turner.

    • #10901: C Domain: Remove support for parsing pre-v3 style type directives and roles. Also remove associated configuration variables c_allow_pre_v3 and c_warn_on_allowed_pre_v3. Patch by Adam Turner.

    Features added

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 3
  • Bump setuptools from 50.3.2 to 51.0.0

    Bump setuptools from 50.3.2 to 51.0.0

    Bumps setuptools from 50.3.2 to 51.0.0.

    Changelog

    Sourced from setuptools's changelog.

    v51.0.0

    Breaking Changes

    • #2435: Require Python 3.6 or later.

    Documentation changes

    • #2430: Fixed inconsistent RST title nesting levels caused by #2399 -- by webknjaz
    • #2430: Fixed a typo in Sphinx docs that made docs dev section disappear as a result of PR #2426 -- by webknjaz

    Misc

    • #2471: Removed the tests that guarantee that the vendored dependencies can be built by distutils.
    Commits
    • b6bbe23 Bump version: 50.3.2 → 51.0.0
    • 7f477c5 Merge pull request #2472 from pypa/bugfix/2471-remove-deps
    • 2a0463c Update changelog.
    • 99bc2c1 Remove tests guaranteeing that (vendored) dependencies can be installed witho...
    • 6544183 Remove conditional skip, no longer relevant.
    • 9365c7e Merge pull request #2468 from wimglenn/patch-1
    • 43b0b81 Merge pull request #2461 from webknjaz/testing/gha-fix-set-env-usage
    • 43f7600 Merge pull request #2460 from HaraldKorneliussen/master
    • 2065f85 Merge pull request #2444 from zegor/patch-1
    • e961759 Merge pull request #2439 from mgedmin/patch-1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies python 
    opened by dependabot-preview[bot] 3
  • Bump pytest from 4.5.0 to 4.6.1

    Bump pytest from 4.5.0 to 4.6.1

    Bumps pytest from 4.5.0 to 4.6.1.

    Changelog

    Sourced from pytest's changelog.

    pytest 4.6.1 (2019-06-02)

    Bug Fixes

    • #5354: Fix pytest.mark.parametrize when the argvalues is an iterator.
    • #5358: Fix assertion rewriting of all() calls to deal with non-generators.

    pytest 4.6.0 (2019-05-31)

    Important

    The 4.6.X series will be the last series to support Python 2 and Python 3.4.

    For more details, see our Python 2.7 and 3.4 support plan.

    Features

    • #4559: Added the junit_log_passing_tests ini value which can be used to enable or disable logging of passing test output in the Junit XML file.
    • #4956: pytester's testdir.spawn uses tmpdir as HOME/USERPROFILE directory.
    • #5062: Unroll calls to all to full for-loops with assertion rewriting for better failure messages, especially when using Generator Expressions.
    • #5063: Switch from pkg_resources to importlib-metadata for entrypoint detection for improved performance and import time.
    • #5091: The output for ini options in --help has been improved.
    • #5269: pytest.importorskip includes the ImportError now in the default reason.
    • #5311: Captured logs that are output for each failing test are formatted using the ColoredLevelFormatter.
    • #5312: Improved formatting of multiline log messages in Python 3.

    Bug Fixes

    • #2064: The debugging plugin imports the wrapped Pdb class (--pdbcls) on-demand now.
    • #4908: The pytest_enter_pdb hook gets called with post-mortem (--pdb).
    • #5036: Fix issue where fixtures dependent on other parametrized fixtures would be erroneously parametrized.
    • #5256: Handle internal error due to a lone surrogate unicode character not being representable in Jython.
    • #5257: Ensure that sys.stdout.mode does not include 'b' as it is a text stream.
    • #5278: Pytest's internal python plugin can be disabled using -p no:python again.
    • #5286: Fix issue with disable_test_id_escaping_and_forfeit_all_rights_to_community_support option not working when using a list of test IDs in parametrized tests.
    • #5330: Show the test module being collected when emitting PytestCollectionWarning messages for test classes with __init__ and __new__ methods to make it easier to pin down the problem.
    • #5333: Fix regression in 4.5.0 with --lf not re-running all tests with known failures from non-selected tests.

    Improved Documentation

    • #5250: Expand docs on use of setenv and delenv with monkeypatch.
    Commits
    • abb853f Preparing release version 4.6.1
    • 8208a37 Merge pull request #5361 from asottile/backport_5360
    • f078984 Fix all() unroll for non-generators/non-list comprehensions (#5360)
    • dba62f8 [4.6] Fix pytest.mark.parametrize when the argvalue is an iterator (#5357)
    • f7bf914 Fix pytest.mark.parametrize when the argvalue is an iterator
    • 917195e Merge pull request #5350 from asottile/release-4.6.0
    • e7cd00a Preparing release version 4.6.0
    • 693c3b7 Merge pull request #5349 from asottile/mm
    • fb3ae5e Merge remote-tracking branch 'origin/master' into mm
    • c8d23c2 logging: Improve formatting of multiline message (#5312)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies python 
    opened by dependabot-preview[bot] 3
  • Bump pytest from 4.4.2 to 4.5.0

    Bump pytest from 4.4.2 to 4.5.0

    Bumps pytest from 4.4.2 to 4.5.0.

    Changelog

    Sourced from pytest's changelog.

    pytest 4.5.0 (2019-05-11)

    Features

    • #4826: A warning is now emitted when unknown marks are used as a decorator. This is often due to a typo, which can lead to silently broken tests.

    • #4907: Show XFail reason as part of JUnitXML message field.

    • #5013: Messages from crash reports are displayed within test summaries now, truncated to the terminal width.

    • #5023: New flag --strict-markers that triggers an error when unknown markers (e.g. those not registered using the markers option in the configuration file) are used in the test suite.

      The existing --strict option has the same behavior currently, but can be augmented in the future for additional checks.

    • #5026: Assertion failure messages for sequences and dicts contain the number of different items now.

    • #5034: Improve reporting with --lf and --ff (run-last-failure).

    • #5035: The --cache-show option/action accepts an optional glob to show only matching cache entries.

    • #5059: Standard input (stdin) can be given to pytester's Testdir.run() and Testdir.popen().

    • #5068: The -r option learnt about A to display all reports (including passed ones) in the short test summary.

    • #5108: The short test summary is displayed after passes with output (-rP).

    • #5172: The --last-failed (--lf) option got smarter and will now skip entire files if all tests of that test file have passed in previous runs, greatly speeding up collection.

    • #5177: Introduce new specific warning PytestWarning subclasses to make it easier to filter warnings based on the class, rather than on the message. The new subclasses are:

      • PytestAssertRewriteWarning
      • PytestCacheWarning
      • PytestCollectionWarning
      • PytestConfigWarning
      • PytestUnhandledCoroutineWarning
      • PytestUnknownMarkWarning
    • #5202: New record_testsuite_property session-scoped fixture allows users to log <property> tags at the testsuite level with the junitxml plugin.

      The generated XML is compatible with the latest xunit standard, contrary to the properties recorded by record_property and record_xml_attribute.

    • #5214: The default logging format has been changed to improve readability. Here is an example of a previous logging message:

      test_log_cli_enabled_disabled.py    3 CRITICAL critical message logged by test
      

      This has now become:

      CRITICAL root:test_log_cli_enabled_disabled.py:3 critical message logged by test
      

      The formatting can be changed through the log_format configuration option.

    • #5220: --fixtures now also shows fixture scope for scopes other than "function".

    Bug Fixes

    • #5113: Deselected items from plugins using pytest_collect_modifyitems as a hookwrapper are correctly reported now.
    • #5144: With usage errors exitstatus is set to EXIT_USAGEERROR in the pytest_sessionfinish hook now as expected.
    • #5235: outcome.exit is not used with EOF in the pdb wrapper anymore, but only with quit.
    ... (truncated)
    Commits
    • 63fe547 Preparing release version 4.5.0
    • b709e61 Merge remote-tracking branch 'upstream/master' into release-4.5.0
    • 465b2d9 Further "unknown marks warning" improvements (#5178)
    • 184ef92 Introduce record_testsuite_property fixture (#5205)
    • 73bbff2 Introduce record_testsuite_property fixture
    • 4ccaa98 Merge pull request #5240 from nicoddemus/tidelift
    • 3a4a815 Merge master into features (#5233)
    • dae455e Add Tidelift management docs and blurb on README, as discussed in the ML
    • 0594dba Remove unused markers and enable --strict-markers
    • f1183c2 Remove the 'issue' marker from test suite
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies python 
    opened by dependabot-preview[bot] 3
  • Bump tox from 3.8.3 to 3.8.4

    Bump tox from 3.8.3 to 3.8.4

    Bumps tox from 3.8.3 to 3.8.4.

    Changelog

    Sourced from tox's changelog.

    v3.8.4 (2019-04-01)

    Bugfixes

    • Fix sdist creation on python2.x when there is non-ascii output. #1234
    • fix typos in isolated.py that made it impossible to install package with requirements in pyproject.toml - by unmade #1236
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies python 
    opened by dependabot-preview[bot] 3
  • Bump sphinx from 1.8.4 to 1.8.5

    Bump sphinx from 1.8.4 to 1.8.5

    Bumps sphinx from 1.8.4 to 1.8.5.

    Changelog

    Sourced from sphinx's changelog.

    Release 1.8.5 (released Mar 10, 2019)

    Bugs fixed

    • LaTeX: Remove extraneous space after author names on PDF title page (refs: #6004)
    • #6026: LaTeX: A cross reference to definition list does not work
    • #6046: LaTeX: TypeError is raised when invalid latex_elements given
    • #6067: LaTeX: images having a target are concatenated to next line
    • #6067: LaTeX: images having a target are not aligned even if specified
    • #6149: LaTeX: :index: role in titles causes Use of \[@&#8203;icentercr](https://github.com/icentercr) doesn't match its definition error on latexpdf build
    • #6019: imgconverter: Including multipage PDF fails
    • #6047: autodoc: autofunction emits a warning for method objects
    • #6028: graphviz: Ensure the graphviz filenames are reproducible
    • #6068: doctest: skipif option may remove the code block from documentation
    • #6136: :name: option for math directive causes a crash
    • #6139: intersphinx: ValueError on failure reporting
    • #6135: changes: Fix UnboundLocalError when any module found
    • #3859: manpage: code-block captions are not displayed correctly
    Commits
    • 591bdd7 Bump to 1.8.5 final
    • f44aa23 Merge pull request #6159 from tk0miya/3859_code-block_captions_for_manpage
    • fc99687 Fix #3859: manpage: code-block captions are not displayed correctly
    • f57041a Merge pull request #6152 from tk0miya/6149_index_on_title
    • 05d3e37 Fix #6149: LaTeX: :index: role titles causes build error of LaTeX
    • 9f283bc Merge pull request #6153 from tk0miya/use_bionic_on_circleci
    • f61a5f9 Fix test: imgconverter expects size of images fixed
    • f7315ed Use bionic (py36) on Circle CI
    • f03c2d4 Update CHANGES for PR #6135
    • 7c50f8f Merge pull request #6135 from bz2/changes_module_1.8
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)

    Finally, you can contact us by mentioning @dependabot.

    dependencies python 
    opened by dependabot-preview[bot] 3
  • build(deps): bump sphinx from 5.3.0 to 6.1.1

    build(deps): bump sphinx from 5.3.0 to 6.1.1

    Bumps sphinx from 5.3.0 to 6.1.1.

    Release notes

    Sourced from sphinx's releases.

    v6.1.1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.1.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b2

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    v6.0.0b1

    Changelog: https://www.sphinx-doc.org/en/master/changes.html

    Changelog

    Sourced from sphinx's changelog.

    Release 6.1.1 (released Jan 05, 2023)

    Bugs fixed

    • #11091: Fix util.nodes.apply_source_workaround for literal_block nodes with no source information in the node or the node's parents.

    Release 6.1.0 (released Jan 05, 2023)

    Dependencies

    Incompatible changes

    • #10979: gettext: Removed support for pluralisation in get_translation. This was unused and complicated other changes to sphinx.locale.

    Deprecated

    • sphinx.util functions:

      • Renamed sphinx.util.typing.stringify() to sphinx.util.typing.stringify_annotation()
      • Moved sphinx.util.xmlname_checker() to sphinx.builders.epub3._XML_NAME_PATTERN

      Moved to sphinx.util.display:

      • sphinx.util.status_iterator
      • sphinx.util.display_chunk
      • sphinx.util.SkipProgressMessage
      • sphinx.util.progress_message

      Moved to sphinx.util.http_date:

      • sphinx.util.epoch_to_rfc1123
      • sphinx.util.rfc1123_to_epoch

      Moved to sphinx.util.exceptions:

      • sphinx.util.save_traceback

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 1
Releases(v1.2.3)
Owner
Matthieu Darbois
Matthieu Darbois
Cairo-integer-types - A library for bitwise integer types (e.g. int64 or uint32) in Cairo, with a test suite

The Cairo bitwise integer library (cairo-bitwise-int v0.1.1) The Cairo smart tes

27 Sep 23, 2022
Includes Chapters for Python Crash Course session.

python-crash-course Includes Chapters for Python Crash Course session. What will you learn: Python Essentials Creating Server Writing REST API Writing

Vineet Rao 3 Feb 17, 2021
Completed task 1 and task 2 at LetsGrowMore as a data science intern.

LetsGrowMore-Internship Completed task 1 and task 2 at LetsGrowMore as a data science intern. Task 1- Task 2- Creating a Decision Tree classifier and

Sanjyot Panure 1 Jan 16, 2022
The official repository of iGEM Paris Bettencourt team's software tools.

iGEM_ParisBettencourt21 The official repository of iGEM Paris Bettencourt team's software tools. Cell counting There are two programs dedicated to the

Abhay Koushik 1 Oct 21, 2021
Программа для практической работы №12 по дисциплине

Информатика: программа для практической работы №12 Код и блок-схема программы для практической работы №12 по дисциплине "Информатика" (I семестр). Сут

Vladislav 1 Dec 07, 2021
A python script made for personal use to monitor for sports card restocks on target.com since they are sold out often

TargetProductMonitor A python script made for personal use to monitor for sports card resocks on target.com since they are sold out often. When a rest

Bryan Lorden 2 Jul 31, 2022
Built as part of an assignment for S5 OOSE Subject CSE

Installation Steps: Download and install Python from here based on your operating system. I have used Python v3.8.10 for this. Clone the repository gi

Abhinav Rajesh 2 Sep 09, 2022
✔️ Create to-do lists to easily manage your ideas and work.

Todo List + Add task + Remove task + List completed task + List not completed task + Set clock task time + View task statistics by date Changelog v 1.

Abbas Ataei 30 Nov 28, 2022
Pypot ⚙️ A Python library for Dynamixel motor control

Pypot ⚙️ A Python library for Dynamixel motor control Pypot is a cross-platform Python library making it easy and fast to control custom robots based

Poppy Project 238 Nov 21, 2022
Easytile blender - Simple Blender 2.83 addon for tiling meshes easily

easytile_blender Dead simple, barebones Blender (2.83) addon for placing meshes as tiles. Installation In Blender, go to Edit Preferences Add-ons

Sam Gibson 6 Jul 19, 2022
Eatlocal - This package helps users solve PyBites code challenges on their local machine

eatlocal This package helps the user solve Pybites code challenges locally. Inst

Russell 0 Jul 25, 2022
Advanced Variable Manager {AVM} [0.8.0]

Advanced Variable Manager {AVM} [0.8.0] By Grosse pastèque#6705 WARNING : This modules need some typing modifications ! If you try to run it without t

Big watermelon 1 Dec 11, 2021
Create Arrays (Working with For Loops)

DSA with Python Create Arrays (Working with For Loops) CREATING ARRAYS WITH USER INPUT Array is a collection of items stored at contiguous memory loca

1 Feb 08, 2022
Herramienta para pentesting web.

iTell 🕴 ¡Tool con herramientas para pentesting web! Metodos ❣ DDoS Attacks Recon Active Recon (Vulns) Extras (Bypass CF, FTP && SSH Bruter) Respons

1 Jul 28, 2022
Linux Pressure Stall Information (PSI) Status App

Linux Pressure Stall Information (PSI) Status App psistat is a simple python3 program to display the PSIs and to capture/display exception events. psi

Joe D 3 Sep 18, 2022
An early stage integration of Hotwire Turbo with Django

Note: This is not ready for production. APIs likely to change dramatically. Please drop by our Slack channel to discuss!

Hotwire for Django 352 Jan 06, 2023
Stop python warnings, no matter what!

SHUTUP - Stop python warnings, no matter what! Sometimes you just can't mute python warnings. Use this library to solve this. Installation pip install

80 Jan 04, 2023
Simple Python API for the Ergo Platform Explorer

Ergo is a "Resilient Platform for Contractual Money." It is designed to be a platform for applications with the main focus to provide an efficient, se

7 Jul 06, 2021
Socorro is the Mozilla crash ingestion pipeline. It accepts and processes Breakpad-style crash reports. It provides analysis tools.

Socorro Socorro is a Mozilla-centric ingestion pipeline and analysis tools for crash reports using the Breakpad libraries. Support This is a Mozilla-s

Mozilla Services 552 Dec 19, 2022
A professional version for LBS

呐 Yuki Pro~ 懒兵服御用版本,yuki小姐觉得没必要单独造一个仓库,但懒兵觉得有必要并强制执行 将na-yuki框架抽象为模块,功能拆分为独立脚本,使用脚本注释器使其作为py运行 文件结构: na_yuki_pro_example.py 是一个说明脚本,用来直观展示na,yuki! Pro

1 Dec 21, 2021