New Upstream Snapshot - pyjavaproperties
Ready changes
Summary
Merged new upstream version: 0.7+git20200205.1.c6f7954 (was: 0.7).
Resulting package
Built on 2023-01-19T04:35 (took 3m38s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots python3-pyjavaproperties
Lintian Result
Diff
diff --git a/PKG-INFO b/PKG-INFO
index 6e57791..144631e 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,4 +1,4 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pyjavaproperties
Version: 0.7
Summary: Python replacement for java.util.Properties.
@@ -6,108 +6,108 @@ Home-page: https://bitbucket.org/skeptichacker/pyjavaproperties/
Author: Anand B Pillai
Author-email: anandpillai@letterboxes.org
License: MIT License
-Description: About
- -----
-
- This is a fork of "python replacement for java.util.Properties" recipe on ASPN:
- http://code.activestate.com/recipes/496795/ The project is maintained by Anand B Pillai
- anandpillai@letterboxes.org, anand@anvetsu.com .
-
- License
- -------
-
- The code is re-licensed under MIT License. See ``LICENSE`` file for more details.
-
- What this is
- ------------
-
- This module is designed to be a python equivalent to the
- ``java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>``\ \_
- class.
-
- Currently, the basic input/output methods are supported.
-
- Fundamentally, this module is designed so that users can easily parse and manipulate Java Properties
- files - that's it. There's a fair number of us pythonistas who work in multi-language shops, and
- constantly writing your own parsing mechanism is just painful. Not to mention Java guys are
- notoriously unwilling to use anything which is cross-language for configuration, unless it's XML,
- which is a form of self-punishment. :)
-
- Python support
- --------------
-
- The module is cross Python2 and Python3 compatible.
-
- This module has basic support for Python3. It means the tests should pass under any version of
- Python3 though it has been tested only for versions >= Python 3.6.6.
-
- Due to the changes for Python3, this should work under any Python2 version >= Python 2.7.
-
- Caveats
- -------
-
- The code still uses Python2 type strings inside. In other words proper unicode support is still
- missing.
-
- Plans
- -----
-
- Here is a plan for the current version which runs under Python2 in approximate decreasing priority
- order.
-
- 1. Keep/maintain blank lines and comments found in the original file
- 2. Add unicode support
- 3. Provide python property access on top of direct dictionary get/set
- 4. Make the module compatible with the new methods in latest J2SE.
-
- Usage
- -----
-
- ::
-
- from pyjavaproperties import Properties
- p = Properties()
- p.load(open('test.properties'))
- p.list()
- print p
- print p.items()
- print p['name3']
- p['name3'] = 'changed = value'
- print p['name3']
- p['new key'] = 'new value'
- p.store(open('test2.properties','w'))
-
- See also the Properties.list() method, which will return an iterator over the property keys
-
- Tests
- -----
-
- ::
-
- $ python pyjavaproperties_test.py
-
- Changes & News
- --------------
-
- version 0.7
- -----------
-
- - Setup.py for release 0.7.
- - Created CHANGELOG.txt
- - Updated README.md showing tests, changes section and updates to author etc.
- - Relicensed to MIT from PSF.
- - Rewrote N.B's patch to relicense repo under MIT.
- - Basic python3 support plus python2/3 cross compatibility.
- - Absorbing TODO in README.md.
- - README => README.md.
- - Added support for referenced properties.
- - Added tests for referenced properties and saving as well.
- - Minor tweaks in code.
- - Code moved to new git repo.
-
-Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+License-File: LICENSE
+
+About
+-----
+
+This is a fork of "python replacement for java.util.Properties" recipe on ASPN:
+http://code.activestate.com/recipes/496795/ The project is maintained by Anand B Pillai
+anandpillai@letterboxes.org, anand@anvetsu.com .
+
+License
+-------
+
+The code is re-licensed under MIT License. See ``LICENSE`` file for more details.
+
+What this is
+------------
+
+This module is designed to be a python equivalent to the
+``java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>``\ \_
+class.
+
+Currently, the basic input/output methods are supported.
+
+Fundamentally, this module is designed so that users can easily parse and manipulate Java Properties
+files - that's it. There's a fair number of us pythonistas who work in multi-language shops, and
+constantly writing your own parsing mechanism is just painful. Not to mention Java guys are
+notoriously unwilling to use anything which is cross-language for configuration, unless it's XML,
+which is a form of self-punishment. :)
+
+Python support
+--------------
+
+The module is cross Python2 and Python3 compatible.
+
+This module has basic support for Python3. It means the tests should pass under any version of
+Python3 though it has been tested only for versions >= Python 3.6.6.
+
+Due to the changes for Python3, this should work under any Python2 version >= Python 2.7.
+
+Caveats
+-------
+
+The code still uses Python2 type strings inside. In other words proper unicode support is still
+missing.
+
+Plans
+-----
+
+Here is a plan for the current version which runs under Python2 in approximate decreasing priority
+order.
+
+1. Keep/maintain blank lines and comments found in the original file
+2. Add unicode support
+3. Provide python property access on top of direct dictionary get/set
+4. Make the module compatible with the new methods in latest J2SE.
+
+Usage
+-----
+
+::
+
+ from pyjavaproperties import Properties
+ p = Properties()
+ p.load(open('test.properties'))
+ p.list()
+ print p
+ print p.items()
+ print p['name3']
+ p['name3'] = 'changed = value'
+ print p['name3']
+ p['new key'] = 'new value'
+ p.store(open('test2.properties','w'))
+
+See also the Properties.list() method, which will return an iterator over the property keys
+
+Tests
+-----
+
+::
+
+ $ python pyjavaproperties_test.py
+
+Changes & News
+--------------
+
+version 0.7
+-----------
+
+- Setup.py for release 0.7.
+- Created CHANGELOG.txt
+- Updated README.md showing tests, changes section and updates to author etc.
+- Relicensed to MIT from PSF.
+- Rewrote N.B's patch to relicense repo under MIT.
+- Basic python3 support plus python2/3 cross compatibility.
+- Absorbing TODO in README.md.
+- README => README.md.
+- Added support for referenced properties.
+- Added tests for referenced properties and saving as well.
+- Minor tweaks in code.
+- Code moved to new git repo.
diff --git a/debian/changelog b/debian/changelog
index 008f46f..56b33c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pyjavaproperties (0.7+git20200205.1.c6f7954-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 19 Jan 2023 04:33:08 -0000
+
pyjavaproperties (0.7-3) unstable; urgency=medium
[ Debian Janitor ]
diff --git a/debian/patches/install-test-files.patch b/debian/patches/install-test-files.patch
index 56c2f1a..d112d82 100644
--- a/debian/patches/install-test-files.patch
+++ b/debian/patches/install-test-files.patch
@@ -1,6 +1,8 @@
---- a/setup.py
-+++ b/setup.py
-@@ -7,6 +7,11 @@
+Index: pyjavaproperties.git/setup.py
+===================================================================
+--- pyjavaproperties.git.orig/setup.py
++++ pyjavaproperties.git/setup.py
+@@ -7,6 +7,11 @@ from setuptools import setup
with open("README.rst", "r") as fh:
long_description = fh.read()
@@ -12,7 +14,7 @@
setup(
name='pyjavaproperties',
version='0.7',
-@@ -25,6 +30,8 @@
+@@ -25,6 +30,8 @@ setup(
'Topic :: Software Development :: Libraries :: Python Modules',
],
py_modules=['pyjavaproperties'],
diff --git a/pyjavaproperties.egg-info/PKG-INFO b/pyjavaproperties.egg-info/PKG-INFO
index 6e57791..144631e 100644
--- a/pyjavaproperties.egg-info/PKG-INFO
+++ b/pyjavaproperties.egg-info/PKG-INFO
@@ -1,4 +1,4 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pyjavaproperties
Version: 0.7
Summary: Python replacement for java.util.Properties.
@@ -6,108 +6,108 @@ Home-page: https://bitbucket.org/skeptichacker/pyjavaproperties/
Author: Anand B Pillai
Author-email: anandpillai@letterboxes.org
License: MIT License
-Description: About
- -----
-
- This is a fork of "python replacement for java.util.Properties" recipe on ASPN:
- http://code.activestate.com/recipes/496795/ The project is maintained by Anand B Pillai
- anandpillai@letterboxes.org, anand@anvetsu.com .
-
- License
- -------
-
- The code is re-licensed under MIT License. See ``LICENSE`` file for more details.
-
- What this is
- ------------
-
- This module is designed to be a python equivalent to the
- ``java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>``\ \_
- class.
-
- Currently, the basic input/output methods are supported.
-
- Fundamentally, this module is designed so that users can easily parse and manipulate Java Properties
- files - that's it. There's a fair number of us pythonistas who work in multi-language shops, and
- constantly writing your own parsing mechanism is just painful. Not to mention Java guys are
- notoriously unwilling to use anything which is cross-language for configuration, unless it's XML,
- which is a form of self-punishment. :)
-
- Python support
- --------------
-
- The module is cross Python2 and Python3 compatible.
-
- This module has basic support for Python3. It means the tests should pass under any version of
- Python3 though it has been tested only for versions >= Python 3.6.6.
-
- Due to the changes for Python3, this should work under any Python2 version >= Python 2.7.
-
- Caveats
- -------
-
- The code still uses Python2 type strings inside. In other words proper unicode support is still
- missing.
-
- Plans
- -----
-
- Here is a plan for the current version which runs under Python2 in approximate decreasing priority
- order.
-
- 1. Keep/maintain blank lines and comments found in the original file
- 2. Add unicode support
- 3. Provide python property access on top of direct dictionary get/set
- 4. Make the module compatible with the new methods in latest J2SE.
-
- Usage
- -----
-
- ::
-
- from pyjavaproperties import Properties
- p = Properties()
- p.load(open('test.properties'))
- p.list()
- print p
- print p.items()
- print p['name3']
- p['name3'] = 'changed = value'
- print p['name3']
- p['new key'] = 'new value'
- p.store(open('test2.properties','w'))
-
- See also the Properties.list() method, which will return an iterator over the property keys
-
- Tests
- -----
-
- ::
-
- $ python pyjavaproperties_test.py
-
- Changes & News
- --------------
-
- version 0.7
- -----------
-
- - Setup.py for release 0.7.
- - Created CHANGELOG.txt
- - Updated README.md showing tests, changes section and updates to author etc.
- - Relicensed to MIT from PSF.
- - Rewrote N.B's patch to relicense repo under MIT.
- - Basic python3 support plus python2/3 cross compatibility.
- - Absorbing TODO in README.md.
- - README => README.md.
- - Added support for referenced properties.
- - Added tests for referenced properties and saving as well.
- - Minor tweaks in code.
- - Code moved to new git repo.
-
-Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+License-File: LICENSE
+
+About
+-----
+
+This is a fork of "python replacement for java.util.Properties" recipe on ASPN:
+http://code.activestate.com/recipes/496795/ The project is maintained by Anand B Pillai
+anandpillai@letterboxes.org, anand@anvetsu.com .
+
+License
+-------
+
+The code is re-licensed under MIT License. See ``LICENSE`` file for more details.
+
+What this is
+------------
+
+This module is designed to be a python equivalent to the
+``java.util.Properties <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>``\ \_
+class.
+
+Currently, the basic input/output methods are supported.
+
+Fundamentally, this module is designed so that users can easily parse and manipulate Java Properties
+files - that's it. There's a fair number of us pythonistas who work in multi-language shops, and
+constantly writing your own parsing mechanism is just painful. Not to mention Java guys are
+notoriously unwilling to use anything which is cross-language for configuration, unless it's XML,
+which is a form of self-punishment. :)
+
+Python support
+--------------
+
+The module is cross Python2 and Python3 compatible.
+
+This module has basic support for Python3. It means the tests should pass under any version of
+Python3 though it has been tested only for versions >= Python 3.6.6.
+
+Due to the changes for Python3, this should work under any Python2 version >= Python 2.7.
+
+Caveats
+-------
+
+The code still uses Python2 type strings inside. In other words proper unicode support is still
+missing.
+
+Plans
+-----
+
+Here is a plan for the current version which runs under Python2 in approximate decreasing priority
+order.
+
+1. Keep/maintain blank lines and comments found in the original file
+2. Add unicode support
+3. Provide python property access on top of direct dictionary get/set
+4. Make the module compatible with the new methods in latest J2SE.
+
+Usage
+-----
+
+::
+
+ from pyjavaproperties import Properties
+ p = Properties()
+ p.load(open('test.properties'))
+ p.list()
+ print p
+ print p.items()
+ print p['name3']
+ p['name3'] = 'changed = value'
+ print p['name3']
+ p['new key'] = 'new value'
+ p.store(open('test2.properties','w'))
+
+See also the Properties.list() method, which will return an iterator over the property keys
+
+Tests
+-----
+
+::
+
+ $ python pyjavaproperties_test.py
+
+Changes & News
+--------------
+
+version 0.7
+-----------
+
+- Setup.py for release 0.7.
+- Created CHANGELOG.txt
+- Updated README.md showing tests, changes section and updates to author etc.
+- Relicensed to MIT from PSF.
+- Rewrote N.B's patch to relicense repo under MIT.
+- Basic python3 support plus python2/3 cross compatibility.
+- Absorbing TODO in README.md.
+- README => README.md.
+- Added support for referenced properties.
+- Added tests for referenced properties and saving as well.
+- Minor tweaks in code.
+- Code moved to new git repo.
diff --git a/pyjavaproperties.py b/pyjavaproperties.py
index 55d634e..9d921a4 100644
--- a/pyjavaproperties.py
+++ b/pyjavaproperties.py
@@ -268,7 +268,7 @@ class Properties(object):
for key,value in self._props.items():
out.write(''.join((key,'=',value,'\n')))
- def store(self, out, header="", timestamp=True):
+ def store(self, out, header="", timestamp=True, escape=True):
""" Write the properties list to the stream 'out' along
with the optional 'header' """
@@ -284,7 +284,11 @@ class Properties(object):
for prop in self._keyorder:
if prop in self._origprops:
val = self._origprops[prop]
- out.write(''.join((prop,'=',self.escape(val),'\n')))
+ if escape:
+ out.write(''.join((prop,'=',self.escape(val),'\n')))
+ else:
+ # Dangerous perhaps!
+ out.write(''.join((prop,'=',val,'\n')))
def __contains__(self, key):
return key in self._props
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files