From: Jeff B. <its...@gm...> - 2008-05-30 21:25:23
|
In 2.5 the result is wrapped in a ParseResult class so that fields can be accessed by name, but a plain tuple is returned in 2.4. --- I don't think I've seen any patches on the list yet, but you can apply it with git-am. markdown.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/markdown.py b/markdown.py index 3348acc..422cde4 100644 --- a/markdown.py +++ b/markdown.py @@ -34,7 +34,7 @@ __revision__ = "$Rev$" import re, sys, codecs -from urlparse import urlparse +from urlparse import urlparse, urlunparse from logging import getLogger, StreamHandler, Formatter, \ DEBUG, INFO, WARN, ERROR, CRITICAL @@ -930,9 +930,9 @@ class LinkPattern (Pattern): """ locless_schemes = ['', 'mailto', 'news'] - url = urlparse(url) + scheme, netloc, path, params, query, fragment = url = urlparse(url) safe_url = False - if url.netloc != '' or url.scheme in locless_schemes: + if netloc != '' or scheme in locless_schemes: safe_url = True for part in url[2:]: @@ -942,7 +942,7 @@ class LinkPattern (Pattern): if self.safe_mode and not safe_url: return '' else: - return url.geturl() + return urlunparse(url) class ImagePattern(LinkPattern): """ Return a NanoDom img Element from the given match. """ -- 1.5.5.1 |
From: Yuri T. <qar...@gm...> - 2008-05-30 22:18:45
|
Thanks. I pushed this commit. Sorry about this, not sure when this has slipped in. My goal has been to keep compatibility not only with 2.4 but also with 2.3. I also noticed that while markdown.py works with 2.3 (well used to, and now again with your patch), the test-markdown.py script did not. So, I changed test-markdown.py to work with 2.3. So, let's all agree that test-markdown.py should be ran with python2.3, python2.4 and python2.5 after each change. If you cannot check it with all three, then make a commit in a branch and email it to me so that I could test before merging. Also, Waylan and David, can you check in test cases for the fixes you made in the recent months? BTW, I also noticed that we have a regression on one of the tests. I suspect this might be the price we are paying for some of the other issues that Waylan fixed. Hopefully we'll resolve this with Artem's help over the next few months. - yuri On Fri, May 30, 2008 at 2:22 PM, Jeff Balogh <its...@gm...> wrote: > In 2.5 the result is wrapped in a ParseResult class so that fields can be > accessed by name, but a plain tuple is returned in 2.4. > --- > > I don't think I've seen any patches on the list yet, but you can apply it with > git-am. > > markdown.py | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/markdown.py b/markdown.py > index 3348acc..422cde4 100644 > --- a/markdown.py > +++ b/markdown.py > @@ -34,7 +34,7 @@ __revision__ = "$Rev$" > > > import re, sys, codecs > -from urlparse import urlparse > +from urlparse import urlparse, urlunparse > > from logging import getLogger, StreamHandler, Formatter, \ > DEBUG, INFO, WARN, ERROR, CRITICAL > @@ -930,9 +930,9 @@ class LinkPattern (Pattern): > > """ > locless_schemes = ['', 'mailto', 'news'] > - url = urlparse(url) > + scheme, netloc, path, params, query, fragment = url = urlparse(url) > safe_url = False > - if url.netloc != '' or url.scheme in locless_schemes: > + if netloc != '' or scheme in locless_schemes: > safe_url = True > > for part in url[2:]: > @@ -942,7 +942,7 @@ class LinkPattern (Pattern): > if self.safe_mode and not safe_url: > return '' > else: > - return url.geturl() > + return urlunparse(url) > > class ImagePattern(LinkPattern): > """ Return a NanoDom img Element from the given match. """ > -- > 1.5.5.1 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- http://sputnik.freewisdom.org/ |
From: Waylan L. <wa...@gm...> - 2008-05-31 03:03:28
|
On Fri, May 30, 2008 at 6:18 PM, Yuri Takhteyev <qar...@gm...> wrote: > Thanks. I pushed this commit. Sorry about this, not sure when this > has slipped in. My goal has been to keep compatibility not only with > 2.4 but also with 2.3. I also noticed that while markdown.py works > with 2.3 (well used to, and now again with your patch), the > test-markdown.py script did not. So, I changed test-markdown.py to > work with 2.3. > > So, let's all agree that test-markdown.py should be ran with > python2.3, python2.4 and python2.5 after each change. If you cannot > check it with all three, then make a commit in a branch and email it > to me so that I could test before merging. Yeah, I forget to test in multiple versions sometimes. Thanks for the reminder. > > Also, Waylan and David, can you check in test cases for the fixes you > made in the recent months? I've been adding tests for most of the changes I make. There's just been a few things that aren't directly related to the syntax. And, IIRC, David has made very few syntax changes - all with tests. > > BTW, I also noticed that we have a regression on one of the tests. I > suspect this might be the price we are paying for some of the other > issues that Waylan fixed. Yes, but I forget which one now. Anyway, I wasn't worried about it because the test shouldn't have been passing anyway. If you look at the html file for that test it is obvious that that is not the intended result. I'd rather have it fail than create some false sense that it's passing. > Hopefully we'll resolve this with Artem's > help over the next few months. Yeah, if he's working on how InlinePatterns nest, that should fix the issue. -- ---- Waylan Limberg wa...@gm... |
From: Waylan L. <wa...@gm...> - 2008-06-06 12:28:22
|
Hey Yuri, I don't see where this was pushed to Gitorious. What am I missing? On Fri, May 30, 2008 at 6:18 PM, Yuri Takhteyev <qar...@gm...> wrote: > Thanks. I pushed this commit. Sorry about this, not sure when this > has slipped in. My goal has been to keep compatibility not only with > 2.4 but also with 2.3. I also noticed that while markdown.py works > with 2.3 (well used to, and now again with your patch), the > test-markdown.py script did not. So, I changed test-markdown.py to > work with 2.3. > > So, let's all agree that test-markdown.py should be ran with > python2.3, python2.4 and python2.5 after each change. If you cannot > check it with all three, then make a commit in a branch and email it > to me so that I could test before merging. > > Also, Waylan and David, can you check in test cases for the fixes you > made in the recent months? > > BTW, I also noticed that we have a regression on one of the tests. I > suspect this might be the price we are paying for some of the other > issues that Waylan fixed. Hopefully we'll resolve this with Artem's > help over the next few months. > > - yuri > > On Fri, May 30, 2008 at 2:22 PM, Jeff Balogh <its...@gm...> wrote: >> In 2.5 the result is wrapped in a ParseResult class so that fields can be >> accessed by name, but a plain tuple is returned in 2.4. >> --- >> >> I don't think I've seen any patches on the list yet, but you can apply it with >> git-am. >> >> markdown.py | 8 ++++---- >> 1 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/markdown.py b/markdown.py >> index 3348acc..422cde4 100644 >> --- a/markdown.py >> +++ b/markdown.py >> @@ -34,7 +34,7 @@ __revision__ = "$Rev$" >> >> >> import re, sys, codecs >> -from urlparse import urlparse >> +from urlparse import urlparse, urlunparse >> >> from logging import getLogger, StreamHandler, Formatter, \ >> DEBUG, INFO, WARN, ERROR, CRITICAL >> @@ -930,9 +930,9 @@ class LinkPattern (Pattern): >> >> """ >> locless_schemes = ['', 'mailto', 'news'] >> - url = urlparse(url) >> + scheme, netloc, path, params, query, fragment = url = urlparse(url) >> safe_url = False >> - if url.netloc != '' or url.scheme in locless_schemes: >> + if netloc != '' or scheme in locless_schemes: >> safe_url = True >> >> for part in url[2:]: >> @@ -942,7 +942,7 @@ class LinkPattern (Pattern): >> if self.safe_mode and not safe_url: >> return '' >> else: >> - return url.geturl() >> + return urlunparse(url) >> >> class ImagePattern(LinkPattern): >> """ Return a NanoDom img Element from the given match. """ >> -- >> 1.5.5.1 >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Python-markdown-discuss mailing list >> Pyt...@li... >> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss >> > > > > -- > http://sputnik.freewisdom.org/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- Waylan Limberg wa...@gm... |
From: Waylan L. <wa...@gm...> - 2008-06-06 12:46:09
|
Sorry, for some reason those commits are not listed on the Gitorious front page (or the repo's overview page) but they are listed on the repo's commit page. Weird. On Fri, Jun 6, 2008 at 8:28 AM, Waylan Limberg <wa...@gm...> wrote: > Hey Yuri, I don't see where this was pushed to Gitorious. What am I missing? > > On Fri, May 30, 2008 at 6:18 PM, Yuri Takhteyev <qar...@gm...> wrote: >> Thanks. I pushed this commit. Sorry about this, not sure when this >> has slipped in. My goal has been to keep compatibility not only with >> 2.4 but also with 2.3. I also noticed that while markdown.py works >> with 2.3 (well used to, and now again with your patch), the >> test-markdown.py script did not. So, I changed test-markdown.py to >> work with 2.3. >> >> So, let's all agree that test-markdown.py should be ran with >> python2.3, python2.4 and python2.5 after each change. If you cannot >> check it with all three, then make a commit in a branch and email it >> to me so that I could test before merging. >> >> Also, Waylan and David, can you check in test cases for the fixes you >> made in the recent months? >> >> BTW, I also noticed that we have a regression on one of the tests. I >> suspect this might be the price we are paying for some of the other >> issues that Waylan fixed. Hopefully we'll resolve this with Artem's >> help over the next few months. >> >> - yuri >> >> On Fri, May 30, 2008 at 2:22 PM, Jeff Balogh <its...@gm...> wrote: >>> In 2.5 the result is wrapped in a ParseResult class so that fields can be >>> accessed by name, but a plain tuple is returned in 2.4. >>> --- >>> >>> I don't think I've seen any patches on the list yet, but you can apply it with >>> git-am. >>> >>> markdown.py | 8 ++++---- >>> 1 files changed, 4 insertions(+), 4 deletions(-) >>> >>> diff --git a/markdown.py b/markdown.py >>> index 3348acc..422cde4 100644 >>> --- a/markdown.py >>> +++ b/markdown.py >>> @@ -34,7 +34,7 @@ __revision__ = "$Rev$" >>> >>> >>> import re, sys, codecs >>> -from urlparse import urlparse >>> +from urlparse import urlparse, urlunparse >>> >>> from logging import getLogger, StreamHandler, Formatter, \ >>> DEBUG, INFO, WARN, ERROR, CRITICAL >>> @@ -930,9 +930,9 @@ class LinkPattern (Pattern): >>> >>> """ >>> locless_schemes = ['', 'mailto', 'news'] >>> - url = urlparse(url) >>> + scheme, netloc, path, params, query, fragment = url = urlparse(url) >>> safe_url = False >>> - if url.netloc != '' or url.scheme in locless_schemes: >>> + if netloc != '' or scheme in locless_schemes: >>> safe_url = True >>> >>> for part in url[2:]: >>> @@ -942,7 +942,7 @@ class LinkPattern (Pattern): >>> if self.safe_mode and not safe_url: >>> return '' >>> else: >>> - return url.geturl() >>> + return urlunparse(url) >>> >>> class ImagePattern(LinkPattern): >>> """ Return a NanoDom img Element from the given match. """ >>> -- >>> 1.5.5.1 >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Python-markdown-discuss mailing list >>> Pyt...@li... >>> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss >>> >> >> >> >> -- >> http://sputnik.freewisdom.org/ >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Python-markdown-discuss mailing list >> Pyt...@li... >> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss >> > > > > -- > ---- > Waylan Limberg > wa...@gm... > -- ---- Waylan Limberg wa...@gm... |