[Python-modules-commits] [python-qtpy] 01/04: Imported Upstream version 1.1.2
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Aug 10 11:18:19 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch master
in repository python-qtpy.
commit 3dc0eef2b5daac0813e8d6c56909e67b411314f0
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Wed Aug 10 10:45:22 2016 +0100
Imported Upstream version 1.1.2
---
.coveralls.yml | 3 +++
.gitignore | 2 +-
.travis.yml | 27 ++++++++++++++--------
CHANGELOG.md | 20 ++++++++++++++++
README.md | 19 ++++++++++++++-
appveyor.yml | 33 +++++++++++++++++----------
circle.yml | 33 +++++++++++++++++++++++++++
conda.recipe/meta.yaml | 11 ++++-----
qtpy/QtCore.py | 8 +++++++
qtpy/QtWidgets.py | 2 ++
qtpy/__init__.py | 2 +-
qtpy/_version.py | 2 +-
{tests => qtpy/tests}/conftest.py | 0
qtpy/tests/runtests.py | 26 +++++++++++++++++++++
{tests => qtpy/tests}/test.ui | 0
{tests => qtpy/tests}/test_custom.ui | 0
{tests => qtpy/tests}/test_main.py | 0
{tests => qtpy/tests}/test_patch_qcombobox.py | 1 +
{tests => qtpy/tests}/test_uic.py | 0
tests/__init__.py | 0
20 files changed, 158 insertions(+), 31 deletions(-)
diff --git a/.coveralls.yml b/.coveralls.yml
new file mode 100644
index 0000000..eab06c4
--- /dev/null
+++ b/.coveralls.yml
@@ -0,0 +1,3 @@
+service_name: travis-ci
+parallel: true
+
diff --git a/.gitignore b/.gitignore
index cc3fb2b..6def0a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,4 +33,4 @@ lib64
# Other files
toread.md
-
+.chache
diff --git a/.travis.yml b/.travis.yml
index d394dee..bc3c532 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,5 @@
+# https://travis-ci.org/spyder-ide/qtpy/
+
# We set the language to c because python isn't supported on the MacOS X nodes
# on Travis. However, the language ends up being irrelevant anyway, since we
# install Python ourselves using conda.
@@ -5,6 +7,10 @@ language: c
sudo: false
+branches:
+ only:
+ - master
+
os:
- linux
- osx
@@ -12,7 +18,10 @@ os:
env:
global:
- SETUP_XVFB=True
- - CONDA_DEPENDENCIES='pytest'
+ - CONDA_CHANNELS="qttesting"
+ - CONDA_DEPENDENCIES="pytest pytest-cov"
+ - PIP_DEPENDENCIES="coveralls"
+
matrix:
- PYTHON_VERSION=2.7 USE_QT_API=PyQt5
- PYTHON_VERSION=2.7 USE_QT_API=PyQt4
@@ -24,12 +33,11 @@ env:
before_install:
# Test environments for different Qt bindings
- if [[ "$USE_QT_API" == "PyQt5" ]]; then
- export CONDA_DEPENDENCIES='qt5 pyqt5 '$CONDA_DEPENDENCIES;
- export CONDA_CHANNELS='spyder-ide';
+ export CONDA_DEPENDENCIES='qt=5.* pyqt=5.* '$CONDA_DEPENDENCIES;
elif [[ "$USE_QT_API" == "PyQt4" ]]; then
- export CONDA_DEPENDENCIES='qt pyqt '$CONDA_DEPENDENCIES;
+ export CONDA_DEPENDENCIES='qt=4.* pyqt=4.* '$CONDA_DEPENDENCIES;
elif [[ "$USE_QT_API" == "PySide" ]]; then
- export CONDA_DEPENDENCIES='qt pyside '$CONDA_DEPENDENCIES;
+ export CONDA_DEPENDENCIES='qt=4.* pyside '$CONDA_DEPENDENCIES;
fi
install:
@@ -37,8 +45,9 @@ install:
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
- python setup.py install
-before_script:
- - cd tests
-
script:
- - py.test
+ - python qtpy/tests/runtests.py
+
+after_success:
+ - coveralls
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c74fc99..dc0cef2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,25 @@
# History of changes
+## Version 1.1.2 (2016-08-08)
+
+### Bugfixes
+
+**Pull requests**
+
+* [PR 54](https://github.com/spyder-ide/qtpy/pull/54) - PR: Fix/ci
+* [PR 53](https://github.com/spyder-ide/qtpy/pull/53) - PR: Move tests to module so they can be run when installed
+* [PR 52](https://github.com/spyder-ide/qtpy/pull/52) - PR: Update readme
+* [PR 51](https://github.com/spyder-ide/qtpy/pull/51) - PR: Add circle ci
+* [PR 47](https://github.com/spyder-ide/qtpy/pull/47) - Remove PyQt variant symbols from QtCore
+* [PR 46](https://github.com/spyder-ide/qtpy/pull/46) - del QtWidgets.QStyleOptionViewItemV4
+* [PR 45](https://github.com/spyder-ide/qtpy/pull/45) - Allow QT_API values that are not completely in lower case
+
+In this release 7 pull requests were merged
+
+
+----
+
+
## Version 1.1.1 (2016-07-01)
### Bugfixes
diff --git a/README.md b/README.md
index 0ee4058..4585fcb 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,21 @@
-## QtPy: Abtraction layer for PyQt5/PyQt4/PySide
+# QtPy: Abtraction layer for PyQt5/PyQt4/PySide
+
+Copyright © 2009- The Spyder Development Team.
+
+## Project details
+[](./LICENSE)
+[](https://pypi.python.org/pypi/qtpy)
+[](https://gitter.im/spyder-ide/public)
+
+## Build status
+[](https://travis-ci.org/spyder-ide/qtpy)
+[](https://ci.appveyor.com/project/goanpeca/qtpy)
+[](https://circleci.com/gh/spyder-ide/qtpy)
+[](https://coveralls.io/github/spyder-ide/qtpy?branch=master)
+[](https://www.quantifiedcode.com/app/project/c769241c7d7f4463b1e6f67863dabace)
+[](https://scrutinizer-ci.com/g/spyder-ide/qtpy/?branch=master)
+
+## Description
**QtPy** (pronounced *'cutie pie'*) is a small abstraction layer that lets you
write applications using a single API call to either PyQt or PySide.
diff --git a/appveyor.yml b/appveyor.yml
index d310e75..52ce588 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,26 +1,34 @@
-environment:
+# https://ci.appveyor.com/project/goanpeca/qtpy
+
+branches:
+ only:
+ - master
+environment:
global:
PYTHON: "C:\\conda"
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix
# of 32 bit and 64 bit builds are needed, move this
# to the matrix section.
+ # Used by atropy ci-helpers
+ CONDA_CHANNELS: "spyder-ide qttesting"
matrix:
-
- # - PYTHON_VERSION: "2.7"
- # CONDA_CHANNELS: "msarahan"
- # CONDA_DEPENDENCIES: "pytest qt5 pyqt5"
+ # Qt4
+ - PYTHON_VERSION: "2.7"
+ CONDA_DEPENDENCIES: "pytest pytest-cov qt=4.* pyside"
- PYTHON_VERSION: "2.7"
- CONDA_DEPENDENCIES: "pytest qt pyqt"
+ CONDA_DEPENDENCIES: "pytest pytest-cov qt=4.* pyqt=4.*"
+ - PYTHON_VERSION: "3.4"
+ CONDA_DEPENDENCIES: "pytest pytest-cov qt=4.* pyqt=4.*"
+ - PYTHON_VERSION: "3.5"
+ CONDA_DEPENDENCIES: "pytest pytest-cov qt=4.* pyqt=4.*"
+ # Qt5
- PYTHON_VERSION: "2.7"
- CONDA_DEPENDENCIES: "pytest qt pyside"
- # - PYTHON_VERSION: "3.5"
- # CONDA_CHANNELS: "msarahan"
- # CONDA_DEPENDENCIES: "pytest qt5 pyqt5"
+ CONDA_DEPENDENCIES: "pytest pytest-cov qt=5.* pyqt=5.*"
- PYTHON_VERSION: "3.5"
- CONDA_DEPENDENCIES: "pytest qt pyqt"
+ CONDA_DEPENDENCIES: "pytest pytest-cov qt=5.* pyqt=5.*"
platform:
-x64
@@ -30,10 +38,11 @@ install:
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
+ - "python setup.py install"
# Not a .NET project, we build in the install step instead
build: false
test_script:
- - "%CMD_IN_ENV% py.test"
+ - "%CMD_IN_ENV% python qtpy/tests/runtests.py"
diff --git a/circle.yml b/circle.yml
new file mode 100644
index 0000000..6638b5c
--- /dev/null
+++ b/circle.yml
@@ -0,0 +1,33 @@
+# https://circleci.com/gh/spyder-ide/qtpy/
+
+machine:
+ environment:
+ # Used by test scripts
+ TEST_CI: "True"
+ PYTHON_TEST: "$HOME/miniconda/envs/test/bin/python"
+ PYTEST: "$HOME/miniconda/envs/test/bin/py.test"
+ PATH: "$HOME/miniconda/bin:$PATH" # To avoid prepending this to the commands on circle-ci
+ # Python versions to test (Maximum of 4 different versions for now)
+ PY_VERSIONS: "2.7 3.4 3.5"
+ # Used by astropy-ci helpers
+ TRAVIS_OS_NAME: "linux"
+ CONDA_CHANNELS: "spyder-ide qttesting"
+ CONDA_DEPENDENCIES: "pyqt pytest pytest-cov qt qtpy"
+ PIP_DEPENDENCIES: "coveralls"
+
+dependencies:
+ override:
+ # First convert PY_VERSIONS to an array and then select the python version based on the CIRCLE_NODE_INDEX
+ - PY_VERSIONS=($PY_VERSIONS) &&
+ TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} &&
+ echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============" &&
+ git clone git://github.com/astropy/ci-helpers.git &&
+ source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh &&
+ "$PYTHON_TEST" setup.py install;
+
+test:
+ override:
+ - conda info --json: # note the colon
+ parallel: true
+ - "$PYTHON_TEST qtpy/tests/runtests.py": # note the colon
+ parallel: true
diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml
index 9974698..0b25c5c 100644
--- a/conda.recipe/meta.yaml
+++ b/conda.recipe/meta.yaml
@@ -1,14 +1,13 @@
package:
name: qtpy
- version: {{ environ.get('GIT_DESCRIBE_TAG', '').replace('v', '') }}
-
-source:
- git_url: ../
- git_tag: {% if environ.get('PRERELEASE') == 'True' %} master {% else %} {{ environ.get('GIT_DESCRIBE_TAG') }} {% endif %}
+ version: {{ GIT_DESCRIBE_TAG|replace('v', '') }}
build:
noarch_python: True
- number: {% if environ.get('PRERELEASE') == 'True' %} {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% else %} 0 {% endif %}
+ number: {{ GIT_DESCRIBE_NUMBER|int }}
+
+source:
+ git_url: ../
requirements:
build:
diff --git a/qtpy/QtCore.py b/qtpy/QtCore.py
index 0ca69d3..07adafb 100644
--- a/qtpy/QtCore.py
+++ b/qtpy/QtCore.py
@@ -19,8 +19,13 @@ if PYQT5:
from PyQt5.QtCore import pyqtSlot as Slot
from PyQt5.QtCore import pyqtProperty as Property
from PyQt5.QtCore import QT_VERSION_STR as __version__
+
+ # Those are imported from `import *`
+ del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR
elif PYQT4:
from PyQt4.QtCore import *
+ # Those are things we inherited from Spyder that fix crazy crashes under
+ # some specific situations. (See #34)
from PyQt4.QtCore import QCoreApplication
from PyQt4.QtCore import Qt
from PyQt4.QtCore import pyqtSignal as Signal
@@ -29,6 +34,9 @@ elif PYQT4:
from PyQt4.QtGui import (QItemSelection, QItemSelectionModel,
QItemSelectionRange, QSortFilterProxyModel)
from PyQt4.QtCore import QT_VERSION_STR as __version__
+
+ # Those are imported from `import *`
+ del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR
elif PYSIDE:
from PySide.QtCore import *
from PySide.QtGui import (QItemSelection, QItemSelectionModel,
diff --git a/qtpy/QtWidgets.py b/qtpy/QtWidgets.py
index e1656ab..2f3ff81 100644
--- a/qtpy/QtWidgets.py
+++ b/qtpy/QtWidgets.py
@@ -22,6 +22,7 @@ if PYQT5:
elif PYQT4:
from PyQt4.QtGui import *
QStyleOptionViewItem = QStyleOptionViewItemV4
+ del QStyleOptionViewItemV4
# These objects belong to QtGui
del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard,
@@ -67,6 +68,7 @@ elif PYQT4:
elif PYSIDE:
from PySide.QtGui import *
QStyleOptionViewItem = QStyleOptionViewItemV4
+ del QStyleOptionViewItemV4
# These objects belong to QtGui
del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard,
diff --git a/qtpy/__init__.py b/qtpy/__init__.py
index b6392f5..b837343 100644
--- a/qtpy/__init__.py
+++ b/qtpy/__init__.py
@@ -68,7 +68,7 @@ PYQT4_API = [
PYSIDE_API = ['pyside']
os.environ.setdefault(QT_API, 'pyqt5')
-API = os.environ[QT_API]
+API = os.environ[QT_API].lower()
assert API in (PYQT5_API + PYQT4_API + PYSIDE_API)
is_old_pyqt = is_pyqt46 = False
diff --git a/qtpy/_version.py b/qtpy/_version.py
index 68e807a..95d1e54 100644
--- a/qtpy/_version.py
+++ b/qtpy/_version.py
@@ -1,2 +1,2 @@
-version_info = (1, 1, 1)
+version_info = (1, 1, 2)
__version__ = '.'.join(map(str, version_info))
diff --git a/tests/conftest.py b/qtpy/tests/conftest.py
similarity index 100%
rename from tests/conftest.py
rename to qtpy/tests/conftest.py
diff --git a/qtpy/tests/runtests.py b/qtpy/tests/runtests.py
new file mode 100755
index 0000000..b54fbb4
--- /dev/null
+++ b/qtpy/tests/runtests.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# ----------------------------------------------------------------------------
+# Copyright © 2015- The Spyder Development Team
+#
+# Licensed under the terms of the MIT License
+# ----------------------------------------------------------------------------
+
+"""File for running tests programmatically."""
+
+# Standard library imports
+import sys
+
+# Third party imports
+import qtpy # to ensure that Qt4 uses API v2
+import pytest
+
+
+def main():
+ """Run pytest tests."""
+ errno = pytest.main(['-x', 'qtpy', '-v', '-rw', '--durations=10',
+ '--cov=qtpy', '--cov-report=term-missing'])
+ sys.exit(errno)
+
+if __name__ == '__main__':
+ main()
diff --git a/tests/test.ui b/qtpy/tests/test.ui
similarity index 100%
rename from tests/test.ui
rename to qtpy/tests/test.ui
diff --git a/tests/test_custom.ui b/qtpy/tests/test_custom.ui
similarity index 100%
rename from tests/test_custom.ui
rename to qtpy/tests/test_custom.ui
diff --git a/tests/test_main.py b/qtpy/tests/test_main.py
similarity index 100%
rename from tests/test_main.py
rename to qtpy/tests/test_main.py
diff --git a/tests/test_patch_qcombobox.py b/qtpy/tests/test_patch_qcombobox.py
similarity index 99%
rename from tests/test_patch_qcombobox.py
rename to qtpy/tests/test_patch_qcombobox.py
index d5abf40..04a8337 100644
--- a/tests/test_patch_qcombobox.py
+++ b/qtpy/tests/test_patch_qcombobox.py
@@ -2,6 +2,7 @@ from __future__ import absolute_import
from qtpy import QtGui, QtWidgets
+
def get_qapp(icon_path=None):
qapp = QtWidgets.QApplication.instance()
if qapp is None:
diff --git a/tests/test_uic.py b/qtpy/tests/test_uic.py
similarity index 100%
rename from tests/test_uic.py
rename to qtpy/tests/test_uic.py
diff --git a/tests/__init__.py b/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-qtpy.git
More information about the Python-modules-commits
mailing list