readthedocs/commonmark.py

pip install different from GitHub source, includes duplicate / old methods?

hyperknot opened this issue · 3 comments

When trying to find the new syntax to set softbreak, I've run across the following issue.

  1. There are files in the pip install which are not in Github project source. For example, html.py
  2. These file contain possibly old, non-compatible code. For example html.py has
class HtmlRenderer(object):

    def __init__(self, options={}, softbreak='\n'):
        # by default, soft breaks are rendered as newlines in HTML.
        # set to "<br />" to make them hard breaks
        # set to " " if you want to ignore line wrapping in source
        self.softbreak = softbreak
        self.options = options
  1. This is really confusing, as there is an other (newer?) implementation in render/html.py, which says
class HtmlRenderer(Renderer):
    def __init__(self, options={}):
        #  by default, soft breaks are rendered as newlines in HTML
        options['softbreak'] = options.get('softbreak') or '\n'
        # set to "<br />" to make them hard breaks
        # set to " " if you want to ignore line wrapping in source

        self.disable_tags = 0
        self.last_out = '\n'
        self.options = options

I've deleted the old html.py and everything seems to be fine. This way I could actually debug my issue and find the new syntax for softbreak.

Can you make sure that the pip isn't installing any leftover, deprecated, non-used, etc. files?

Thanks for letting me know.. that's really annoying! I'll release a new version soon. It looks like this happened because I didn't remove my build directory when making the version that switched from using html.py to render/html.py. It won't happen again.

I've released version 0.7.2 which doesn't have those outdated files. Let me know if you still run into something weird.

Thanks!

On 10 August 2016 at 17:55, Nik Nyby notifications@github.com wrote:

I've released version 0.7.2 which doesn't have those outdated files. Let
me know if you still run into something weird.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#79 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAeKj8-tJe2VzdDoB9oFPTJFBflKPn0Bks5qefSDgaJpZM4JcIUK
.