Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cookiecutterrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default_context:
codecov: 'yes'
command_line_interface: 'no'
command_line_interface_bin_name: '-'
coveralls: 'no'
coveralls: 'yes'
distribution_name: tblib
email: [email protected]
formatter_quote_style: single
Expand Down
108 changes: 27 additions & 81 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,217 +17,163 @@ jobs:
python: '3.13'
tox_env: 'docs'
os: 'ubuntu-latest'
- name: 'py39 (ubuntu)'
- name: 'py39 (ubuntu/x64)'
python: '3.9'
python_arch: 'x64'
tox_env: 'py39'
os: 'ubuntu-latest'
cover: true
- name: 'py39 (windows)'
- name: 'py39 (windows/x64)'
python: '3.9'
python_arch: 'x64'
tox_env: 'py39'
os: 'windows-latest'
cover: true
- name: 'py39 (windows)'
python: '3.9'
python_arch: 'x86'
tox_env: 'py39'
os: 'windows-latest'
cover: true
- name: 'py39 (macos)'
- name: 'py39 (macos/arm64)'
python: '3.9'
python_arch: 'arm64'
tox_env: 'py39'
os: 'macos-latest'
cover: true
- name: 'py310 (ubuntu)'
- name: 'py310 (ubuntu/x64)'
python: '3.10'
python_arch: 'x64'
tox_env: 'py310'
os: 'ubuntu-latest'
cover: true
- name: 'py310 (windows)'
- name: 'py310 (windows/x64)'
python: '3.10'
python_arch: 'x64'
tox_env: 'py310'
os: 'windows-latest'
cover: true
- name: 'py310 (windows)'
python: '3.10'
python_arch: 'x86'
tox_env: 'py310'
os: 'windows-latest'
cover: true
- name: 'py310 (macos)'
- name: 'py310 (macos/arm64)'
python: '3.10'
python_arch: 'arm64'
tox_env: 'py310'
os: 'macos-latest'
cover: true
- name: 'py311 (ubuntu)'
- name: 'py311 (ubuntu/x64)'
python: '3.11'
python_arch: 'x64'
tox_env: 'py311'
os: 'ubuntu-latest'
cover: true
- name: 'py311 (windows)'
- name: 'py311 (windows/x64)'
python: '3.11'
python_arch: 'x64'
tox_env: 'py311'
os: 'windows-latest'
cover: true
- name: 'py311 (windows)'
python: '3.11'
python_arch: 'x86'
tox_env: 'py311'
os: 'windows-latest'
cover: true
- name: 'py311 (macos)'
- name: 'py311 (macos/arm64)'
python: '3.11'
python_arch: 'arm64'
tox_env: 'py311'
os: 'macos-latest'
cover: true
- name: 'py312 (ubuntu)'
- name: 'py312 (ubuntu/x64)'
python: '3.12'
python_arch: 'x64'
tox_env: 'py312'
os: 'ubuntu-latest'
cover: true
- name: 'py312 (windows)'
- name: 'py312 (windows/x64)'
python: '3.12'
python_arch: 'x64'
tox_env: 'py312'
os: 'windows-latest'
cover: true
- name: 'py312 (windows)'
python: '3.12'
python_arch: 'x86'
tox_env: 'py312'
os: 'windows-latest'
cover: true
- name: 'py312 (macos)'
- name: 'py312 (macos/arm64)'
python: '3.12'
python_arch: 'arm64'
tox_env: 'py312'
os: 'macos-latest'
cover: true
- name: 'py313 (ubuntu)'
- name: 'py313 (ubuntu/x64)'
python: '3.13'
python_arch: 'x64'
tox_env: 'py313'
os: 'ubuntu-latest'
cover: true
- name: 'py313 (windows)'
- name: 'py313 (windows/x64)'
python: '3.13'
python_arch: 'x64'
tox_env: 'py313'
os: 'windows-latest'
cover: true
- name: 'py313 (windows)'
python: '3.13'
python_arch: 'x86'
tox_env: 'py313'
os: 'windows-latest'
cover: true
- name: 'py313 (macos)'
- name: 'py313 (macos/arm64)'
python: '3.13'
python_arch: 'arm64'
tox_env: 'py313'
os: 'macos-latest'
cover: true
- name: 'py314 (ubuntu)'
- name: 'py314 (ubuntu/x64)'
python: '3.14'
python_arch: 'x64'
tox_env: 'py314'
os: 'ubuntu-latest'
cover: true
- name: 'py314 (windows)'
- name: 'py314 (windows/x64)'
python: '3.14'
python_arch: 'x64'
tox_env: 'py314'
os: 'windows-latest'
cover: true
- name: 'py314 (windows)'
python: '3.14'
python_arch: 'x86'
tox_env: 'py314'
os: 'windows-latest'
cover: true
- name: 'py314 (macos)'
- name: 'py314 (macos/arm64)'
python: '3.14'
python_arch: 'arm64'
tox_env: 'py314'
os: 'macos-latest'
cover: true
- name: 'pypy39 (ubuntu)'
- name: 'pypy39 (ubuntu/x64)'
python: 'pypy-3.9'
python_arch: 'x64'
tox_env: 'pypy39'
os: 'ubuntu-latest'
cover: true
- name: 'pypy39 (windows)'
- name: 'pypy39 (windows/x64)'
python: 'pypy-3.9'
python_arch: 'x64'
tox_env: 'pypy39'
os: 'windows-latest'
cover: true
- name: 'pypy39 (windows)'
python: 'pypy-3.9'
python_arch: 'x86'
tox_env: 'pypy39'
os: 'windows-latest'
cover: true
- name: 'pypy39 (macos)'
- name: 'pypy39 (macos/arm64)'
python: 'pypy-3.9'
python_arch: 'arm64'
tox_env: 'pypy39'
os: 'macos-latest'
cover: true
- name: 'pypy310 (ubuntu)'
- name: 'pypy310 (ubuntu/x64)'
python: 'pypy-3.10'
python_arch: 'x64'
tox_env: 'pypy310'
os: 'ubuntu-latest'
cover: true
- name: 'pypy310 (windows)'
- name: 'pypy310 (windows/x64)'
python: 'pypy-3.10'
python_arch: 'x64'
tox_env: 'pypy310'
os: 'windows-latest'
cover: true
- name: 'pypy310 (windows)'
python: 'pypy-3.10'
python_arch: 'x86'
tox_env: 'pypy310'
os: 'windows-latest'
cover: true
- name: 'pypy310 (macos)'
- name: 'pypy310 (macos/arm64)'
python: 'pypy-3.10'
python_arch: 'arm64'
tox_env: 'pypy310'
os: 'macos-latest'
cover: true
- name: 'pypy311 (ubuntu)'
- name: 'pypy311 (ubuntu/x64)'
python: 'pypy-3.11'
python_arch: 'x64'
tox_env: 'pypy311'
os: 'ubuntu-latest'
cover: true
- name: 'pypy311 (windows)'
- name: 'pypy311 (windows/x64)'
python: 'pypy-3.11'
python_arch: 'x64'
tox_env: 'pypy311'
os: 'windows-latest'
cover: true
- name: 'pypy311 (windows)'
python: 'pypy-3.11'
python_arch: 'x86'
tox_env: 'pypy311'
os: 'windows-latest'
cover: true
- name: 'pypy311 (macos)'
- name: 'pypy311 (macos/arm64)'
python: 'pypy-3.11'
python_arch: 'arm64'
tox_env: 'pypy311'
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: debug-statements
12 changes: 4 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,33 @@ Overview
* - docs
- |docs|
* - tests
- |github-actions| |codecov|
- |github-actions| |coveralls| |codecov|
* - package
- |version| |wheel| |supported-versions| |supported-implementations| |commits-since|
.. |docs| image:: https://readthedocs.org/projects/python-tblib/badge/?style=flat
:target: https://readthedocs.org/projects/python-tblib/
:alt: Documentation Status

.. |github-actions| image:: https://github.com/ionelmc/python-tblib/actions/workflows/github-actions.yml/badge.svg
:alt: GitHub Actions Build Status
:target: https://github.com/ionelmc/python-tblib/actions

.. |coveralls| image:: https://coveralls.io/repos/github/ionelmc/python-tblib/badge.svg?branch=master
:alt: Coverage Status
:target: https://coveralls.io/github/ionelmc/python-tblib?branch=master
.. |codecov| image:: https://codecov.io/gh/ionelmc/python-tblib/branch/master/graphs/badge.svg?branch=master
:alt: Coverage Status
:target: https://app.codecov.io/github/ionelmc/python-tblib

.. |version| image:: https://img.shields.io/pypi/v/tblib.svg
:alt: PyPI Package latest release
:target: https://pypi.org/project/tblib

.. |wheel| image:: https://img.shields.io/pypi/wheel/tblib.svg
:alt: PyPI Wheel
:target: https://pypi.org/project/tblib

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/tblib.svg
:alt: Supported versions
:target: https://pypi.org/project/tblib

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/tblib.svg
:alt: Supported implementations
:target: https://pypi.org/project/tblib

.. |commits-since| image:: https://img.shields.io/github/commits-since/ionelmc/python-tblib/v3.1.0.svg
:alt: Commits since latest release
:target: https://github.com/ionelmc/python-tblib/compare/v3.1.0...master
Expand Down
5 changes: 2 additions & 3 deletions ci/templates/.github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ jobs:
{% for os, python_arch in [
['ubuntu', 'x64'],
['windows', 'x64'],
['windows', 'x86'],
['macos', 'arm64'],
] %}
- name: '{{ env }} ({{ os }})'
- name: '{{ env }} ({{ os }}/{{ python_arch }})'
python: '{{ python }}'
python_arch: '{{ python_arch }}'
tox_env: '{{ env }}'
Expand Down Expand Up @@ -79,4 +78,4 @@ jobs:
- uses: coverallsapp/github-action@v2
with:
parallel-finished: true
{{ '' }}
{{- '' }}
14 changes: 7 additions & 7 deletions src/tblib/pickling_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ def pickle_exception(
'args': obj.args,
}
if isinstance(obj, OSError):
attrs.update(
errno=obj.errno,
strerror=obj.strerror,
winerror=getattr(obj, 'winerror', None),
filename=obj.filename,
filename2=obj.filename2,
)
attrs.update(errno=obj.errno, strerror=obj.strerror)
if (winerror := getattr(obj, 'winerror', None)) is not None:
attrs['winerror'] = winerror
if obj.filename is not None:
attrs['filename'] = obj.filename
if obj.filename2 is not None:
attrs['filename2'] = obj.filename2

return (
unpickle_exception_with_attrs,
Expand Down
Loading