forked from pool/python-smpplib
Accepting request 929848 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/929848 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-smpplib?expand=0&rev=2
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
diff --git a/.circleci/config.yml b/.circleci/config.yml
|
||||
index 6ae73bb..a5b583a 100644
|
||||
--- a/.circleci/config.yml
|
||||
+++ b/.circleci/config.yml
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
virtualenv -p "$(which python || which pypy)" ./venv
|
||||
)
|
||||
. venv/bin/activate
|
||||
- pip install pytest mock
|
||||
+ pip install pytest
|
||||
- run:
|
||||
name: Install project
|
||||
command: |
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 8940285..ea154e1 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -11,7 +11,7 @@ setup(
|
||||
long_description_content_type='text/markdown',
|
||||
packages=find_packages(),
|
||||
install_requires=['six'],
|
||||
- tests_require=['pytest', 'mock', 'tox'],
|
||||
+ tests_require=['pytest', 'tox'],
|
||||
zip_safe=True,
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
diff --git a/tests/test_gsm.py b/tests/test_gsm.py
|
||||
index b6641fd..7760dc4 100644
|
||||
--- a/tests/test_gsm.py
|
||||
+++ b/tests/test_gsm.py
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
-import mock
|
||||
+from unittest.mock import patch
|
||||
from pytest import mark, raises
|
||||
|
||||
from smpplib import consts
|
||||
@@ -39,7 +39,7 @@ def test_make_parts_single(plaintext, encoding, expected_parts, expected_encodin
|
||||
]),
|
||||
])
|
||||
def test_make_parts_multiple(plaintext, expected):
|
||||
- with mock.patch('random.randint') as randint:
|
||||
+ with patch('random.randint') as randint:
|
||||
randint.return_value = 0x42
|
||||
assert make_parts(plaintext) == (expected, consts.SMPP_ENCODING_DEFAULT, consts.SMPP_GSMFEAT_UDHI)
|
||||
|
||||
@@ -49,7 +49,7 @@ def test_make_parts_multiple(plaintext, expected):
|
||||
(b'12345', 2, [b'\x05\x00\x03\x42\x03\x0112', b'\x05\x00\x03\x42\x03\x0234', b'\x05\x00\x03\x42\x03\x035']),
|
||||
])
|
||||
def test_make_parts_encoded(encoded_text, part_size, expected):
|
||||
- with mock.patch('random.randint') as randint:
|
||||
+ with patch('random.randint') as randint:
|
||||
randint.return_value = 0x42
|
||||
assert make_parts_encoded(encoded_text, part_size) == expected
|
||||
|
@@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 25 19:33:46 UTC 2021 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.2.0
|
||||
* New: allow customizing how error PDUs are handled
|
||||
* New: ignoring unknown optional parameters
|
||||
* New: add the option to create TLS/SSL sockets
|
||||
* Fix: the max check should include the NULL terminator
|
||||
* Fix: not always setting the socket timeout
|
||||
* Fix: add mandatory parameters to GenericNack command
|
||||
* Fix: handle errors on PDU payload retrieval
|
||||
- Drop patch:
|
||||
* python-smpplib-use-unittest-mock.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 7 07:26:54 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# spec file for package python-smpplib
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2016-2020, Martin Hauke <mardnh@gmx.de>
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2016-2021, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-smpplib
|
||||
Version: 2.1.0
|
||||
Version: 2.2.0
|
||||
Release: 0
|
||||
Summary: SMPP library for Python
|
||||
License: LGPL-2.0-only
|
||||
@@ -27,11 +27,11 @@ Group: Development/Languages/Python
|
||||
URL: https://pypi.org/project/smpplib/
|
||||
#Git-Clone: https://github.com/python-smpplib/python-smpplib.git
|
||||
Source: https://github.com/python-smpplib/python-smpplib/archive/%{version}.tar.gz#/smpplib-%{version}.tar.gz
|
||||
Patch0: python-smpplib-use-unittest-mock.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module mock}
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
Requires: python-six
|
||||
@@ -46,7 +46,6 @@ allows you to send and receive SMS to an SMS gateway or SMSC.
|
||||
|
||||
%prep
|
||||
%setup -q -n python-smpplib-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -54,7 +53,7 @@ allows you to send and receive SMS to an SMS gateway or SMSC.
|
||||
%install
|
||||
%python_install
|
||||
# Remove tests from sitelib
|
||||
%python_expand rm -R %{buildroot}%{$python_sitelib}/tests
|
||||
%python_expand rm -R %{buildroot}%{$python_sitelib}/smpplib/tests/
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ff4c1ab4792043a98cc9d99fd284d1bc32ae8f5ef7cf675f5f792a59f38ff66
|
||||
size 24600
|
3
smpplib-2.2.0.tar.gz
Normal file
3
smpplib-2.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:840ccb080e5cae7880a03e8c0afd08dc0803d77d92ca2ea4b60fb3fc6492b0c8
|
||||
size 25730
|
Reference in New Issue
Block a user