Skip to content

Commit

Permalink
[fc] Repository: plone.app.customerize
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-11-11T21:08:59+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.customerize@5b5d19a

Avoid leaving a file unclosed

On jenkins in python 3.7 this gives a ResourceWarning:

```
plone/app/customerize/registration.py:157: ResourceWarning: unclosed file &lt;_io.BufferedReader name='plone/app/customerize/tests/standard.pt'&gt;
```

Files changed:
M plone/app/customerize/registration.py
Repository: plone.app.customerize

Branch: refs/heads/master
Date: 2018-11-11T21:10:12+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: plone/plone.app.customerize@b0250a7

Update CHANGES.rst

Files changed:
M CHANGES.rst
Repository: plone.app.customerize

Branch: refs/heads/master
Date: 2018-11-14T11:26:27+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.customerize@f83a042

Merge pull request #17 from plone/gforcada-patch-1

Avoid leaving a file unclosed

Files changed:
M CHANGES.rst
M plone/app/customerize/registration.py
  • Loading branch information
jensens committed Nov 14, 2018
1 parent 2e032b1 commit 2a3a474
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
Repository: plone.releaser
Repository: plone.app.customerize


Branch: refs/heads/master
Date: 2018-11-13T13:12:47+01:00
Date: 2018-11-11T21:08:59+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.releaser/commit/a64e7058577a16aaecda3ea21b161bced9e12566
Commit: https://github.com/plone/plone.app.customerize/commit/5b5d19a59bc8910773e732f8f18d8488efd52a6e

Fix pypi URL for xmlrpc queries
Avoid leaving a file unclosed

That's the URL used on warehouse documentation: https://warehouse.pypa.io/api-reference/xml-rpc/
On jenkins in python 3.7 this gives a ResourceWarning:

```
plone/app/customerize/registration.py:157: ResourceWarning: unclosed file &lt;_io.BufferedReader name='plone/app/customerize/tests/standard.pt'&gt;
```

Files changed:
M plone/releaser/pypi.py
M plone/app/customerize/registration.py

b"diff --git a/plone/releaser/pypi.py b/plone/releaser/pypi.py\nindex cbf3efa..eb7600c 100644\n--- a/plone/releaser/pypi.py\n+++ b/plone/releaser/pypi.py\n@@ -7,7 +7,7 @@\n \n \n def get_users_with_release_rights(package_name):\n- client = ServerProxy('https://pypi.python.org/pypi')\n+ client = ServerProxy('https://pypi.org/pypi')\n existing_admins = set([\n user for role, user in client.package_roles(package_name)])\n return existing_admins\n"
b"diff --git a/plone/app/customerize/registration.py b/plone/app/customerize/registration.py\nindex 3ad7990..838d9fc 100644\n--- a/plone/app/customerize/registration.py\n+++ b/plone/app/customerize/registration.py\n@@ -154,7 +154,9 @@ def getTemplateCodeFromRegistration(reg):\n attr, template = findViewletTemplate(reg.factory)\n # TODO: we can't do template.read() here because of a bug in\n # Zope 3's ZPT implementation.\n- return open(template.filename, 'rb').read()\n+ with open(template.filename, 'rb') as template_file:\n+ content = template_file.read()\n+ return content\n \n \n def getViewPermissionFromRegistration(reg):\n"

Repository: plone.releaser
Repository: plone.app.customerize


Branch: refs/heads/master
Date: 2018-11-13T13:24:00+01:00
Date: 2018-11-11T21:10:12+01:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.releaser/commit/3e410a57984e7615a6940967f2c87bbe564055c0
Commit: https://github.com/plone/plone.app.customerize/commit/b0250a77f2d19e94dd6828785642e08870621f00

Add changelog entry
Update CHANGES.rst

Files changed:
A news/23.bugfix
M CHANGES.rst

b'diff --git a/news/23.bugfix b/news/23.bugfix\nnew file mode 100644\nindex 0000000..129984e\n--- /dev/null\n+++ b/news/23.bugfix\n@@ -0,0 +1,2 @@\n+Fix pypi URL.\n+[gforcada]\n'
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex cfca20a..88ce75a 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -15,8 +15,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n-\n+- Fix a ResourceWarning: do not leave a file unclosed.\n+ [gforcada]\n \n 1.3.8 (2018-10-30)\n ------------------\n'

Repository: plone.releaser
Repository: plone.app.customerize


Branch: refs/heads/master
Date: 2018-11-14T11:20:25+01:00
Date: 2018-11-14T11:26:27+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/plone.releaser/commit/0b36d32e0eb5fc0b2fb72979fc65830c5b62e9db
Commit: https://github.com/plone/plone.app.customerize/commit/f83a04265245d65fea980ee5909804ae9ed18af6

Merge pull request #22 from plone/gforcada-patch-1
Merge pull request #17 from plone/gforcada-patch-1

Fix pypi URL for xmlrpc queries
Avoid leaving a file unclosed

Files changed:
A news/23.bugfix
M plone/releaser/pypi.py
M CHANGES.rst
M plone/app/customerize/registration.py

b"diff --git a/news/23.bugfix b/news/23.bugfix\nnew file mode 100644\nindex 0000000..129984e\n--- /dev/null\n+++ b/news/23.bugfix\n@@ -0,0 +1,2 @@\n+Fix pypi URL.\n+[gforcada]\ndiff --git a/plone/releaser/pypi.py b/plone/releaser/pypi.py\nindex cbf3efa..eb7600c 100644\n--- a/plone/releaser/pypi.py\n+++ b/plone/releaser/pypi.py\n@@ -7,7 +7,7 @@\n \n \n def get_users_with_release_rights(package_name):\n- client = ServerProxy('https://pypi.python.org/pypi')\n+ client = ServerProxy('https://pypi.org/pypi')\n existing_admins = set([\n user for role, user in client.package_roles(package_name)])\n return existing_admins\n"
b"diff --git a/CHANGES.rst b/CHANGES.rst\nindex cfca20a..88ce75a 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -15,8 +15,8 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n-\n+- Fix a ResourceWarning: do not leave a file unclosed.\n+ [gforcada]\n \n 1.3.8 (2018-10-30)\n ------------------\ndiff --git a/plone/app/customerize/registration.py b/plone/app/customerize/registration.py\nindex 3ad7990..838d9fc 100644\n--- a/plone/app/customerize/registration.py\n+++ b/plone/app/customerize/registration.py\n@@ -154,7 +154,9 @@ def getTemplateCodeFromRegistration(reg):\n attr, template = findViewletTemplate(reg.factory)\n # TODO: we can't do template.read() here because of a bug in\n # Zope 3's ZPT implementation.\n- return open(template.filename, 'rb').read()\n+ with open(template.filename, 'rb') as template_file:\n+ content = template_file.read()\n+ return content\n \n \n def getViewPermissionFromRegistration(reg):\n"

0 comments on commit 2a3a474

Please sign in to comment.