summaryrefslogtreecommitdiffstats
path: root/Lib/base64.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-61199: Remove superfluous global statements from ↵Romuald Brunet2023-11-071-2/+0
| | | | | `base64._b32{en,de}code()*` (GH-111785) Minor cleanup after commit 4ce6faa6c9591de6079347eccc9e61ae4e8d9e31
* GH-102456: Fix docstring and getopt options for base64 (gh-102457)Partha P. Mukherjee2023-04-021-2/+2
|
* bpo-45975: Simplify some while-loops with walrus operator (GH-29347)Nick Drozd2022-11-261-12/+3
|
* gh-93096: Remove `python -m base64 -t` (gh-94230)Oleg Iarygin2022-07-021-14/+2
|
* bpo-35970: Add help flag to base64 module (GH-28774)Ammar Askar2021-10-071-5/+8
| | | This continues off rkuska's work from https://github.com/python/cpython/pull/11789 seeing as the patch wasn't updated to add tests.
* bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465)Raymond Hettinger2021-09-201-3/+3
|
* bpo-44690: Adopt binacii.a2b_base64's strict mode in base64.b64decode (GH-27272)Idan Moral2021-08-231-3/+4
| | | | | | | * Use binascii.a2b_base64 to validate b64decode input. This change leads to exception messages changes (mostly). * Added more information to docstring of b64decode * Added a reference to binascii.a2b_base64 in the docs
* bpo-39068: Fix race condition in base64 (GH-17627)Brandon Stansbury2020-12-311-2/+2
| | | | There was a race condition in base64 in lazy initialization of multiple globals.
* bpo-16995: add support for base32 extended hex (base32hex) (GH-20441)Filipe Laíns2020-08-101-31/+55
| | | | | cc @pganssle Automerge-Triggered-By: @pganssle
* bpo-39351: Remove base64.encodestring() (GH-18022)Victor Stinner2020-01-161-16/+0
| | | | | Remove base64.encodestring() and base64.decodestring(), aliases deprecated since Python 3.1: use base64.encodebytes() and base64.decodebytes() instead.
* bpo-39055: Reject a trailing \n in base64.b64decode() with validate=True. ↵Serhiy Storchaka2020-01-051-1/+1
| | | | (GH-17616)
* bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351)Serhiy Storchaka2018-07-241-12/+5
| | | | | Now base64.Error is always raised instead of UnboundLocalError or OverflowError.
* Add Python version since deprecation in base64 methods. (#33)Matthias Bussonnier2017-03-021-2/+4
| | | | | | Allow developers to not have to either test on N Python versions or looked through multiple versions of the docs to know whether they can easily update.
* Use sequence repetition instead of bytes constructor with integer argument.Serhiy Storchaka2016-09-111-1/+1
|
* Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True.Serhiy Storchaka2016-02-241-4/+9
|\ | | | | | | Patch by Swati Jaiswal.
| * Issue #25913: Leading <~ is optional now in base64.a85decode() with adobe=True.Serhiy Storchaka2016-02-241-4/+9
| | | | | | | | Patch by Swati Jaiswal.
* | Issue #22088: Merge base64 docs from 3.5Martin Panter2016-02-241-64/+58
|\ \ | |/
| * Issue #22088: Clarify base-64 alphabets and which characters are discardedMartin Panter2016-02-231-64/+58
| | | | | | | | | | | | | | | | | | | | * There are only two base-64 alphabets defined by the RFCs, not three * Due to the internal translation, plus (+) and slash (/) are never discarded * standard_ and urlsafe_b64decode() discard characters as well Also update the doc strings to clarify data types, based on revision 92760d2edc9e, correct the exception raised by b16decode(), and correct the parameter name for the base-85 functions.
* | Issue #25357: Add an optional newline paramer to binascii.b2a_base64().Victor Stinner2015-10-111-2/+1
|/ | | | base64.b64encode() uses it to avoid a memory copy.
* Escaped backslashes in docstrings.Serhiy Storchaka2015-04-031-2/+2
|
* Issue #20879: Delay the initialization of encoding and decoding tables forVictor Stinner2014-03-171-17/+42
| | | | | | base32, ascii85 and base85 codecs in the base64 module, and delay the initialization of the unquote_to_bytes() table of the urllib.parse module, to not waste memory if these modules are not used.
* Closes issue #20728: Remove unused import added in rev 42366e293b7b andTerry Jan Reedy2014-03-021-1/+0
| | | | noticed by Claudiu Popa.
* Issue #20363. Fixed BytesWarning triggerred by test suite.Serhiy Storchaka2014-02-061-1/+1
|\ | | | | | | Patch by Berker Peksag.
* | Issue #17618: Add Base85 and Ascii85 encoding/decoding to the base64 module.Antoine Pitrou2013-11-171-1/+190
| |
* | Close #17839: support bytes-like objects in base64 moduleNick Coghlan2013-10-021-16/+24
| | | | | | | | | | | | | | | | | | This mostly affected the encodebytes and decodebytes function (which are used by base64_codec) Also added a test to ensure all bytes-bytes codecs can handle memoryview input and tests for handling of multidimensional and non-bytes format input in the modern base64 API.
* | Issue #18011: Silence an unrelated noise introduced in changeset 1b5ef05d6ced.Serhiy Storchaka2013-05-281-1/+1
| |
* | Issue #18011: base64.b32decode() now raises a binascii.Error if there areSerhiy Storchaka2013-05-281-1/+1
|\ \ | |/ | | | | | | non-alphabet characters present in the input string to conform a docstring. Updated the module documentation.
| * Issue #18011: base64.b32decode() now raises a binascii.Error if there areSerhiy Storchaka2013-05-281-1/+1
| | | | | | | | | | non-alphabet characters present in the input string to conform a docstring. Updated the module documentation.
* | Issue #17812: Fixed quadratic complexity of base64.b32encode().Serhiy Storchaka2013-05-191-77/+48
|\ \ | |/ | | | | Optimize base64.b32encode() and base64.b32decode() (speed up to 3x).
| * Issue #17812: Fixed quadratic complexity of base64.b32encode().Serhiy Storchaka2013-05-191-6/+6
|/
* Speed up base64.urlsafe_{en,de}code().Guido van Rossum2012-06-221-13/+11
|
* Issue #13641: Decoding functions in the base64 module now accept ASCII-only ↵Antoine Pitrou2012-02-201-11/+15
| | | | | | unicode strings. Patch by Catalin Iacob.
* #1466065: add validate option to base64.b64decodeR. David Murray2010-11-111-4/+9
| | | | | | | Patch by Neil Tallim. This provides a mechanism for module users to achieve RFC 3548 compliance in the cases where ignoring non-base64-alphabet input characters is *not* mandated by the RFC that references RFC 3548.
* Explicitly close some files (from issue #10093)Antoine Pitrou2010-10-141-1/+2
|
* Fix failure introduced in r83182.Ezio Melotti2010-07-281-1/+1
|
* Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer andVictor Stinner2010-05-251-2/+2
| | | | sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes API
* convert shebang lines: python -> python3Benjamin Peterson2010-03-111-1/+1
|
* Make b64encode raises properly a TypeError when altchars is not bytes.Alexandre Vassalotti2009-06-291-2/+2
|
* More codestring -> codebytes.Georg Brandl2009-06-041-2/+2
|
* #3613: add base64.encodebytes and decodebytes as the new spelling of ↵Georg Brandl2009-06-041-10/+18
| | | | encodestring and decodestring; deprecate the latter.
* #2834: Change re module semantics, so that str and bytes mixing is forbidden,Antoine Pitrou2008-08-191-7/+7
| | | | | and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead.
* Removed implicit convertions of str object to bytes from base64.Alexandre Vassalotti2008-05-031-9/+13
| | | | | | This also exposed some bugs in urlib2 and email.base64mime, which I tried my best to fix. However, someone will probably have to double check.
* Rename buffer -> bytearray.Guido van Rossum2007-11-211-13/+13
|
* Merging the py3k-pep3137 branch back into the py3k branch.Guido van Rossum2007-11-061-16/+19
| | | | | | | | | | | | | | No detailed change log; just check out the change log for the py3k-pep3137 branch. The most obvious changes: - str8 renamed to bytes (PyString at the C level); - bytes renamed to buffer (PyBytes at the C level); - PyString and PyUnicode are no longer compatible. I.e. we now have an immutable bytes type and a mutable bytes type. The behavior of PyString was modified quite a bit, to make it more bytes-like. Some changes are still on the to-do list.
* Forgot one. This makes test_urllib2.py pass.Guido van Rossum2007-08-291-1/+1
|
* Force test_xmlrpc to pass. I'm not happy with how I did this, but I don'tGuido van Rossum2007-08-271-4/+10
| | | | | see a better way; the 'Binary' class is poorly specified so it's unclear what behavior is relied upon.
* Fix some tests I broke. (More to follow.)Guido van Rossum2007-08-271-3/+6
|
* Changes in anticipation of stricter str vs. bytes enforcement.Guido van Rossum2007-08-271-7/+5
|
* Make test_base64 pass.Guido van Rossum2007-05-221-116/+139
| | | | | | Change binascii.Error to derive from ValueError and raise binascii.Error everywhere where values are bad (why on earth did the old code use TypeError?!?).
* - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;Guido van Rossum2007-02-111-3/+1
| | | | | | | | | | and .keys(), .items(), .values() return dict views. The dict views aren't fully functional yet; in particular, they can't be compared to sets yet. but they are useful as "iterator wells". There are still 27 failing unit tests; I expect that many of these have fairly trivial fixes, but there are so many, I could use help.