Skip to main content

Aids for code sharing between python2 and python3.

Project description

Latest release 20200229: Minor fixes.

Aids for code sharing between python2 and python3.

This package presents various names in python 3 flavour for common use in python 2 and python 3.

Function ustr(s, e='utf-8', errors='strict')

Upgrade string to unicode: no-op for python 3.

Release Log

Release 20200229: Minor fixes.

Release 20190729: Add DEVNULL, which only arrived with 3.3.

Release 20190331: cs.py3._for3.raise3: bugfix raise-with-traceback.

Release 20190108: New raise_from function to provide raise...from in py3 and plain raise in py2.

Release 20181108: Small import fix for pread.

Release 20180805: Implement pread for systems lacking os.pread.

Release 20170903: Make into a package subsuming cs.py3_for2 and cs.py3_for3. Implementation of struct.iter_unpack. Make bytes.eq work with str for Python 2. New name joinbytes for Python 2 and 3. Backports for Python 2.5.

Release 20160828: Use "install_requires" instead of "requires" in DISTINFO.

Release 20160827: Move python 2 and 3 specific code into cs.py3_for2 and cs.py3_for3. Do not bother with StringIO and BytesIO, modules can get them directly from the io module. Redo python 2 bytes class. Python3 compatible versions of struct.pack and struct.unpack.

Release 20150126: bugfix py2 ustr()

Release 20150120: cs.py3: add contains to python 2 bytes type

Release 20150112: Rerelease with separate README.rst file.

Release 20150111: ustr: accept errors= parameter, default "strict"; update PyPI distinfo and arrangements

Release 20150103: initial release tag for cs.py3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs.py3-20200229.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file cs.py3-20200229.tar.gz.

File metadata

  • Download URL: cs.py3-20200229.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for cs.py3-20200229.tar.gz
Algorithm Hash digest
SHA256 048341dba3ac0c4c736bf7f52831d8a59696d51293572fcd3d42419335e8df3b
MD5 d54f89b1c4a02a36efafc40bf7d8594b
BLAKE2b-256 324b3ea1eb9dc07a2c5cc6f279b6cf6106b0bc13db5a8c85cf19cd0ed1dcedd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page