summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Nový <onovy@debian.org>2018-07-31 05:34:08 +0200
committerOndřej Nový <onovy@debian.org>2018-07-31 05:34:08 +0200
commit105c1b8e47a2075a4801fb47cf663a59577382dc (patch)
treef0b5c7981e117d44666342338b3b6e3f4b472e99
parentbc9a847c9fd17500de84ba0076125f6553ffd0ab (diff)
Import python-py_1.5.4.orig.tar.gz
-rw-r--r--.gitignore2
-rw-r--r--.hgignore29
-rw-r--r--.hgtags68
-rw-r--r--.travis.yml17
-rw-r--r--CHANGELOG8
-rw-r--r--HOWTORELEASE.rst17
-rw-r--r--PKG-INFO10
-rw-r--r--README.rst8
-rw-r--r--appveyor.yml26
-rw-r--r--doc/path.txt6
-rw-r--r--py.egg-info/PKG-INFO10
-rw-r--r--py.egg-info/SOURCES.txt5
-rw-r--r--py/__init__.py7
-rw-r--r--py/_path/local.py10
-rw-r--r--py/_version.py4
-rw-r--r--setup.py16
-rw-r--r--testing/path/test_local.py35
17 files changed, 126 insertions, 152 deletions
diff --git a/.gitignore b/.gitignore
index 5bb0d45..375476f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,5 @@ __pycache__/
.eggs/
dist/*
+/py/_version.py
+.pytest_cache/
diff --git a/.hgignore b/.hgignore
deleted file mode 100644
index 34976da..0000000
--- a/.hgignore
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# Automatically generated by `hgimportsvn`
-syntax:glob
-.svn
-.hgsvn
-
-# These lines are suggested according to the svn:ignore property
-# Feel free to enable them by uncommenting them
-syntax:glob
-*.pyc
-*.pyo
-*.swp
-*.html
-*.class
-*.orig
-*~
-
-doc/_build
-build/
-dist/
-*.egg-info
-issue/
-env/
-3rdparty/
-.tox
-lib/
-bin/
-include/
-src/
diff --git a/.hgtags b/.hgtags
deleted file mode 100644
index 9d48095..0000000
--- a/.hgtags
+++ /dev/null
@@ -1,68 +0,0 @@
-52c6d9e78777a5a34e813123997dfc614a1a4767 1.0.0b3
-1c7aaa8c61f3b0945921a9acc7beb184201aed4b 1.0.0b4
-1c7aaa8c61f3b0945921a9acc7beb184201aed4b 1.0.0b4
-0000000000000000000000000000000000000000 1.0.0b4
-0000000000000000000000000000000000000000 1.0.0b4
-8cd6eb91eba313b012d6e568f37d844dc0751f2e 1.0.0b4
-8cd6eb91eba313b012d6e568f37d844dc0751f2e 1.0.0b4
-0000000000000000000000000000000000000000 1.0.0b4
-2cc0507f117ffe721dff7ee026648cfce00ec92f 1.0.0b6
-86f1e1b6e49bf5882a809f11edd1dbb08162cdad 1.0.0b8
-86f1e1b6e49bf5882a809f11edd1dbb08162cdad 1.0.0b8
-c63f35c266cbb26dad6b87b5e115d65685adf448 1.0.0b8
-c63f35c266cbb26dad6b87b5e115d65685adf448 1.0.0b8
-0eaa0fdf2ba0163cf534dc2eff4ba2e5fc66c261 1.0.0b8
-e2a60653cb490aeed81bbbd83c070b99401c211c 1.0.0b9
-5ea0cdf7854c3d4278d36eda94a2b68483a0e211 1.0.0
-5ea0cdf7854c3d4278d36eda94a2b68483a0e211 1.0.0
-7acde360d94b6a2690ce3d03ff39301da84c0a2b 1.0.0
-6bd221981ac99103002c1cb94fede400d23a96a1 1.0.1
-4816e8b80602a3fd3a0a120333ad85fbe7d8bab4 1.0.2
-60c44bdbf093285dc69d5462d4dbb4acad325ca6 1.1.0
-319187fcda66714c5eb1353492babeec3d3c826f 1.1.1
-4fc5212f7626a56b9eb6437b5c673f56dd7eb942 1.2.0
-c143a8c8840a1c68570890c8ac6165bbf92fd3c6 1.2.1
-eafd3c256e8732dfb0a4d49d051b5b4339858926 1.3.0
-d5eacf390af74553227122b85e20345d47b2f9e6 1.3.1
-d5eacf390af74553227122b85e20345d47b2f9e6 1.3.1
-8b8e7c25a13cf863f01b2dd955978285ae9daf6a 1.3.1
-3bff44b188a7ec1af328d977b9d39b6757bb38df 1.3.2
-c59d3fa8681a5b5966b8375b16fccd64a3a8dbeb 1.3.3
-79ef6377705184c55633d456832eea318fedcf61 1.3.4
-79ef6377705184c55633d456832eea318fedcf61 1.3.4
-90fffd35373e9f125af233f78b19416f0938d841 1.3.4
-5346ab41b059c95a48cbe1e8a7bae96ce6e0da27 1.4.0
-1f3125cba7976538952be268f107c1d0c36c5ce8 1.4.1
-04ab22db4ff737cf31e91d75a0f5d7077f324167 1.4.2
-9950bf9d684a984d511795013421c89c5cf88bef 1.4.3
-d9951e3bdbc765e73835ae13012f6a074d13d8bf 1.4.4
-b827dd156a36753e32c7f3f15ce82d6fe9e356c8 1.4.6
-f15726f9e5a67cc6221c499affa4840e9d591763 1.4.7
-abfabd07a1d328f13c730e8a50d80d2e470afd3b 1.4.9
-7f37ee0aff9be4b839d6759cfee336f60e8393a4 1.4.10
-fe4593263efa10ea7ba014db6e3379e0b82368a2 1.4.11
-f07af25a26786e4825b5170e17ad693245cb3426 1.4.12
-d3730d84ba7eda92fd3469a3f63fd6d8cb22c975 1.4.13
-12c1ae8e7c5345721e9ec9f8e27b1e36c07f74dc 1.4.14
-12c1ae8e7c5345721e9ec9f8e27b1e36c07f74dc 1.4.14
-0000000000000000000000000000000000000000 1.4.14
-0000000000000000000000000000000000000000 1.4.14
-1497e2efd0f8c73a0e3d529debf0c489e4cd6cab 1.4.14
-e065014c1ce8ad110a381e9baaaa5d647ba7ac6b 1.4.15
-e9e5b38f53dc35b35aa1f9ee9a9be9bbd2d2c3b1 1.4.16
-c603503945f52b78522d96a423605cbc953236d3 1.4.17
-c59201105a29801cc858eb9160b7a19791b91a35 1.4.18
-284cc172e294d48edc840012e1451c32c3963d92 1.4.19
-a3e0626aa0c5aecf271367dc77e476ab216ea3c8 1.4.20
-5e48016c4a3af8e7358a1267d33d021e71765bed 1.4.21
-01ae2cfcc61c4fcb3aa5031349adb5b467c31018 1.4.23
-5ffd982f4dff60b588f309cd9bdc61036547282a 1.4.24
-dc9ffbcaf1f7d72e96be3f68c11deebb7e7193c5 1.4.25
-6de1a44bf75de7af4fcae947c235e9072bbdbb9a 1.4.26
-7d650ba2657890a2253c8c4a83f170febebd90fa 1.4.27
-7d650ba2657890a2253c8c4a83f170febebd90fa 1.4.27
-1810003dec63dd1b506a23849861fffa5bc3ba13 1.4.27
-ba08706f08ddea1b77a426f00dfe2bdc244345e8 1.4.28
-4e8054ada63f3327bcf759ae7cd36c7c8652bc9b 1.4.29
-366ab346610c6de8aaa7617e24011794b40236c6 1.4.30
-657380e439f9b7e04918cb162cb2e46388244b42 1.4.31
diff --git a/.travis.yml b/.travis.yml
index 917c59d..ea75028 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,6 +17,23 @@ matrix:
- python: '2.7'
# using a different option due to pytest-addopts pytester issues
env: PYTEST_XADDOPTS="-n 3 --runslowtests" DEPS="pytest~=3.0.0 pytest-xdist"
+
+ - stage: deploy
+ python: '3.6'
+ env:
+ install: pip install -U setuptools setuptools_scm
+ script: skip
+ deploy:
+ provider: pypi
+ user: nicoddemus
+ distributions: sdist bdist_wheel
+ skip_upload_docs: true
+ password:
+ secure: VNYW/sZoD+9DzKCe6vANNXXJR7jP7rwySafQ33N1jAnCrdylQjEN/p6tSfUe8jDi3wDpLPL9h8pwfxuUT7CRxglHov3Qe7zSeywixvHan5aFahQiQ8+gucYIM7wITHH3oQs7jN35pnhdnF+QlW2+eDCL6qOLU5XwuRhsDKXjQ/hUWR5hlX5EniD1gzyKEf6j1YCpST87tKpeLwVEYEmsucdkUZuXhxDtyaWQHWiPsLWwh/slQtUJEHeLF26r8UxFy0RiGne9jR+CzRfH5ktcA9/pArvp4VuwOii+1TDxVSYP7+I8Z+eUKN9JBg12QLaHwoIN/8J+MvHCkuf+OGSLM3sEyNRJGDev372xg3K7ylIkeeK4WXirKEp2ojgN8tniloDjnwdu/gPWBnrXuooA60tNoByHFa8KbMZAr2B2sQeMxD4VZGr1N8l0rX4gRTrwvdk3i3ulLKVSwkXaGn+GrfZTTboa7dEnpuma8tv1niNCSpStYIy7atS8129+5ijV3OC8DzOMh/rVbO9WsDb/RPG3yjFiDvEJPIPeE0l/m5u42QBqtdZSS2ia7UWTJBiEY09uFMTRmH5hhE/1aiYBbvAztf5CReUbeKdSQz3L8TTSZqewtFZmXTkX97/xQnrEpsnGezIM2DNuMEuQG3MxGkNCxwbQKpx/bkHdrD75yMk=
+ on:
+ tags: true
+ repo: pytest-dev/py
+
allow_failures:
- python: 'pypy-5.4'
install:
diff --git a/CHANGELOG b/CHANGELOG
index d033f0e..a17cdb5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,12 @@
-1.5.3 (unreleased)
+1.5.4 (2018-06-27)
==================
+- fix pytest-dev/pytest#3451: don't make assumptions about fs case sensitivity
+ in ``make_numbered_dir``.
+
+1.5.3
+=====
+
- fix #179: ensure we can support 'from py.error import ...'
1.5.2
diff --git a/HOWTORELEASE.rst b/HOWTORELEASE.rst
new file mode 100644
index 0000000..8d02316
--- /dev/null
+++ b/HOWTORELEASE.rst
@@ -0,0 +1,17 @@
+Release Procedure
+-----------------
+
+#. Create a branch ``release-X.Y.Z`` from the latest ``master``.
+
+#. Manually update the ``CHANGELOG`` and commit.
+
+#. Open a PR for this branch targeting ``master``.
+
+#. After all tests pass and the PR has been approved by at least another maintainer, publish to PyPI by creating and pushing a tag::
+
+ git tag X.Y.Z
+ git push git@github.com:pytest-dev/py X.Y.Z
+
+ Wait for the deploy to complete, then make sure it is `available on PyPI <https://pypi.org/project/py>`_.
+
+#. Merge your PR to ``master``.
diff --git a/PKG-INFO b/PKG-INFO
index 0e5eb03..359dcef 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: py
-Version: 1.5.3
+Version: 1.5.4
Summary: library with cross-python path, ini-parsing, io, code, log facilities
Home-page: http://py.readthedocs.io/
Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others
@@ -27,10 +27,10 @@ Description: .. image:: https://img.shields.io/pypi/v/py.svg
The py lib is a Python development support library featuring
the following tools and modules:
- * ``py.path``: uniform local and svn path objects
- * ``py.apipkg``: explicit API control and lazy-importing
- * ``py.iniconfig``: easy parsing of .ini files
- * ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest``).
+ * ``py.path``: uniform local and svn path objects -> please use pathlib/pathlib2 instead
+ * ``py.apipkg``: explicit API control and lazy-importing -> please use the standalone package instead
+ * ``py.iniconfig``: easy parsing of .ini files -> please use the standalone package instead
+ * ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail).
**NOTE**: prior to the 1.4 release this distribution used to
contain py.test which is now its own package, see http://pytest.org
diff --git a/README.rst b/README.rst
index 7092ae4..3d9ec0f 100644
--- a/README.rst
+++ b/README.rst
@@ -19,10 +19,10 @@
The py lib is a Python development support library featuring
the following tools and modules:
-* ``py.path``: uniform local and svn path objects
-* ``py.apipkg``: explicit API control and lazy-importing
-* ``py.iniconfig``: easy parsing of .ini files
-* ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest``).
+* ``py.path``: uniform local and svn path objects -> please use pathlib/pathlib2 instead
+* ``py.apipkg``: explicit API control and lazy-importing -> please use the standalone package instead
+* ``py.iniconfig``: easy parsing of .ini files -> please use the standalone package instead
+* ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail).
**NOTE**: prior to the 1.4 release this distribution used to
contain py.test which is now its own package, see http://pytest.org
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..5fbeca9
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,26 @@
+environment:
+ matrix:
+ # note: please use "tox --listenvs" to populate the build matrix below
+ - TOXENV: "py27-pytest29"
+ - TOXENV: "py27-pytest30"
+ - TOXENV: "py27-pytest31"
+ - TOXENV: "py34-pytest29"
+ - TOXENV: "py34-pytest30"
+ - TOXENV: "py34-pytest31"
+ - TOXENV: "py35-pytest29"
+ - TOXENV: "py35-pytest30"
+ - TOXENV: "py35-pytest31"
+ - TOXENV: "py36-pytest29"
+ - TOXENV: "py36-pytest30"
+ - TOXENV: "py36-pytest31"
+
+install:
+ - echo Installed Pythons
+ - dir c:\Python*
+
+ - C:\Python36\python -m pip install --upgrade --pre tox
+
+build: false # Not a C# project, build stuff at the test step instead.
+
+test_script:
+ - C:\Python36\python -m tox
diff --git a/doc/path.txt b/doc/path.txt
index c906179..3c1d321 100644
--- a/doc/path.txt
+++ b/doc/path.txt
@@ -2,6 +2,12 @@
py.path
=======
+ **Note**: The 'py' library is in "maintenance mode" and so is not
+ recommended for new projects. Please check out
+ `pathlib <https://docs.python.org/3/library/pathlib.html>`_ or
+ `pathlib2 <https://pypi.python.org/pypi/pathlib2/>`_ for path
+ operations.
+
The 'py' lib provides a uniform high-level api to deal with filesystems
and filesystem-like interfaces: ``py.path``. It aims to offer a central
object to fs-like object trees (reading from and writing to files, adding
diff --git a/py.egg-info/PKG-INFO b/py.egg-info/PKG-INFO
index 0e5eb03..359dcef 100644
--- a/py.egg-info/PKG-INFO
+++ b/py.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: py
-Version: 1.5.3
+Version: 1.5.4
Summary: library with cross-python path, ini-parsing, io, code, log facilities
Home-page: http://py.readthedocs.io/
Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others
@@ -27,10 +27,10 @@ Description: .. image:: https://img.shields.io/pypi/v/py.svg
The py lib is a Python development support library featuring
the following tools and modules:
- * ``py.path``: uniform local and svn path objects
- * ``py.apipkg``: explicit API control and lazy-importing
- * ``py.iniconfig``: easy parsing of .ini files
- * ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest``).
+ * ``py.path``: uniform local and svn path objects -> please use pathlib/pathlib2 instead
+ * ``py.apipkg``: explicit API control and lazy-importing -> please use the standalone package instead
+ * ``py.iniconfig``: easy parsing of .ini files -> please use the standalone package instead
+ * ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail).
**NOTE**: prior to the 1.4 release this distribution used to
contain py.test which is now its own package, see http://pytest.org
diff --git a/py.egg-info/SOURCES.txt b/py.egg-info/SOURCES.txt
index d726aac..5b0d3ee 100644
--- a/py.egg-info/SOURCES.txt
+++ b/py.egg-info/SOURCES.txt
@@ -1,13 +1,13 @@
.gitattributes
.gitignore
-.hgignore
-.hgtags
.travis.yml
AUTHORS
CHANGELOG
+HOWTORELEASE.rst
LICENSE
MANIFEST.in
README.rst
+appveyor.yml
conftest.py
setup.cfg
setup.py
@@ -55,6 +55,7 @@ py/__metainfo.py
py/_builtin.py
py/_error.py
py/_std.py
+py/_version.py
py/_xmlgen.py
py/test.py
py.egg-info/PKG-INFO
diff --git a/py/__init__.py b/py/__init__.py
index be27e92..b892ce1 100644
--- a/py/__init__.py
+++ b/py/__init__.py
@@ -18,7 +18,12 @@ except ImportError:
import apipkg
lib_not_mangled_by_packagers = False
vendor_prefix = ''
-__version__ = '1.5.3'
+
+try:
+ from ._version import version as __version__
+except ImportError:
+ # broken installation, we don't even try
+ __version__ = "unknown"
apipkg.initpkg(__name__, attr={'_apipkg': apipkg, 'error': error}, exportdefs={
diff --git a/py/_path/local.py b/py/_path/local.py
index 5a785b0..79dc628 100644
--- a/py/_path/local.py
+++ b/py/_path/local.py
@@ -4,13 +4,13 @@ local path implementation.
from __future__ import with_statement
from contextlib import contextmanager
-import sys, os, re, atexit, io, uuid
+import sys, os, atexit, io, uuid
import py
from py._path import common
from py._path.common import iswin32, fspath
from stat import S_ISLNK, S_ISDIR, S_ISREG
-from os.path import abspath, normcase, normpath, isabs, exists, isdir, isfile, islink, dirname
+from os.path import abspath, normpath, isabs, exists, isdir, isfile, islink, dirname
if sys.version_info > (3,0):
def map_as_list(func, iter):
@@ -800,7 +800,7 @@ class LocalPath(FSBase):
return cls(py.error.checked_call(tempfile.mkdtemp, dir=str(rootdir)))
def make_numbered_dir(cls, prefix='session-', rootdir=None, keep=3,
- lock_timeout = 172800): # two days
+ lock_timeout=172800): # two days
""" return unique directory with a number greater than the current
maximum one. The number is assumed to start directly after prefix.
if keep is true directories with a number less than (maxnum-keep)
@@ -810,10 +810,10 @@ class LocalPath(FSBase):
if rootdir is None:
rootdir = cls.get_temproot()
- nprefix = normcase(prefix)
+ nprefix = prefix.lower()
def parse_num(path):
""" parse the number out of a path (if it matches the prefix) """
- nbasename = normcase(path.basename)
+ nbasename = path.basename.lower()
if nbasename.startswith(nprefix):
try:
return int(nbasename[len(nprefix):])
diff --git a/py/_version.py b/py/_version.py
new file mode 100644
index 0000000..e7188f9
--- /dev/null
+++ b/py/_version.py
@@ -0,0 +1,4 @@
+# coding: utf-8
+# file generated by setuptools_scm
+# don't change, don't track in version control
+version = '1.5.4'
diff --git a/setup.py b/setup.py
index 959323b..a0d723c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,25 +1,13 @@
-import os
-import sys
-
from setuptools import setup, find_packages
-def get_version():
- p = os.path.join(os.path.dirname(
- os.path.abspath(__file__)), "py", "__init__.py")
- with open(p) as f:
- for line in f.readlines():
- if "__version__" in line:
- return line.strip().split("=")[-1].strip(" '")
- raise ValueError("could not read version")
-
-
def main():
setup(
name='py',
description='library with cross-python path, ini-parsing, io, code, log facilities',
long_description=open('README.rst').read(),
- version=get_version(),
+ use_scm_version={"write_to": "py/_version.py"},
+ setup_requires=["setuptools-scm"],
url='http://py.readthedocs.io/',
license='MIT license',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
diff --git a/testing/path/test_local.py b/testing/path/test_local.py
index c9075d6..ee4b9bd 100644
--- a/testing/path/test_local.py
+++ b/testing/path/test_local.py
@@ -425,24 +425,23 @@ class TestExecution:
if i >= 3:
assert not numdir.new(ext=str(i-3)).check()
- def test_make_numbered_dir_case_insensitive(self, tmpdir, monkeypatch):
- # https://github.com/pytest-dev/pytest/issues/708
- monkeypatch.setattr(py._path.local, 'normcase',
- lambda path: path.lower())
- monkeypatch.setattr(tmpdir, 'listdir',
- lambda: [tmpdir._fastjoin('case.0')])
- numdir = local.make_numbered_dir(prefix='CAse.', rootdir=tmpdir,
- keep=2, lock_timeout=0)
- assert numdir.basename.endswith('.1')
-
- def test_make_numbered_dir_case_sensitive(self, tmpdir, monkeypatch):
- # https://github.com/pytest-dev/pytest/issues/708
- monkeypatch.setattr(py._path.local, 'normcase', lambda path: path)
- monkeypatch.setattr(tmpdir, 'listdir',
- lambda: [tmpdir._fastjoin('case.0')])
- numdir = local.make_numbered_dir(prefix='CAse.', rootdir=tmpdir,
- keep=2, lock_timeout=0)
- assert numdir.basename.endswith('.0')
+ def test_make_numbered_dir_case(self, tmpdir):
+ """make_numbered_dir does not make assumptions on the underlying
+ filesystem based on the platform and will assume it _could_ be case
+ insensitive.
+
+ See issues:
+ - https://github.com/pytest-dev/pytest/issues/708
+ - https://github.com/pytest-dev/pytest/issues/3451
+ """
+ d1 = local.make_numbered_dir(
+ prefix='CAse.', rootdir=tmpdir, keep=2, lock_timeout=0,
+ )
+ d2 = local.make_numbered_dir(
+ prefix='caSE.', rootdir=tmpdir, keep=2, lock_timeout=0,
+ )
+ assert str(d1).lower() != str(d2).lower()
+ assert str(d2).endswith('.1')
def test_make_numbered_dir_NotImplemented_Error(self, tmpdir, monkeypatch):
def notimpl(x, y):