bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

Added support to have comments in the changelog file #40

Closed rodcloutier closed 9 years ago

rodcloutier commented 9 years ago

Trying to use comments in the changelog.rst file would produce the following error

Exception occurred:
  File "R:\dev\git\platform_tooling\python_starter\venv\doc\lib\site-packages\releases\__init__.py", line 341, in construct_releases
    focus = obj[0].pop(0)
AttributeError: 'unicode' object has no attribute 'pop'

Here is a trace of the initial test without fix

Traceback (most recent call last):
  File "F:\bin\Python\278\Lib\unittest\case.py", line 329, in run
    testMethod()
  File "R:\dev\experiments\releases\venv\lib\site-packages\nose\case.py", line 197, in runTest
    self.test(*self.arg)
  File "R:\dev\experiments\releases\tests\changelog.py", line 338, in comments_are_not_parsed
    cl = _releases(('.. This is a comment ',))
  File "R:\dev\experiments\releases\tests\changelog.py", line 131, in _releases
    return construct_releases(_release_list(*entries), app)
  File "r:\dev\experiments\releases\releases\__init__.py", line 345, in construct_releases
    focus = obj[0].pop(0)
AttributeError: 'str' object has no attribute 'pop'

This pull request aims to fix this issue.

bitprophet commented 9 years ago

@rodcloutier Figure it out? Can't recall if anybody's tried using RST comments in changelog files before, tbh.

rodcloutier commented 9 years ago

I did. My first pull request was too naive. I have another pull request (#41) to fix this.

We don't normally use comments in changelog files but this time we wanted to use some for a skeleton project.

Le 2015-07-20 à 15:31, Jeff Forcier notifications@github.com a écrit :

@rodcloutier Figure it out? Can't recall if anybody's tried using RST comments in changelog files before, tbh.

— Reply to this email directly or view it on GitHub.