Browse Source

Things went wrong...

master
John ShaggyTwoDope Jenkins 4 years ago
parent
commit
7f13ac3d5a
100 changed files with 3485 additions and 6 deletions
  1. 1
    1
      drive/PKGBUILD
  2. BIN
      drive/drive-0.2.2-1-x86_64.pkg.tar.xz
  3. BIN
      drive/drive-0.2.2-1.src.tar.gz
  4. BIN
      drive/pkg/drive/.MTREE
  5. 2
    2
      drive/pkg/drive/.PKGINFO
  6. BIN
      drive/pkg/drive/usr/bin/drive
  7. BIN
      drive/v0.2.2.tar.gz
  8. BIN
      libunity/libunity-7.1.4-1-x86_64.pkg.tar.xz
  9. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.cix
  10. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.iix
  11. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.rix
  12. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.six
  13. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.tix
  14. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.cix
  15. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.iix
  16. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.rix
  17. BIN
      libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.six
  18. BIN
      libunity/libunity-7.1.4/.bzr/repository/pack-names
  19. BIN
      libunity/libunity-7.1.4/.bzr/repository/packs/9140e3c41203c8f4bd4667950c815312.pack
  20. BIN
      libunity/pkg/libunity/.MTREE
  21. 3
    3
      libunity/pkg/libunity/.PKGINFO
  22. BIN
      libunity/pkg/libunity/usr/bin/libunity-tool
  23. BIN
      libunity/pkg/libunity/usr/bin/unity-scope-loader
  24. BIN
      libunity/pkg/libunity/usr/lib/libunity-extras.so.9.0.2
  25. BIN
      libunity/pkg/libunity/usr/lib/libunity.so.9.0.2
  26. BIN
      libunity/pkg/libunity/usr/lib/libunity/libunity-protocol-private.so.0.0.0
  27. BIN
      libunity/pkg/libunity/usr/lib/python3.4/site-packages/gi/overrides/__pycache__/Unity.cpython-34.pyc
  28. BIN
      libunity/pkg/libunity/usr/lib/python3.4/site-packages/gi/overrides/__pycache__/Unity.cpython-34.pyo
  29. BIN
      libunity/pkg/libunity/usr/share/unity-scopes/__pycache__/scope-runner-dbus.cpython-34.pyc
  30. BIN
      libunity/pkg/libunity/usr/share/unity-scopes/__pycache__/scope-runner-dbus.cpython-34.pyo
  31. BIN
      python3-kitchen/1.2.1.tar.gz
  32. 23
    0
      python3-kitchen/PKGBUILD
  33. BIN
      python3-kitchen/pkg/python3-kitchen/.MTREE
  34. 23
    0
      python3-kitchen/pkg/python3-kitchen/.PKGINFO
  35. 43
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/PKG-INFO
  36. 111
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/SOURCES.txt
  37. 0
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/dependency_links.txt
  38. 1
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/top_level.txt
  39. 41
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__init__.py
  40. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/__init__.cpython-34.pyc
  41. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/__init__.cpython-34.pyo
  42. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/exceptions.cpython-34.pyc
  43. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/exceptions.cpython-34.pyo
  44. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/release.cpython-34.pyc
  45. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/release.cpython-34.pyo
  46. 9
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__init__.py
  47. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/__init__.cpython-34.pyc
  48. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/__init__.cpython-34.pyo
  49. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/strictdict.cpython-34.pyc
  50. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/strictdict.cpython-34.pyo
  51. 51
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/strictdict.py
  52. 35
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/exceptions.py
  53. 896
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/i18n/__init__.py
  54. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/i18n/__pycache__/__init__.cpython-34.pyc
  55. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/i18n/__pycache__/__init__.cpython-34.pyo
  56. 98
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/iterutils/__init__.py
  57. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/iterutils/__pycache__/__init__.cpython-34.pyc
  58. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/iterutils/__pycache__/__init__.cpython-34.pyo
  59. 19
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__init__.py
  60. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/__init__.cpython-34.pyc
  61. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/__init__.cpython-34.pyo
  62. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/subprocess.cpython-34.pyc
  63. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/subprocess.cpython-34.pyo
  64. 56
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/base64/__init__.py
  65. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/base64/__pycache__/__init__.cpython-34.pyc
  66. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/base64/__pycache__/__init__.cpython-34.pyo
  67. 54
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/sets/__init__.py
  68. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/sets/__pycache__/__init__.cpython-34.pyc
  69. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/sets/__pycache__/__init__.cpython-34.pyo
  70. 13
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/subprocess.py
  71. 20
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/__init__.py
  72. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/__pycache__/__init__.cpython-34.pyc
  73. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/__pycache__/__init__.cpython-34.pyo
  74. 23
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/collections/__init__.py
  75. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/collections/__pycache__/__init__.cpython-34.pyc
  76. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/collections/__pycache__/__init__.cpython-34.pyo
  77. 21
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/__init__.py
  78. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/__pycache__/__init__.cpython-34.pyc
  79. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/__pycache__/__init__.cpython-34.pyo
  80. 47
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/subprocess/__init__.py
  81. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/subprocess/__pycache__/__init__.cpython-34.pyc
  82. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/subprocess/__pycache__/__init__.cpython-34.pyo
  83. 35
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/release.py
  84. 17
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__init__.py
  85. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/__init__.cpython-34.pyc
  86. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/__init__.cpython-34.pyo
  87. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/converters.cpython-34.pyc
  88. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/converters.cpython-34.pyo
  89. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/display.cpython-34.pyc
  90. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/display.cpython-34.pyo
  91. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/exceptions.cpython-34.pyc
  92. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/exceptions.cpython-34.pyo
  93. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/misc.cpython-34.pyc
  94. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/misc.cpython-34.pyo
  95. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/utf8.cpython-34.pyc
  96. BIN
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/utf8.cpython-34.pyo
  97. 900
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/converters.py
  98. 903
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/display.py
  99. 40
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/exceptions.py
  100. 0
    0
      python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/misc.py

+ 1
- 1
drive/PKGBUILD View File

@@ -13,7 +13,7 @@ conflicts=('drive-git')
options=('!strip' '!emptydirs')
install=$pkgname.install
source=("https://github.com/odeke-em/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('e40674d8d8711a65440f425cad68dbd84919c066ef968aae66580d4c2769cbfb')
sha256sums=('bf8925fd2b65c8ee973da2cb8f954dba7d460aef37384852640c2996bc97dc2a')

prepare() {
mkdir -p "$srcdir/go"

BIN
drive/drive-0.2.2-1-x86_64.pkg.tar.xz View File


BIN
drive/drive-0.2.2-1.src.tar.gz View File


BIN
drive/pkg/drive/.MTREE View File


+ 2
- 2
drive/pkg/drive/.PKGINFO View File

@@ -1,11 +1,11 @@
# Generated by makepkg 4.2.1
# using fakeroot version 1.20.2
# Sun May 17 14:47:04 UTC 2015
# Mon May 18 03:14:29 UTC 2015
pkgname = drive
pkgver = 0.2.2-1
pkgdesc = Pull or push Google Drive files
url = http://github.com/odeke-em/drive
builddate = 1431874024
builddate = 1431918869
packager = Unknown Packager
size = 8940544
arch = x86_64

BIN
drive/pkg/drive/usr/bin/drive View File


BIN
drive/v0.2.2.tar.gz View File


BIN
libunity/libunity-7.1.4-1-x86_64.pkg.tar.xz View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.cix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.iix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.rix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.six View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.tix → libunity/libunity-7.1.4/.bzr/repository/indices/9140e3c41203c8f4bd4667950c815312.tix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.cix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.iix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.rix View File


BIN
libunity/libunity-7.1.4/.bzr/repository/indices/91dc2c2ac2d86d3f4bde1c49788b40c2.six View File


BIN
libunity/libunity-7.1.4/.bzr/repository/pack-names View File


BIN
libunity/libunity-7.1.4/.bzr/repository/packs/91dc2c2ac2d86d3f4bde1c49788b40c2.pack → libunity/libunity-7.1.4/.bzr/repository/packs/9140e3c41203c8f4bd4667950c815312.pack View File


BIN
libunity/pkg/libunity/.MTREE View File


+ 3
- 3
libunity/pkg/libunity/.PKGINFO View File

@@ -1,13 +1,13 @@
# Generated by makepkg 4.2.1
# using fakeroot version 1.20.2
# Mon Apr 20 05:01:09 UTC 2015
# Sun May 24 07:20:58 UTC 2015
pkgname = libunity
pkgver = 7.1.4-1
pkgdesc = Library for instrumenting and integrating with all aspects of the Unity shell
url = https://launchpad.net/libunity
builddate = 1429506069
builddate = 1432452058
packager = Unknown Packager
size = 1955840
size = 1943552
arch = x86_64
license = LGPL
depend = dee

BIN
libunity/pkg/libunity/usr/bin/libunity-tool View File


BIN
libunity/pkg/libunity/usr/bin/unity-scope-loader View File


BIN
libunity/pkg/libunity/usr/lib/libunity-extras.so.9.0.2 View File


BIN
libunity/pkg/libunity/usr/lib/libunity.so.9.0.2 View File


BIN
libunity/pkg/libunity/usr/lib/libunity/libunity-protocol-private.so.0.0.0 View File


BIN
libunity/pkg/libunity/usr/lib/python3.4/site-packages/gi/overrides/__pycache__/Unity.cpython-34.pyc View File


BIN
libunity/pkg/libunity/usr/lib/python3.4/site-packages/gi/overrides/__pycache__/Unity.cpython-34.pyo View File


BIN
libunity/pkg/libunity/usr/share/unity-scopes/__pycache__/scope-runner-dbus.cpython-34.pyc View File


BIN
libunity/pkg/libunity/usr/share/unity-scopes/__pycache__/scope-runner-dbus.cpython-34.pyo View File


BIN
python3-kitchen/1.2.1.tar.gz View File


+ 23
- 0
python3-kitchen/PKGBUILD View File

@@ -0,0 +1,23 @@
#Maintaine:r John Jenkins twodopeshaggy@gmail.com

pkgname=python3-kitchen
pkgver=1.2.1
pkgrel=1
pkgdesc="Useful snippets of python code"
url="https://fedorahosted.org/kitchen"
depends=('python' )
makedepends=('python')
license=('LGPLv2+')
arch=('any')
source=(https://github.com/fedora-infra/kitchen/archive/$pkgver.tar.gz)
md5sums=('654de4eba96b8bbf30ec7bd213b67921')

build() {
cd $srcdir/kitchen-$pkgver
python setup.py build
}

package() {
cd $srcdir/kitchen-$pkgver
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

BIN
python3-kitchen/pkg/python3-kitchen/.MTREE View File


+ 23
- 0
python3-kitchen/pkg/python3-kitchen/.PKGINFO View File

@@ -0,0 +1,23 @@
# Generated by makepkg 4.2.1
# using fakeroot version 1.20.2
# Fri May 29 04:21:33 UTC 2015
pkgname = python3-kitchen
pkgver = 1.2.1-1
pkgdesc = Useful snippets of python code
url = https://fedorahosted.org/kitchen
builddate = 1432873293
packager = Unknown Packager
size = 570368
arch = any
license = LGPLv2+
depend = python
makedepend = python
makepkgopt = strip
makepkgopt = docs
makepkgopt = !libtool
makepkgopt = !staticlibs
makepkgopt = emptydirs
makepkgopt = zipman
makepkgopt = purge
makepkgopt = !upx
makepkgopt = !debug

+ 43
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/PKG-INFO View File

@@ -0,0 +1,43 @@
Metadata-Version: 1.1
Name: kitchen
Version: 1.2.1
Summary: Kitchen contains a cornucopia of useful code
Home-page: https://fedorahosted.org/kitchen
Author: Toshio Kuratomi
Author-email: toshio@fedoraproject.org
License: LGPLv2+
Download-URL: https://fedorahosted.org/releases/k/i/kitchen
Description:
We've all done it. In the process of writing a brand new application we've
discovered that we need a little bit of code that we've invented before.
Perhaps it's something to handle unicode text. Perhaps it's something to make
a bit of python-2.5 code run on python-2.3. Whatever it is, it ends up being
a tiny bit of code that seems too small to worry about pushing into its own
module so it sits there, a part of your current project, waiting to be cut and
pasted into your next project. And the next. And the next. And since that
little bittybit of code proved so useful to you, it's highly likely that it
proved useful to someone else as well. Useful enough that they've written it
and copy and pasted it over and over into each of their new projects.
Well, no longer! Kitchen aims to pull these small snippets of code into a few
python modules which you can import and use within your project. No more copy
and paste! Now you can let someone else maintain and release these small
snippets so that you can get on with your life.
Keywords: Useful Small Code Snippets
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.3
Classifier: Programming Language :: Python :: 2.4
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development :: Internationalization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: General

+ 111
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/SOURCES.txt View File

@@ -0,0 +1,111 @@
COPYING
COPYING.LESSER
HACKING.rst
MANIFEST.in
NEWS.rst
README.rst
releaseutils.py
runtests.sh
setup.cfg
setup.py
kitchen2/docs/conf.py
kitchen2/kitchen/__init__.py
kitchen2/kitchen/exceptions.py
kitchen2/kitchen/release.py
kitchen2/kitchen/collections/__init__.py
kitchen2/kitchen/collections/strictdict.py
kitchen2/kitchen/i18n/__init__.py
kitchen2/kitchen/iterutils/__init__.py
kitchen2/kitchen/pycompat24/__init__.py
kitchen2/kitchen/pycompat24/subprocess.py
kitchen2/kitchen/pycompat24/base64/__init__.py
kitchen2/kitchen/pycompat24/base64/_base64.py
kitchen2/kitchen/pycompat24/sets/__init__.py
kitchen2/kitchen/pycompat25/__init__.py
kitchen2/kitchen/pycompat25/collections/__init__.py
kitchen2/kitchen/pycompat25/collections/_defaultdict.py
kitchen2/kitchen/pycompat27/__init__.py
kitchen2/kitchen/pycompat27/subprocess/__init__.py
kitchen2/kitchen/pycompat27/subprocess/_subprocess.py
kitchen2/kitchen/text/__init__.py
kitchen2/kitchen/text/converters.py
kitchen2/kitchen/text/display.py
kitchen2/kitchen/text/exceptions.py
kitchen2/kitchen/text/misc.py
kitchen2/kitchen/text/utf8.py
kitchen2/kitchen/versioning/__init__.py
kitchen2/tests/base_classes.py
kitchen2/tests/test__all__.py
kitchen2/tests/test_base64.py
kitchen2/tests/test_collections.py
kitchen2/tests/test_converters.py
kitchen2/tests/test_defaultdict.py
kitchen2/tests/test_deprecation.py
kitchen2/tests/test_i18n.py
kitchen2/tests/test_iterutils.py
kitchen2/tests/test_pycompat.py
kitchen2/tests/test_pycompat24.py
kitchen2/tests/test_subprocess.py
kitchen2/tests/test_text_display.py
kitchen2/tests/test_text_misc.py
kitchen2/tests/test_text_utf8.py
kitchen2/tests/test_versioning.py
kitchen2/tests/data/locale/pt_BR.po
kitchen2/tests/data/locale/test.pot
kitchen2/tests/data/locale-old/pt_BR.po
kitchen2/tests/data/locale-old/test.pot
kitchen2/tests/data/locale-old/pt_BR/LC_MESSAGES/test.mo
kitchen2/tests/data/locale/pt_BR/LC_MESSAGES/test.mo
kitchen2/tests/subprocessdata/sigchild_ignore.py
kitchen3/docs/conf.py
kitchen3/kitchen/__init__.py
kitchen3/kitchen/exceptions.py
kitchen3/kitchen/release.py
kitchen3/kitchen.egg-info/PKG-INFO
kitchen3/kitchen.egg-info/SOURCES.txt
kitchen3/kitchen.egg-info/dependency_links.txt
kitchen3/kitchen.egg-info/top_level.txt
kitchen3/kitchen/collections/__init__.py
kitchen3/kitchen/collections/strictdict.py
kitchen3/kitchen/i18n/__init__.py
kitchen3/kitchen/iterutils/__init__.py
kitchen3/kitchen/pycompat24/__init__.py
kitchen3/kitchen/pycompat24/subprocess.py
kitchen3/kitchen/pycompat24/base64/__init__.py
kitchen3/kitchen/pycompat24/sets/__init__.py
kitchen3/kitchen/pycompat25/__init__.py
kitchen3/kitchen/pycompat25/collections/__init__.py
kitchen3/kitchen/pycompat27/__init__.py
kitchen3/kitchen/pycompat27/subprocess/__init__.py
kitchen3/kitchen/text/__init__.py
kitchen3/kitchen/text/converters.py
kitchen3/kitchen/text/display.py
kitchen3/kitchen/text/exceptions.py
kitchen3/kitchen/text/misc.py
kitchen3/kitchen/text/utf8.py
kitchen3/kitchen/versioning/__init__.py
kitchen3/tests/base_classes.py
kitchen3/tests/test__all__.py
kitchen3/tests/test_collections.py
kitchen3/tests/test_converters.py
kitchen3/tests/test_deprecation.py
kitchen3/tests/test_deprecation_py3.py
kitchen3/tests/test_i18n.py
kitchen3/tests/test_iterutils.py
kitchen3/tests/test_pycompat.py
kitchen3/tests/test_text_display.py
kitchen3/tests/test_text_misc.py
kitchen3/tests/test_text_utf8.py
kitchen3/tests/test_versioning.py
kitchen3/tests/data/locale/pt_BR.po
kitchen3/tests/data/locale/test.pot
kitchen3/tests/data/locale-old/pt_BR.po
kitchen3/tests/data/locale-old/test.pot
kitchen3/tests/data/locale-old/pt_BR/LC_MESSAGES/test.mo
kitchen3/tests/data/locale/pt_BR/LC_MESSAGES/test.mo
kitchen3/tests/subprocessdata/sigchild_ignore.py
locale/de/LC_MESSAGES/kitchen.mo
locale/en_US/LC_MESSAGES/kitchen.mo
po/de.po
po/en_US.po
po/kitchen.pot

rtv/pkg/rtv/usr/lib/python3.4/site-packages/rtv-1.3-py3.4.egg-info/dependency_links.txt → python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/dependency_links.txt View File


+ 1
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen-1.2.1-py3.4.egg-info/top_level.txt View File

@@ -0,0 +1 @@
kitchen

+ 41
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__init__.py View File

@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011-2012 Red Hat, Inc
#
# kitchen is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# kitchen is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>
#
'''
Kitchen

Aggregate of a bunch of unrelated but helpful python modules.
'''

# Pylint disabled messages:
# :C0103: We need gettext aliases for both unicode strings and byte strings.
# The byte string one (b_) triggers this warning.
from kitchen import i18n
from kitchen import versioning

(_, N_) = i18n.easy_gettext_setup('kitchen.core')
#pylint: disable-msg=C0103
(b_, bN_) = i18n.easy_gettext_setup('kitchen.core', use_unicode=False)
#pylint: enable-msg=C0103

__version_info__ = ((1, 2, 1),)
__version__ = versioning.version_tuple_to_string(__version_info__)

__all__ = ('exceptions', 'release',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/__init__.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/exceptions.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/exceptions.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/release.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/__pycache__/release.cpython-34.pyo View File


+ 9
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__init__.py View File

@@ -0,0 +1,9 @@
from kitchen.versioning import version_tuple_to_string

__version_info__ = ((1, 1, 0),)
__version__ = version_tuple_to_string(__version_info__)

from kitchen.collections import strictdict
from kitchen.collections.strictdict import StrictDict

__all__ = ('strictdict', 'StrictDict',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/__init__.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/strictdict.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/__pycache__/strictdict.cpython-34.pyo View File


+ 51
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/collections/strictdict.py View File

@@ -0,0 +1,51 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc
#
# kitchen is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# kitchen is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>
'''
----------
StrictDict
----------

:class:`kitchen.collections.StrictDict` provides a dictionary that treats
:class:`bytes` and :class:`str` as distinct key values.
'''

# Pylint disabled messages:
# :C0111: We're implementing the dict interface so just reference the dict
# documentation rather than having our own docstrings

import warnings

warnings.warn('In python3, kitchen.collections.strictdict is deprecated.'
' If your code doesn\'t have to remain compatible with python2 use'
' python3\'s native dict or defaultdict types instead',
PendingDeprecationWarning, stacklevel=2)

try:
# :E0611: Pylint false positive. We try to import from the stdlib but we
# have a fallback so this is okay.
#pylint:disable-msg=E0611
from collections import defaultdict
except ImportError:
from kitchen.pycompat25.collections import defaultdict

# in python3, ordinary dictionaries keep bytes and strings separate
StrictDict = defaultdict

__all__ = ('StrictDict',)

+ 35
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/exceptions.py View File

@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010 Red Hat, Inc
#
# kitchen is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# kitchen is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>
#
'''
-----------------------
Base kitchen exceptions
-----------------------

Exception classes for kitchen and the root of the exception hierarchy for
all kitchen modules.
'''

class KitchenError(Exception):
'''Base exception class for any error thrown directly by kitchen.
'''
pass

__all__ = ('KitchenError',)

+ 896
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/i18n/__init__.py View File

@@ -0,0 +1,896 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Red Hat, Inc
# Copyright (c) 2009 Milos Komarcevic
# Copyright (c) 2008 Tim Lauridsen
#
# kitchen is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# kitchen is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors: James Antill
# Milos Komarcevic
# Toshio Kuratomi <toshio@fedoraproject.org>
# Tim Lauridsen
# Luke Macken <lmacken@redhat.com>
# Seth Vidal <skvidal@fedoraproject.org>
#
# Portions of code taken from yum/i18n.py
# Portions of code adapted from |stdlib|_ gettext.py
'''
:term:`I18N` is an important piece of any modern program. Unfortunately,
setting up :term:`i18n` in your program is often a confusing process. The
functions provided here aim to make the programming side of that a little
easier.

Most projects will be able to do something like this when they startup::

# myprogram/__init__.py:

import os
import sys

from kitchen.i18n import easy_gettext_setup

_, N_ = easy_gettext_setup('myprogram', localedirs=(
os.path.join(os.path.realpath(os.path.dirname(__file__)), 'locale'),
os.path.join(sys.prefix, 'lib', 'locale')
))

Then, in other files that have strings that need translating::

# myprogram/commands.py:

from myprogram import _, N_

def print_usage():
print _(u"""available commands are:
--help Display help
--version Display version of this program
--bake-me-a-cake as fast as you can
""")

def print_invitations(age):
print _('Please come to my party.')
print N_('I will be turning %(age)s year old',
'I will be turning %(age)s years old', age) % {'age': age}

See the documentation of :func:`easy_gettext_setup` and
:func:`get_translation_object` for more details.

.. seealso::

:mod:`gettext`
for details of how the python gettext facilities work
`babel <http://babel.edgewall.org>`_
The babel module for in depth information on gettext, :term:`message
catalogs`, and translating your app. babel provides some nice
features for :term:`i18n` on top of :mod:`gettext`
'''
# Pylint disabled messages:
# :E1101: NewGNUTranslations is modeled as a replacement for GNUTranslations.
# That module invokes the _parse message to create some of its attributes.
# Pylint doesn't see those attributes being defined since it doesn't know
# when _parse() is called. We disable E1101 when accessing self._catalog
# and self.plural for this reason.
# :C0103: We're replicating the gettext API here so we need to use method and
# parameter names that mirror gettext.
# :C0111: We're replicating the gettext API here so for the gettext
# translation object methods we point people at the stdlib docs

from kitchen.versioning import version_tuple_to_string

__version_info__ = ((2, 2, 0),)
__version__ = version_tuple_to_string(__version_info__)

import copy
from errno import ENOENT
import gettext
import itertools
import locale
import os
import sys
import warnings

# We use the _default_localedir definition in get_translation_object
try:
from gettext import _default_localedir as _DEFAULT_LOCALEDIR
except ImportError:
_DEFAULT_LOCALEDIR = os.path.join(sys.prefix, 'share', 'locale')

from kitchen.text.converters import to_bytes, to_unicode
from kitchen.text.misc import byte_string_valid_encoding, isbasestring

# We cache parts of the translation objects just like stdlib's gettext so that
# we don't reparse the message files and keep them in memory separately if the
# same catalog is opened twice.
_translations = {}

class DummyTranslations(gettext.NullTranslations):
'''Safer version of :class:`gettext.NullTranslations`

This Translations class doesn't translate the strings and is intended to
be used as a fallback when there were errors setting up a real
Translations object. It's safer than :class:`gettext.NullTranslations` in
its handling of byte :class:`bytes` vs :class:`str` strings.

Unlike :class:`~gettext.NullTranslations`, this Translation class will
never throw a :exc:`~exceptions.UnicodeError`. The code that you have
around a call to :class:`DummyTranslations` might throw
a :exc:`~exceptions.UnicodeError` but at least that will be in code you
control and can fix. Also, unlike :class:`~gettext.NullTranslations` all
of this Translation object's methods guarantee to return byte :class:`bytes`
except for :meth:`ugettext` and :meth:`ungettext` which guarantee to
return :class:`str` strings.

When byte :class:`bytes` are returned, the strings will be encoded according
to this algorithm:

1) If a fallback has been added, the fallback will be called first.
You'll need to consult the fallback to see whether it performs any
encoding changes.
2) If a byte :class:`bytes` was given, the same byte :class:`bytes` will
be returned.
3) If a :class:`str` string was given and :meth:`set_output_charset`
has been called then we encode the string using the
:attr:`output_charset`
4) If a :class:`str` string was given and this is :meth:`gettext` or
:meth:`ngettext` and :attr:`_charset` was set output in that charset.
5) If a :class:`str` string was given and this is :meth:`gettext`
or :meth:`ngettext` we encode it using 'utf-8'.
6) If a :class:`str` string was given and this is :meth:`lgettext`
or :meth:`lngettext` we encode using the value of
:func:`locale.getpreferredencoding`

For :meth:`ugettext` and :meth:`ungettext`, we go through the same set of
steps with the following differences:

* We transform byte :class:`bytes` into :class:`str` strings for
these methods.
* The encoding used to decode the byte :class:`bytes` is taken from
:attr:`input_charset` if it's set, otherwise we decode using
:term:`UTF-8`.

.. attribute:: input_charset

is an extension to the |stdlib|_ :mod:`gettext` that specifies what
charset a message is encoded in when decoding a message to
:class:`str`. This is used for two purposes:

1) If the message string is a byte :class:`bytes`, this is used to decode
the string to a :class:`str` string before looking it up in the
:term:`message catalog`.
2) In :meth:`~kitchen.i18n.DummyTranslations.ugettext` and
:meth:`~kitchen.i18n.DummyTranslations.ungettext` methods, if a byte
:class:`bytes` is given as the message and is untranslated this is used
as the encoding when decoding to :class:`str`. This is different
from :attr:`_charset` which may be set when a :term:`message catalog`
is loaded because :attr:`input_charset` is used to describe an encoding
used in a python source file while :attr:`_charset` describes the
encoding used in the :term:`message catalog` file.

Any characters that aren't able to be transformed from a byte :class:`bytes`
to :class:`str` string or vice versa will be replaced with
a replacement character (ie: ``u'�'`` in unicode based encodings, ``'?'`` in other
:term:`ASCII` compatible encodings).

.. seealso::

:class:`gettext.NullTranslations`
For information about what methods are available and what they do.

.. versionchanged:: kitchen-1.1.0 ; API kitchen.i18n 2.1.0
* Although we had adapted :meth:`gettext`, :meth:`ngettext`,
:meth:`lgettext`, and :meth:`lngettext` to always return byte
:class:`bytes`, we hadn't forced those byte :class:`bytes` to always be
in a specified charset. We now make sure that :meth:`gettext` and
:meth:`ngettext` return byte :class:`bytes` encoded using
:attr:`output_charset` if set, otherwise :attr:`charset` and if
neither of those, :term:`UTF-8`. With :meth:`lgettext` and
:meth:`lngettext` :attr:`output_charset` if set, otherwise
:func:`locale.getpreferredencoding`.
* Make setting :attr:`input_charset` and :attr:`output_charset` also
set those attributes on any fallback translation objects.

.. versionchanged:: kitchen-1.2.0 ; API kitchen.i18n 2.2.0
Add python2_api parameter to __init__()
'''
#pylint: disable-msg=C0103,C0111
def __init__(self, fp=None, python2_api=True):
gettext.NullTranslations.__init__(self, fp)

# Python 2.3 compat
if not hasattr(self, '_output_charset'):
self._output_charset = None

# Extension for making ugettext and ungettext more sane
# 'utf-8' is only a default here. Users can override.
self._input_charset = 'utf-8'

# Decide whether to mimic the python2 or python3 api
self.python2_api = python2_api

def _set_api(self):
if self._python2_api:
warnings.warn('Kitchen.i18n provides gettext objects that'
' implement either the python2 or python3 gettext api.'
' You are currently using the python2 api. Consider'
' switching to the python3 api by setting'
' python2_api=False when creating the gettext object',
PendingDeprecationWarning, stacklevel=2)
self.gettext = self._gettext
self.lgettext = self._lgettext
self.ugettext = self._ugettext
self.ngettext = self._ngettext
self.lngettext = self._lngettext
self.ungettext = self._ungettext
else:
self.gettext = self._ugettext
self.lgettext = self._lgettext
self.ngettext = self._ungettext
self.lngettext = self._lngettext
self.ugettext = self._removed_method_factory('ugettext')
self.ungettext = self._removed_method_factory('ungettext')

def _removed_method_factory(self, name):
def _removed_method(*args, **kwargs):
raise AttributeError("'%s' object has no attribute '%s'" %
(self.__class__.__name__, name))
return _removed_method

def _set_python2_api(self, value):
self._python2_api = value
self._set_api()

def _get_python2_api(self):
return self._python2_api

python2_api = property(_get_python2_api, _set_python2_api)

def _set_input_charset(self, charset):
if self._fallback:
try:
self._fallback.input_charset = charset
except AttributeError:
pass
self._input_charset = charset

def _get_input_charset(self):
return self._input_charset

input_charset = property(_get_input_charset, _set_input_charset)

def set_output_charset(self, charset):
'''Set the output charset

This serves two purposes. The normal
:meth:`gettext.NullTranslations.set_output_charset` does not set the
output on fallback objects. On python-2.3,
:class:`gettext.NullTranslations` objects don't contain this method.
'''
if self._fallback:
try:
self._fallback.set_output_charset(charset)
except AttributeError:
pass
try:
gettext.NullTranslations.set_output_charset(self, charset)
except AttributeError:
self._output_charset = charset

if not hasattr(gettext.NullTranslations, 'output_charset'):
def output_charset(self):
'''Compatibility for python2.3 which doesn't have output_charset'''
return self._output_charset

def _reencode_if_necessary(self, message, output_encoding):
'''Return a byte string that's valid in a specific charset.

.. warning:: This method may mangle the message if the inpput encoding
is not known or the message isn't represntable in the chosen
output encoding.
'''
valid = False
msg = None
try:
valid = byte_string_valid_encoding(message, output_encoding)
except TypeError:
# input was unicode, so it needs to be encoded
pass

if valid:
return message
try:
# Decode to unicode so we can re-encode to desired encoding
msg = to_unicode(message, encoding=self.input_charset,
nonstring='strict')
except TypeError:
# Not a string; return an empty byte string
return b''

# Make sure that we're returning a str of the desired encoding
return to_bytes(msg, encoding=output_encoding)

def _gettext(self, message):
# First use any fallback gettext objects. Since DummyTranslations
# doesn't do any translation on its own, this is a good first step.
if self._fallback:
try:
message = self._fallback.gettext(message)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or self._charset or
self.input_charset)
return self._reencode_if_necessary(message, output_encoding)

def _ngettext(self, msgid1, msgid2, n):
# Default
if n == 1:
message = msgid1
else:
message = msgid2

# The fallback method might return something different
if self._fallback:
try:
message = self._fallback.ngettext(msgid1, msgid2, n)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or self._charset or
self.input_charset)

return self._reencode_if_necessary(message, output_encoding)

def _lgettext(self, message):
if self._fallback:
try:
message = self._fallback.lgettext(message)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: we'll do our own encoding next
# AttributeErrors happen on py2.3 where lgettext is not
# implemented
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or
locale.getpreferredencoding())

return self._reencode_if_necessary(message, output_encoding)

def _lngettext(self, msgid1, msgid2, n):
# Default
if n == 1:
message = msgid1
else:
message = msgid2
# Fallback method might have something different
if self._fallback:
try:
message = self._fallback.lngettext(msgid1, msgid2, n)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: we'll do our own encoding next
# AttributeError happens on py2.3 where lngettext is not
# implemented
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or
locale.getpreferredencoding())

return self._reencode_if_necessary(message, output_encoding)

def _ugettext(self, message):
if not isbasestring(message):
return ''
if self._fallback:
msg = to_unicode(message, encoding=self.input_charset)
try:
message = self._fallback.ugettext(msg)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own decoding later
pass

# Make sure we're returning unicode
return to_unicode(message, encoding=self.input_charset)

def _ungettext(self, msgid1, msgid2, n):
# Default
if n == 1:
message = msgid1
else:
message = msgid2
# Fallback might override this
if self._fallback:
msgid1 = to_unicode(msgid1, encoding=self.input_charset)
msgid2 = to_unicode(msgid2, encoding=self.input_charset)
try:
message = self._fallback.ungettext(msgid1, msgid2, n)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own decoding later
pass

# Make sure we're returning unicode
return to_unicode(message, encoding=self.input_charset,
nonstring='empty')


class NewGNUTranslations(DummyTranslations, gettext.GNUTranslations):
'''Safer version of :class:`gettext.GNUTranslations`

:class:`gettext.GNUTranslations` suffers from two problems that this
class fixes.

1) :class:`gettext.GNUTranslations` can throw a
:exc:`~exceptions.UnicodeError` in
:meth:`gettext.GNUTranslations.ugettext` if the message being
translated has non-:term:`ASCII` characters and there is no translation
for it.
2) :class:`gettext.GNUTranslations` can return byte :class:`bytes` from
:meth:`gettext.GNUTranslations.ugettext` and :class:`str`
strings from the other :meth:`~gettext.GNUTranslations.gettext`
methods if the message being translated is the wrong type

When byte :class:`bytes` are returned, the strings will be encoded
according to this algorithm:

1) If a fallback has been added, the fallback will be called first.
You'll need to consult the fallback to see whether it performs any
encoding changes.
2) If a byte :class:`bytes` was given, the same byte :class:`bytes` will
be returned.
3) If a :class:`str` string was given and
:meth:`set_output_charset` has been called then we encode the
string using the :attr:`output_charset`
4) If a :class:`str` string was given and this is :meth:`gettext`
or :meth:`ngettext` and a charset was detected when parsing the
:term:`message catalog`, output in that charset.
5) If a :class:`str` string was given and this is :meth:`gettext`
or :meth:`ngettext` we encode it using :term:`UTF-8`.
6) If a :class:`str` string was given and this is :meth:`lgettext`
or :meth:`lngettext` we encode using the value of
:func:`locale.getpreferredencoding`

For :meth:`ugettext` and :meth:`ungettext`, we go through the same set of
steps with the following differences:

* We transform byte :class:`bytes` into :class:`str` strings for these
methods.
* The encoding used to decode the byte :class:`bytes` is taken from
:attr:`input_charset` if it's set, otherwise we decode using
:term:`UTF-8`

.. attribute:: input_charset

an extension to the |stdlib|_ :mod:`gettext` that specifies what
charset a message is encoded in when decoding a message to
:class:`str`. This is used for two purposes:

1) If the message string is a byte :class:`bytes`, this is used to decode
the string to a :class:`str` string before looking it up in the
:term:`message catalog`.
2) In :meth:`~kitchen.i18n.DummyTranslations.ugettext` and
:meth:`~kitchen.i18n.DummyTranslations.ungettext` methods, if a byte
:class:`bytes` is given as the message and is untranslated his is used as
the encoding when decoding to :class:`str`. This is different from
the :attr:`_charset` parameter that may be set when a :term:`message
catalog` is loaded because :attr:`input_charset` is used to describe an
encoding used in a python source file while :attr:`_charset` describes
the encoding used in the :term:`message catalog` file.

Any characters that aren't able to be transformed from a byte
:class:`bytes` to :class:`str` string or vice versa will be replaced
with a replacement character (ie: ``u'�'`` in unicode based encodings,
``'?'`` in other :term:`ASCII` compatible encodings).

.. seealso::

:class:`gettext.GNUTranslations.gettext`
For information about what methods this class has and what they do

.. versionchanged:: kitchen-1.1.0 ; API kitchen.i18n 2.1.0
Although we had adapted :meth:`gettext`, :meth:`ngettext`,
:meth:`lgettext`, and :meth:`lngettext` to always return
byte :class:`bytes`, we hadn't forced those byte :class:`bytes` to always
be in a specified charset. We now make sure that :meth:`gettext` and
:meth:`ngettext` return byte :class:`bytes` encoded using
:attr:`output_charset` if set, otherwise :attr:`charset` and if
neither of those, :term:`UTF-8`. With :meth:`lgettext` and
:meth:`lngettext` :attr:`output_charset` if set, otherwise
:func:`locale.getpreferredencoding`.
'''
#pylint: disable-msg=C0103,C0111
def _parse(self, fp):
gettext.GNUTranslations._parse(self, fp)

def _gettext(self, message):
if not isbasestring(message):
return b''
tmsg = message
u_message = to_unicode(message, encoding=self.input_charset)
try:
tmsg = self._catalog[u_message] #pylint:disable-msg=E1101
except KeyError:
if self._fallback:
try:
tmsg = self._fallback.gettext(message)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or self._charset or
self.input_charset)

return self._reencode_if_necessary(tmsg, output_encoding)

def _ngettext(self, msgid1, msgid2, n):
if n == 1:
tmsg = msgid1
else:
tmsg = msgid2

if not isbasestring(msgid1):
return b''
u_msgid1 = to_unicode(msgid1, encoding=self.input_charset)
try:
#pylint:disable-msg=E1101
tmsg = self._catalog[(u_msgid1, self.plural(n))]
except KeyError:
if self._fallback:
try:
tmsg = self._fallback.ngettext(msgid1, msgid2, n)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or self._charset or
self.input_charset)

return self._reencode_if_necessary(tmsg, output_encoding)

def _lgettext(self, message):
if not isbasestring(message):
return b''
tmsg = message
u_message = to_unicode(message, encoding=self.input_charset)
try:
tmsg = self._catalog[u_message] #pylint:disable-msg=E1101
except KeyError:
if self._fallback:
try:
tmsg = self._fallback.lgettext(message)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or
locale.getpreferredencoding())

return self._reencode_if_necessary(tmsg, output_encoding)

def _lngettext(self, msgid1, msgid2, n):
if n == 1:
tmsg = msgid1
else:
tmsg = msgid2

if not isbasestring(msgid1):
return b''
u_msgid1 = to_unicode(msgid1, encoding=self.input_charset)
try:
#pylint:disable-msg=E1101
tmsg = self._catalog[(u_msgid1, self.plural(n))]
except KeyError:
if self._fallback:
try:
tmsg = self._fallback.lngettext(msgid1, msgid2, n)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Next decide what encoding to use for the strings we return
output_encoding = (self._output_charset or
locale.getpreferredencoding())

return self._reencode_if_necessary(tmsg, output_encoding)


def _ugettext(self, message):
if not isbasestring(message):
return ''
message = to_unicode(message, encoding=self.input_charset)
try:
message = self._catalog[message] #pylint:disable-msg=E1101
except KeyError:
if self._fallback:
try:
message = self._fallback.ugettext(message)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Make sure that we're returning unicode
return to_unicode(message, encoding=self.input_charset)

def _ungettext(self, msgid1, msgid2, n):
if n == 1:
tmsg = msgid1
else:
tmsg = msgid2

if not isbasestring(msgid1):
return ''
u_msgid1 = to_unicode(msgid1, encoding=self.input_charset)
try:
#pylint:disable-msg=E1101
tmsg = self._catalog[(u_msgid1, self.plural(n))]
except KeyError:
if self._fallback:
try:
tmsg = self._fallback.ungettext(msgid1, msgid2, n)
except (AttributeError, UnicodeError):
# Ignore UnicodeErrors: We'll do our own encoding next
pass

# Make sure that we're returning unicode
return to_unicode(tmsg, encoding=self.input_charset,
nonstring='empty')


def get_translation_object(domain, localedirs=tuple(), languages=None,
class_=None, fallback=True, codeset=None, python2_api=True):
'''Get a translation object bound to the :term:`message catalogs`

:arg domain: Name of the message domain. This should be a unique name
that can be used to lookup the :term:`message catalog` for this app or
library.
:kwarg localedirs: Iterator of directories to look for
:term:`message catalogs` under. The directories are searched in order
for :term:`message catalogs`. For each of the directories searched,
we check for message catalogs in any language specified
in:attr:`languages`. The :term:`message catalogs` are used to create
the Translation object that we return. The Translation object will
attempt to lookup the msgid in the first catalog that we found. If
it's not in there, it will go through each subsequent catalog looking
for a match. For this reason, the order in which you specify the
:attr:`localedirs` may be important. If no :term:`message catalogs`
are found, either return a :class:`DummyTranslations` object or raise
an :exc:`IOError` depending on the value of :attr:`fallback`.
Rhe default localedir from :mod:`gettext` which is
:file:`os.path.join(sys.prefix, 'share', 'locale')` on Unix is
implicitly appended to the :attr:`localedirs`, making it the last
directory searched.
:kwarg languages: Iterator of language codes to check for
:term:`message catalogs`. If unspecified, the user's locale settings
will be used.

.. seealso:: :func:`gettext.find` for information on what environment
variables are used.

:kwarg class_: The class to use to extract translations from the
:term:`message catalogs`. Defaults to :class:`NewGNUTranslations`.
:kwarg fallback: If set to data:`False`, raise an :exc:`IOError` if no
:term:`message catalogs` are found. If :data:`True`, the default,
return a :class:`DummyTranslations` object.
:kwarg codeset: Set the character encoding to use when returning byte
:class:`bytes` objects. This is equivalent to calling
:meth:`~gettext.GNUTranslations.output_charset` on the Translations
object that is returned from this function.
:kwarg python2_api: When data:`True` (default), return Translation objects
that use the python2 gettext api
(:meth:`~gettext.GNUTranslations.gettext` and
:meth:`~gettext.GNUTranslations.lgettext` return byte
:class:`bytes`. :meth:`~gettext.GNUTranslations.ugettext` exists and
returns :class:`str` strings). When :data:`False`, return
Translation objects that use the python3 gettext api (gettext returns
:class:`str` strings and lgettext returns byte :class:`bytes`.
ugettext does not exist.)
:return: Translation object to get :mod:`gettext` methods from

If you need more flexibility than :func:`easy_gettext_setup`, use this
function. It sets up a :mod:`gettext` Translation object and returns it
to you. Then you can access any of the methods of the object that you
need directly. For instance, if you specifically need to access
:func:`~gettext.GNUTranslations.lgettext`::

translations = get_translation_object('foo')
translations.lgettext('My Message')

This function is similar to the |stdlib|_ :func:`gettext.translation` but
makes it better in two ways

1. It returns :class:`NewGNUTranslations` or :class:`DummyTranslations`
objects by default. These are superior to the
:class:`gettext.GNUTranslations` and :class:`gettext.NullTranslations`
objects because they are consistent in the string type they return and
they fix several issues that can causethe |stdlib|_ objects to throw
:exc:`UnicodeError`.
2. This function takes multiple directories to search for
:term:`message catalogs`.

The latter is important when setting up :mod:`gettext` in a portable
manner. There is not a common directory for translations across operating
systems so one needs to look in multiple directories for the translations.
:func:`get_translation_object` is able to handle that if you give it
a list of directories to search for catalogs::

translations = get_translation_object('foo', localedirs=(
os.path.join(os.path.realpath(os.path.dirname(__file__)), 'locale'),
os.path.join(sys.prefix, 'lib', 'locale')))

This will search for several different directories:

1. A directory named :file:`locale` in the same directory as the module
that called :func:`get_translation_object`,
2. In :file:`/usr/lib/locale`
3. In :file:`/usr/share/locale` (the fallback directory)

This allows :mod:`gettext` to work on Windows and in development (where the
:term:`message catalogs` are typically in the toplevel module directory)
and also when installed under Linux (where the :term:`message catalogs`
are installed in :file:`/usr/share/locale`). You (or the system packager)
just need to install the :term:`message catalogs` in
:file:`/usr/share/locale` and remove the :file:`locale` directory from the
module to make this work. ie::

In development:
~/foo # Toplevel module directory
~/foo/__init__.py
~/foo/locale # With message catalogs below here:
~/foo/locale/es/LC_MESSAGES/foo.mo

Installed on Linux:
/usr/lib/python2.7/site-packages/foo
/usr/lib/python2.7/site-packages/foo/__init__.py
/usr/share/locale/ # With message catalogs below here:
/usr/share/locale/es/LC_MESSAGES/foo.mo

.. note::

This function will setup Translation objects that attempt to lookup
msgids in all of the found :term:`message catalogs`. This means if
you have several versions of the :term:`message catalogs` installed
in different directories that the function searches, you need to make
sure that :attr:`localedirs` specifies the directories so that newer
:term:`message catalogs` are searched first. It also means that if
a newer catalog does not contain a translation for a msgid but an
older one that's in :attr:`localedirs` does, the translation from that
older catalog will be returned.

.. versionchanged:: kitchen-1.1.0 ; API kitchen.i18n 2.1.0
Add more parameters to :func:`~kitchen.i18n.get_translation_object` so
it can more easily be used as a replacement for
:func:`gettext.translation`. Also change the way we use localedirs.
We cycle through them until we find a suitable locale file rather
than simply cycling through until we find a directory that exists.
The new code is based heavily on the |stdlib|_
:func:`gettext.translation` function.
.. versionchanged:: kitchen-1.2.0 ; API kitchen.i18n 2.2.0
Add python2_api parameter
'''
if python2_api:
warnings.warn('get_translation_object returns gettext objects'
' that implement either the python2 or python3 gettext api.'
' You are currently using the python2 api. Consider'
' switching to the python3 api by setting python2_api=False'
' when you call the function.',
PendingDeprecationWarning, stacklevel=2)
if not class_:
class_ = NewGNUTranslations

mofiles = []
for localedir in itertools.chain(localedirs, (_DEFAULT_LOCALEDIR,)):
mofiles.extend(gettext.find(domain, localedir, languages, all=1))
if not mofiles:
if fallback:
return DummyTranslations(python2_api=python2_api)
raise IOError(ENOENT, 'No translation file found for domain', domain)

# Accumulate a translation with fallbacks to all the other mofiles
stacked_translations = None
for mofile in mofiles:
full_path = os.path.abspath(mofile)
translation = _translations.get(full_path)
if not translation:
mofile_fh = open(full_path, 'rb')
try:
try:
translation = _translations.setdefault(full_path,
class_(mofile_fh, python2_api=python2_api))
except TypeError:
# Only our translation classes have the python2_api
# parameter
translation = _translations.setdefault(full_path,
class_(mofile_fh))

finally:
mofile_fh.close()

# Shallow copy the object so that the fallbacks and output charset can
# differ but the data we read from the mofile is shared.
translation = copy.copy(translation)
translation.python2_api = python2_api
if codeset:
translation.set_output_charset(codeset)
if not stacked_translations:
stacked_translations = translation
else:
stacked_translations.add_fallback(translation)

return stacked_translations

def easy_gettext_setup(domain, localedirs=tuple(), use_unicode=True):
''' Setup translation functions for an application

:arg domain: Name of the message domain. This should be a unique name
that can be used to lookup the :term:`message catalog` for this app.
:kwarg localedirs: Iterator of directories to look for :term:`message
catalogs` under. The first directory to exist is used regardless of
whether messages for this domain are present. If none of the
directories exist, fallback on ``sys.prefix`` + :file:`/share/locale`
Default: No directories to search so we just use the fallback.
:kwarg use_unicode: If :data:`True` return the :mod:`gettext` functions
for :class:`str` strings else return the functions for byte
:class:`bytes` for the translations. Default is :data:`True`.
:return: tuple of the :mod:`gettext` function and :mod:`gettext` function
for plurals

Setting up :mod:`gettext` can be a little tricky because of lack of
documentation. This function will setup :mod:`gettext` using the
`Class-based API
<http://docs.python.org/library/gettext.html#class-based-api>`_ for you.
For the simple case, you can use the default arguments and call it like
this::

_, N_ = easy_gettext_setup()

This will get you two functions, :func:`_` and :func:`N_` that you can use
to mark strings in your code for translation. :func:`_` is used to mark
strings that don't need to worry about plural forms no matter what the
value of the variable is. :func:`N_` is used to mark strings that do need
to have a different form if a variable in the string is plural.

.. seealso::

:doc:`api-i18n`
This module's documentation has examples of using :func:`_` and :func:`N_`
:func:`get_translation_object`
for information on how to use :attr:`localedirs` to get the
proper :term:`message catalogs` both when in development and when
installed to FHS compliant directories on Linux.

.. note::

The gettext functions returned from this function should be superior
to the ones returned from :mod:`gettext`. The traits that make them
better are described in the :class:`DummyTranslations` and
:class:`NewGNUTranslations` documentation.

.. versionchanged:: kitchen-0.2.4 ; API kitchen.i18n 2.0.0
Changed :func:`~kitchen.i18n.easy_gettext_setup` to return the lgettext
functions instead of gettext functions when use_unicode=False.
'''
translations = get_translation_object(domain, localedirs=localedirs, python2_api=False)
if use_unicode:
return(translations.gettext, translations.ngettext)
return(translations.lgettext, translations.lngettext)

__all__ = ('DummyTranslations', 'NewGNUTranslations', 'easy_gettext_setup',
'get_translation_object')

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/i18n/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/i18n/__pycache__/__init__.cpython-34.pyo View File


+ 98
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/iterutils/__init__.py View File

@@ -0,0 +1,98 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc
#
# kitchen is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#.
# kitchen is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
#.
# You should have received a copy of the GNU Lesser General Public License
# along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>
# Luke Macken <lmacken@redhat.com>
#
# Portions of code taken from python-fedora fedora/iterutils.py
'''
Functions to manipulate iterables

.. versionadded:: Kitchen: 0.2.1a1

.. moduleauthor:: Toshio Kuratomi <toshio@fedoraproject.org>
.. moduleauthor:: Luke Macken <lmacken@redhat.com>
'''

from kitchen.versioning import version_tuple_to_string

__version_info__ = ((0, 0, 1),)
__version__ = version_tuple_to_string(__version_info__)

from kitchen.text.misc import isbasestring

def isiterable(obj, include_string=False):
'''Check whether an object is an iterable

:arg obj: Object to test whether it is an iterable
:kwarg include_string: If :data:`True` and :attr:`obj` is a byte
:class:`bytes` or :class:`str` string this function will return
:data:`True`. If set to :data:`False`, byte :class:`bytes` and
:class:`str` strings will cause this function to return
:data:`False`. Default :data:`False`.
:returns: :data:`True` if :attr:`obj` is iterable, otherwise
:data:`False`.
'''
if include_string or not isbasestring(obj):
try:
iter(obj)
except TypeError:
return False
else:
return True
return False

def iterate(obj, include_string=False):
'''Generator that can be used to iterate over anything

:arg obj: The object to iterate over
:kwarg include_string: if :data:`True`, treat strings as iterables.
Otherwise treat them as a single scalar value. Default :data:`False`

This function will create an iterator out of any scalar or iterable. It
is useful for making a value given to you an iterable before operating on it.
Iterables have their items returned. scalars are transformed into iterables.
A string is treated as a scalar value unless the :attr:`include_string`
parameter is set to :data:`True`. Example usage::

>>> list(iterate(None))
[None]
>>> list(iterate([None]))
[None]
>>> list(iterate([1, 2, 3]))
[1, 2, 3]
>>> list(iterate(set([1, 2, 3])))
[1, 2, 3]
>>> list(iterate(dict(a='1', b='2')))
['a', 'b']
>>> list(iterate(1))
[1]
>>> list(iterate(iter([1, 2, 3])))
[1, 2, 3]
>>> list(iterate('abc'))
['abc']
>>> list(iterate('abc', include_string=True))
['a', 'b', 'c']
'''
if isiterable(obj, include_string=include_string):
for item in obj:
yield item
else:
yield obj

__all__ = ('isiterable', 'iterate',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/iterutils/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/iterutils/__pycache__/__init__.cpython-34.pyo View File


+ 19
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__init__.py View File

@@ -0,0 +1,19 @@
'''
The :mod:`kitchen.pycompat24` module contains implementations of functionality
introduced in python-2.4 for use on earlier versions of python.
'''
import warnings

warnings.warn('In python3, kitchen.pycompat24 is deprecated because the'
' python stdlib has this code in all python3 versions. If your code'
' doesn\'t have to remain compatible with python less than 2.4 use'
' python3\'s stdlib versions of base64, subprocess, and the builtin'
' set types instead',
PendingDeprecationWarning, stacklevel=2)

from kitchen.versioning import version_tuple_to_string

__version_info__ = ((1, 1, 0),)
__version__ = version_tuple_to_string(__version_info__)

__all__ = ('base64', 'sets', 'subprocess')

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/__init__.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/subprocess.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/__pycache__/subprocess.cpython-34.pyo View File


+ 56
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/base64/__init__.py View File

@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc
#
# This file is part of kitchen
#
# kitchen is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# kitchen is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>

'''
Implement the modern base64 interface.

Python-2.4 and above have a new API for the base64 module. This is a backport
of that module for use on python-2.3.

.. seealso::
:mod:`base64`
for information about using the functions provided here.
'''
# All versions of python3 include a base64 module. This module just exists for
# compatibility


# :W0401,W0614: The purpose of this module is to create a backport of base64
# so we ignore these pylint warnings

import warnings

warnings.warn('In python3, kitchen.pycompat24.base64 is deprecated.'
' If your code doesn\'t have to remain compatible with python2 use'
' python3\'s native dict or defaultdict types instead',
PendingDeprecationWarning, stacklevel=2)

#pylint:disable-msg=W0401,W0614
from base64 import *

decodestring = decode
encodestring = encode

__all__ = ( 'b16decode', 'b16encode', 'b32decode', 'b32encode', 'b64decode',
'b64encode', 'decode', 'decodebytes', 'decodestring', 'encode',
'encodebytes', 'encodestring', 'standard_b64decode',
'standard_b64encode', 'urlsafe_b64decode', 'urlsafe_b64encode',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/base64/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/base64/__pycache__/__init__.cpython-34.pyo View File


+ 54
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/sets/__init__.py View File

@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc
#
# This file is part of kitchen
#
# kitchen is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# kitchen is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>

'''
In python-2.4, a builtin :class:`set` type was added to python. This module
provides a function to emulate that on python-2.3 by using the :mod:`sets`
module.

:func:`set`
Create a set. If running on python 2.4+ this is the :class:`set`
constructor. If using python-2.3, it's :class:`sets.Set`.

:func:`frozenset`
Create a frozenset. If running on python2.4+ this is the
:class:`frozenset` constructor. If using python-2.3, it's
:class:`sets.ImmutableSet`.

.. versionchanged:: 0.2.0 API: kitchen.pycompat24 1.0.0
Added set and frozenset
'''

# All versions of python3 have set and frozenset. This module just remains
# for compatibility
import warnings

warnings.warn('In python3, kitchen.pycompat24.sets is deprecated.'
' If your code doesn\'t need to maintain compatibility with'
' python less than 2.4, there is no reason to use anything in this'
' module.', PendingDeprecationWarning, stacklevel=2)

set = set
frozenset = frozenset
add_builtin_set = lambda: None

__all__ = ('add_builtin_set', 'set', 'frozenset')

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/sets/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/sets/__pycache__/__init__.cpython-34.pyo View File


+ 13
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat24/subprocess.py View File

@@ -0,0 +1,13 @@
# :W0401, W0611, W0614: Rather than have two versions of subprocess, we import
# the python2.7 version here as well
#pylint:disable-msg=W0401,W0611,W0614
import kitchen.pycompat27.subprocess as __s
from kitchen.pycompat27.subprocess import *
from kitchen.pycompat27.subprocess import __all__

import warnings

warnings.warn('In python3, kitchen.pycompat24.subprocess is deprecated.'
' If your code doesn\'t have to remain compatible with python less'
' than 2.4 use subprocess from the python3 stdlib',
PendingDeprecationWarning, stacklevel=2)

+ 20
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/__init__.py View File

@@ -0,0 +1,20 @@
'''
The :mod:`kitchen.pycompat25` module contains implementations of functionality
introduced in python-2.5.
'''
import warnings

warnings.warn('In python3, kitchen.pycompat25 is deprecated because all'
' functionality in this module is found in the python3 stdlib.'
' If your code doesn\'t need to maintain compatibility with'
' python less than 2.5, use collections.defaultdict from the python3'
' stdlib.',
PendingDeprecationWarning, stacklevel=2)

from kitchen.versioning import version_tuple_to_string

__version_info__ = ((1, 0, 0),)
__version__ = version_tuple_to_string(__version_info__)


__all__ = ('collections',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/__pycache__/__init__.cpython-34.pyo View File


+ 23
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/collections/__init__.py View File

@@ -0,0 +1,23 @@
# All versions of python3 include defaultdict. This module just exists for
# backwards compatibility
#
import warnings

warnings.warn('In python3, kitchen.pycompat25.collections is deprecated'
' If you do not need to maintain compatibility with python less'
' than 2.5 use collections from the stdlib instead.',
PendingDeprecationWarning, stacklevel=2)

from collections import defaultdict as _d

class defaultdict(_d):
'''*Deprecated*. See help(collections.defaultdict) for usage'''
def __init__(self, *args, **kwargs):
warnings.warn('In python3, kitchen.pycompat25.collections.defaultdict'
' is deprecated. If you do not need to maintain compatibility'
' with python less than 2.5 use collections.defaultdict from'
' the stdlib instead.',
PendingDeprecationWarning, stacklevel=2)
super(defaultdict, self).__init__(*args, **kwargs)

__all__ = ('defaultdict',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/collections/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat25/collections/__pycache__/__init__.cpython-34.pyo View File


+ 21
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/__init__.py View File

@@ -0,0 +1,21 @@
'''
The :mod:`kitchen.pycompat27` module contains implementations of functionality
introduced in python-2.7 for use on earlier versions of python.

.. versionchanged:: 0.2.3
Made mswindows, MAXFD, and list2cmdline available from the module
'''
import warnings

warnings.warn('In python3, kitchen.pycompat27 is deprecated because all'
' functionality in this module is found in the python3 stdlib.'
' If your code doesn\'t need to maintain compatibility with'
' python less than 2.7, use subprocess from the python3 stdlib.',
PendingDeprecationWarning, stacklevel=2)

from kitchen.versioning import version_tuple_to_string

__version_info__ = ((1, 1, 0),)
__version__ = version_tuple_to_string(__version_info__)

__all__ = ('subprocess',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/__pycache__/__init__.cpython-34.pyo View File


+ 47
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/subprocess/__init__.py View File

@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, Inc
#
# This file is part of kitchen
#
# kitchen is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# kitchen is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>

'''
Implement the modern subprocess interface

Python-2.5 and python-2.7 introduce new API features to subprocess. This is
a backport of that module for use on earlier python versions.

.. seealso::
:mod:`subprocess`
for information about using the functions provided here.
'''
import warnings

warnings.warn('In python3, kitchen.pycompat27.subprocess is deprecated.'
' If your code doesn\'t have to remain compatible with python less'
' than 2.7 use subprocess from the python3 stdlib',
PendingDeprecationWarning, stacklevel=2)

# :W0401,W0611,W0614: We're importing compatibility to the python-2.7 version
# of subprocess.
#pylint:disable-msg=W0401,W0611,W0614
# All versions of python3 have a modern enough subprocess. This module only
# exists for backwards compatibility
from subprocess import *
from subprocess import MAXFD, list2cmdline, mswindows
from subprocess import __all__

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/subprocess/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/pycompat27/subprocess/__pycache__/__init__.cpython-34.pyo View File


+ 35
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/release.py View File

@@ -0,0 +1,35 @@
'''
Information about this kitchen release.
'''

from kitchen import _, __version__

NAME = 'kitchen'
VERSION = __version__
DESCRIPTION = _('Kitchen contains a cornucopia of useful code')
LONG_DESCRIPTION = _('''
We've all done it. In the process of writing a brand new application we've
discovered that we need a little bit of code that we've invented before.
Perhaps it's something to handle unicode text. Perhaps it's something to make
a bit of python-2.5 code run on python-2.3. Whatever it is, it ends up being
a tiny bit of code that seems too small to worry about pushing into its own
module so it sits there, a part of your current project, waiting to be cut and
pasted into your next project. And the next. And the next. And since that
little bittybit of code proved so useful to you, it's highly likely that it
proved useful to someone else as well. Useful enough that they've written it
and copy and pasted it over and over into each of their new projects.

Well, no longer! Kitchen aims to pull these small snippets of code into a few
python modules which you can import and use within your project. No more copy
and paste! Now you can let someone else maintain and release these small
snippets so that you can get on with your life.
''')
AUTHOR = 'Toshio Kuratomi, Seth Vidal, others'
EMAIL = 'toshio@fedoraproject.org'
COPYRIGHT = '2012 Red Hat, Inc. and others'
URL = 'https://fedorahosted.org/kitchen'
DOWNLOAD_URL = 'https://fedorahosted.org/releases/k/i/kitchen'
LICENSE = 'LGPLv2+'

__all__ = ('NAME', 'VERSION', 'DESCRIPTION', 'LONG_DESCRIPTION', 'AUTHOR',
'EMAIL', 'COPYRIGHT', 'URL', 'DOWNLOAD_URL', 'LICENSE')

+ 17
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__init__.py View File

@@ -0,0 +1,17 @@
'''
------------
Kitchen.text
------------

Kitchen.text contains functions for manipulating text in python.

This includes things like converting between byte strings and unicode,
and displaying text on the screen.
'''

from kitchen.versioning import version_tuple_to_string

__version_info__ = ((2, 2, 0),)
__version__ = version_tuple_to_string(__version_info__)

__all__ = ('converters', 'exceptions', 'misc',)

BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/__init__.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/__init__.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/converters.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/converters.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/display.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/display.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/exceptions.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/exceptions.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/misc.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/misc.cpython-34.pyo View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/utf8.cpython-34.pyc View File


BIN
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/__pycache__/utf8.cpython-34.pyo View File


+ 900
- 0
python3-kitchen/pkg/python3-kitchen/usr/lib/python3.4/site-packages/kitchen/text/converters.py View File

@@ -0,0 +1,900 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011-2012 Red Hat, Inc.
#
# kitchen is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# kitchen is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with kitchen; if not, see <http://www.gnu.org/licenses/>
#
# Authors:
# Toshio Kuratomi <toshio@fedoraproject.org>
# Seth Vidal
#
# Portions of code taken from yum/i18n.py and
# python-fedora: fedora/textutils.py

'''
Functions to handle conversion of byte :class:`bytes` and :class:`str`
strings.

.. versionchanged:: kitchen 0.2a2 ; API kitchen.text 2.0.0
Added :func:`~kitchen.text.converters.getwriter`

.. versionchanged:: kitchen 0.2.2 ; API kitchen.text 2.1.0
Added :func:`~kitchen.text.converters.exception_to_unicode`,
:func:`~kitchen.text.converters.exception_to_bytes`,
:data:`~kitchen.text.converters.EXCEPTION_CONVERTERS`,
and :data:`~kitchen.text.converters.BYTE_EXCEPTION_CONVERTERS`

.. versionchanged:: kitchen 1.0.1 ; API kitchen.text 2.1.1
Deprecated :data:`~kitchen.text.converters.BYTE_EXCEPTION_CONVERTERS` as
we've simplified :func:`~kitchen.text.converters.exception_to_unicode` and
:func:`~kitchen.text.converters.exception_to_bytes` to make it unnecessary

'''
from base64 import b64encode, b64decode

import codecs
import warnings
import xml.sax.saxutils

from kitchen.text.exceptions import ControlCharError, XmlEncodeError
from kitchen.text.misc import guess_encoding, html_entities_unescape, \
isbytestring, isunicodestring, process_control_chars

#: Aliases for the utf-8 codec
_UTF8_ALIASES = frozenset(('utf-8', 'UTF-8', 'utf8', 'UTF8', 'utf_8', 'UTF_8',
'utf', 'UTF', 'u8', 'U8'))
#: Aliases for the latin-1 codec
_LATIN1_ALIASES = frozenset(('latin-1', 'LATIN-1', 'latin1', 'LATIN1',
'latin', 'LATIN', 'l1', 'L1', 'cp819', 'CP819', '8859', 'iso8859-1',
'ISO8859-1', 'iso-8859-1', 'ISO-8859-1'))

# EXCEPTION_CONVERTERS is defined below due to using to_unicode

def to_unicode(obj, encoding='utf-8', errors='replace', nonstring=None,
non_string=None):
'''Convert an object into a :class:`str` string

:arg obj: Object to convert to a :class:`str` string. This should
normally be a byte :class:`bytes`
:kwarg encoding: What encoding to try converting the byte :class:`bytes` as.
Defaults to :term:`utf-8`
:kwarg errors: If errors are found while decoding, perform this action.
Defaults to ``replace`` which replaces the invalid bytes with
a character that means the bytes were unable to be decoded. Other
values are the same as the error handling schemes in the `codec base
classes
<http://docs.python.org/library/codecs.html#codec-base-classes>`_.
For instance ``strict`` which raises an exception and ``ignore`` which
simply omits the non-decodable characters.
:kwarg nonstring: How to treat nonstring values. Possible values are:

:simplerepr: Attempt to call the object's "simple representation"
method and return that value. Python-2.3+ has two methods that
try to return a simple representation: :meth:`object.__unicode__`
and :meth:`object.__str__`. We first try to get a usable value
from :meth:`object.__unicode__`. If that fails we try the same
with :meth:`object.__str__`.
:empty: Return an empty :class:`str` string
:strict: Raise a :exc:`TypeError`
:passthru: Return the object unchanged
:repr: Attempt to return a :class:`str` string of the repr of the
object

Default is ``simplerepr``

:kwarg non_string: *Deprecated* Use :attr:`nonstring` instead
:raises TypeError: if :attr:`nonstring` is ``strict`` and
a non-:class:`basestring` object is passed in or if :attr:`nonstring`
is set to an unknown value
:raises UnicodeDecodeError: if :attr:`errors` is ``strict`` and
:attr:`obj` is not decodable using the given encoding
:returns: :class:`str` string or the original object depending on the
value of :attr:`nonstring`.

Usually this should be used on a byte :class:`bytes` but it can take both
byte :class:`bytes` and :class:`str` strings intelligently. Nonstring
objects are handled in different ways depending on the setting of the
:attr:`nonstring` parameter.

The default values of this function are set so as to always return
a :class:`str` string and never raise an error when converting from
a byte :class:`bytes` to a :class:`str` string. However, when you do
not pass validly encoded text (or a nonstring object), you may end up with
output that you don't expect. Be sure you understand the requirements of
your data, not just ignore errors by passing it through this function.

.. versionchanged:: 0.2.1a2
Deprecated :attr:`non_string` in favor of :attr:`nonstring` parameter and changed
default value to ``simplerepr``
'''
# Could use isbasestring/isunicode here but we want this code to be as
# fast as possible
if isinstance(obj, str):
return obj

if isinstance(obj, (bytes, bytearray)):
if encoding in _UTF8_ALIASES:
return str(obj, 'utf-8', errors)
if encoding in _LATIN1_ALIASES:
return obj.decode('latin-1', errors)
return obj.decode(encoding, errors)

if non_string:
warnings.warn('non_string is a deprecated parameter of'
' to_unicode(). Use nonstring instead', DeprecationWarning,
stacklevel=2)
if not nonstring:
nonstring = non_string

if not nonstring:
nonstring = 'simplerepr'
if nonstring == 'empty':
return ''
elif nonstring == 'passthru':
return obj
elif nonstring == 'simplerepr':
try:
simple = str(obj)
except UnicodeError:
try:
simple = obj.__str__()
except (UnicodeError, AttributeError):
simple = ''
if not isunicodestring(simple):
return str(simple, encoding, errors)
return simple
elif nonstring in ('repr', 'strict'):
obj_repr = repr(obj)
if not isunicodestring(obj_repr):
obj_repr = str(obj_repr, encoding, errors)
if nonstring == 'repr':
return obj_repr
raise TypeError('to_unicode was given "%(obj)s" which is neither'
' a byte string (str) or a unicode string' %
{'obj': obj_repr.encode(encoding, 'replace')})

raise TypeError('nonstring value, %(param)s, is not set to a valid'
' action' % {'param': nonstring})

def to_bytes(obj, encoding='utf-8', errors='replace', nonstring=None,
non_string=None):
'''Convert an object into a byte :class:`bytes`

:arg obj: Object to convert to a byte :class:`bytes`. This should normally
be a :class:`str` string.
:kwarg encoding: Encoding to use to convert the :class:`str` string
into a byte :class:`bytes`. Defaults to :term:`utf-8`.
:kwarg errors: If errors are found while encoding, perform this action.
Defaults to ``replace`` which replaces the invalid bytes with
a character that means the bytes were unable to be encoded. Other
values are the same as the error handling schemes in the `codec base
classes