Skip to content

Commit

Permalink
Merge pull request #63 from MatthieuDartiailh/fixes
Browse files Browse the repository at this point in the history
Fixes to prepare 0.2.1
  • Loading branch information
MatthieuDartiailh authored Oct 10, 2022
2 parents e716510 + 8b17cdd commit 1d4dbfc
Show file tree
Hide file tree
Showing 26 changed files with 38 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
- cron: '0 0 * * 3'
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
paths:
- .github/workflows/docs.yml
- pyclibrary/*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Build sdist
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ PyCLibrary is now maintained by Matthieu C. Dartiailh. <[email protected]>

Other contributors, listed alphabetically, are:
* Robert Hoelzl <[email protected]>
* Jasper Craeghs <[email protected]>

(If you think that your name belongs here, please let the maintainer know)
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PyCLibrary Changelog
0.2.1 - 10/10/2022
------------------

- do not mark wheel as universal anymore
- test compatibility with Python 3.10 PR #62
- test compatibility with pyparsing 3.x PR #62

Expand Down
2 changes: 0 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ comment:
coverage:
status:
patch: false
fixes:
- "~/anaconda/envs/travisci/Lib/site-packages/::"
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/backends/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/backends/ctypes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/c_library.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/c_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/errors.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/headers/update_WinDefs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
2 changes: 1 addition & 1 deletion pyclibrary/thirdparty/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-


1 change: 0 additions & 1 deletion pyclibrary/thirdparty/find_library.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Taken from PyVisa cthelper.

import os
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down
3 changes: 1 addition & 2 deletions pyclibrary/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
Expand All @@ -23,7 +22,7 @@

# The micro release number. The micro release number is incremented
# for bug fix releases and small feature additions.
MICRO = 0
MICRO = 1

# The status indicate if this is a development or pre-release version
STATUS = ''
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion tests/backends/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-


9 changes: 5 additions & 4 deletions tests/backends/test_ctypes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand All @@ -14,7 +14,8 @@
import os
import ctypes
import _ctypes_test
from pytest import raises

import pytest

from pyclibrary.utils import (add_header_locations, HEADER_DIRS)
from pyclibrary.c_library import CLibrary, cast_to, build_array
Expand Down Expand Up @@ -48,7 +49,7 @@ def test_call(self):
point_cls = self.library('structs', 'tagpoint')
point_cls(x=1, y=2)

with raises(KeyError):
with pytest.raises(KeyError):
self.library('r', 't')

def test_getattr(self):
Expand Down
5 changes: 2 additions & 3 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand All @@ -16,7 +15,7 @@
import pyclibrary.c_library as cl


@pytest.yield_fixture
@pytest.fixture
def init_fixture():
yield
cp.CParser._init = False
Expand Down
10 changes: 4 additions & 6 deletions tests/test_library.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand All @@ -14,7 +13,8 @@
import os
import _ctypes_test
import ctypes
from pytest import yield_fixture, mark

import pytest

from pyclibrary.utils import (add_library_locations, add_header_locations,
LIBRARY_DIRS, HEADER_DIRS)
Expand All @@ -38,7 +38,7 @@ def teardown_module():
HEADER_DIRS = BACKUPS


@yield_fixture
@pytest.fixture
def library_location_fixture():
global LIBRARY_DIRS
old = LIBRARY_DIRS[:]
Expand Down Expand Up @@ -68,8 +68,6 @@ def test_accessing_library_by_object(self):
library = CLibrary(lib, ['ctypes_test.h'])
assert library._lib_ is lib

# This works on both windows and python locally but fails on Travis
@mark.no_travis
def test_already_opened_library(self):

lib = ctypes.CDLL(_ctypes_test.__file__)
Expand Down
13 changes: 7 additions & 6 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand All @@ -12,7 +11,9 @@
import os
import sys
from pickle import dumps, loads
from pytest import raises

import pytest

from pyclibrary.c_parser import CParser, Type, Struct, Union, Enum
import pyclibrary.utils

Expand All @@ -31,7 +32,7 @@ def compare_lines(lines, lines2):
class TestType(object):

def test_init(self):
with raises(ValueError):
with pytest.raises(ValueError):
Type('int', '*', type_quals=(('volatile',),))

def test_tuple_equality(self):
Expand Down Expand Up @@ -634,14 +635,14 @@ def test_typedef(self):
assert ('x' in variables and variables['x'] ==
(None, Type('undefined')))
assert not self.parser.is_fund_type('SomeOtherType')
with raises(Exception):
with pytest.raises(Exception):
self.parser.eval_type(Type('undefined'))

# Testing recursive defs
assert 'recType1' in types
assert 'recType2' in types
assert 'recType3' in types
with raises(Exception):
with pytest.raises(Exception):
self.parser.eval_type(Type('recType3'))

def test_enums(self):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2015-2020 by PyCLibrary Authors, see AUTHORS for more details.
# Copyright 2015-2022 by PyCLibrary Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT/X11 license.
#
Expand Down

0 comments on commit 1d4dbfc

Please sign in to comment.