[Repoze-dev] [issue106] repoze.bitblt mangles the encoding of HTML

2009-11-11 Thread Brian Sutherland

New submission from Brian Sutherland :

repoze.bitblt mangles the encoding of the HTML on the way out. Here's a test 
and sample fix. The 
fix is probably a bit naive, but seems to work for me.

--
files: encoding.patch
messages: 302
nosy: jinty
priority: bug
status: unread
title: repoze.bitblt mangles the encoding of HTML
topic: repoze.bitblt

__
Repoze Bugs 
<http://bugs.repoze.org/issue106>
__

encoding.patch
Description: Binary data
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue107] Percentage and pixel tags mangled when they shouldn't be

2009-11-12 Thread Brian Sutherland

New submission from Brian Sutherland :

Image tags like this:
   
   
Are re-written resulting in bitblt containing URLs which miss the regular 
expression. This means 
broken images.

Attached are 2 patches with tests which fix the 2 issues separately, they 
should be applied in 
order attached.

--
files: dont_rewrite_percentage_img_tags.patch
messages: 311
nosy: jinty
priority: bug
status: unread
title: Percentage and pixel  tags mangled when they shouldn't be
topic: repoze.bitblt

__
Repoze Bugs 
<http://bugs.repoze.org/issue107>
__

dont_rewrite_percentage_img_tags.patch
Description: Binary data
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue107] Percentage and pixel tags mangled when they shouldn't be

2009-11-12 Thread Brian Sutherland

Brian Sutherland  added the comment:

Second patch for img tags like: 

--
status: unread -> chatting

__
Repoze Bugs 
<http://bugs.repoze.org/issue107>
__

rewrite_px_img_tags.patch
Description: Binary data
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue103] repoze.bitblt removes doctype

2009-11-13 Thread Brian Sutherland

Brian Sutherland  added the comment:

I also was bitten by this. Attached is the patch I am using, it includes and 
expands on the 
originally posted patches using dbaty's "more complex than it should be" method 
to keep the 
doctype out of html that didn't already have it.

Using regexes does start to seem like a nice idea after looking at all the 
gymnastics one has to 
go through with lxml.

__
Repoze Bugs 
<http://bugs.repoze.org/issue103>
__

keep_html_and_xhtml_doctypes.patch
Description: Binary data
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue103] repoze.bitblt removes doctype

2009-11-13 Thread Brian Sutherland

Brian Sutherland  added the comment:

As an alternative to regexes, there's always BeautifulSoup 
http://www.crummy.com/software/BeautifulSoup/documentation.html

--
nosy: +jinty

__
Repoze Bugs 
<http://bugs.repoze.org/issue103>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue103] repoze.bitblt removes doctype

2009-11-13 Thread Brian Sutherland

Brian Sutherland  added the comment:

You're right on the slowness of beautifulsoup compared to lxml: 
http://blog.ianbicking.org/2008/03/30/python-html-parser-performance/

__
Repoze Bugs 
<http://bugs.repoze.org/issue103>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue107] Percentage and pixel tags mangled when they shouldn't be

2009-11-16 Thread Brian Sutherland

Brian Sutherland  added the comment:

Patches committed in 7224 and 7225.

--
status: chatting -> resolved

__
Repoze Bugs 
<http://bugs.repoze.org/issue107>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue106] repoze.bitblt mangles the encoding of HTML

2009-11-16 Thread Brian Sutherland

Brian Sutherland  added the comment:

committed in r7088.

--
status: chatting -> resolved

__
Repoze Bugs 
<http://bugs.repoze.org/issue106>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue115] repoze.bitblt does not maintain GIF transparency

2009-12-21 Thread Brian Sutherland

New submission from Brian Sutherland :

Resized gif lose their transparency. It seems that this is the way to do it:

http://nadiana.com/pil-tips-converting-png-gif#Saving_GIF_with_transparency
http://www.velocityreviews.com/forums/t354000-pil-and-transparent-gifs.html

I'll attempt to add a minimal transparent and non-transparent gif test image to 
tests.py along 
the lines of jpeg_image_data.

--
messages: 340
nosy: jinty
priority: bug
status: unread
title: repoze.bitblt does not maintain GIF transparency
topic: repoze.bitblt

__
Repoze Bugs 
<http://bugs.repoze.org/issue115>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue115] repoze.bitblt does not maintain GIF transparency

2009-12-21 Thread Brian Sutherland

Brian Sutherland  added the comment:

revision 7678

--
status: unread -> resolved

__
Repoze Bugs 
<http://bugs.repoze.org/issue115>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] Licensing of sourcecodegen and Chameleon

2010-01-12 Thread Brian Sutherland
I'm making an attempt at packaging sourcecodegen and Chameleon for
Debian, but I've immediately stumbled over licensing issues.

AFAIKT all code in the repoze repository shares the same license, so I
plan on copying the version from
http://svn.repoze.org/repoze.tm2/trunk/LICENSE.txt.

Any objections to me adding a LICENSE.txt similar to both of
sourcecodegen and chameleon?

Would someone with upload access to pypi be able to upload new releases
once I've done this?

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Licensing of sourcecodegen and Chameleon

2010-01-12 Thread Brian Sutherland
On Tue, Jan 12, 2010 at 02:50:19PM +0100, Malthe Borch wrote:
> 2010/1/12 Chris McDonough :
> > But ethically this is Malthe's code, and the code itself has no license 
> > text in
> > it.  On chameleon.repoze.org he states "Chameleon is covered by the BSD
> > License."  So I'll ask him to clarify which BSD license he means.
> 
> BSD, as-is, dont-care.
> 
> As for LICENSE.txt, I think it's more than enough to state the license
> by name; it's not difficult to find the full license text online and
> to my understanding, there are never any disputes.

Thanks Malthe, I changed sourcecodegen and Chris got to Chameleon before
I could.

(Chris: If I did it badly, don't hesitate to fix)

> If I'm wrong, please anybody, commit necessary changes.

It's enough for me, but unfortunately it's not enough for some people I
need to please :(

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue103] repoze.bitblt removes doctype

2010-01-27 Thread Brian Sutherland

Brian Sutherland  added the comment:

I've just discovered yet another way in which lxml is mangling my HTML. I'm fed 
up with fixing 
around the edges.

So in the next week or so, I will try re-implement regular expressions to find 
and replace the 
 tags. Given that malthe seems to think it's a reasonable idea I'll do it 
inside repoze.bitblt 
on a branch first.

So, any ideas on how to robustly find  tags in HTML via regexes? Any 
example 
implementations? 

Also, what kind of backwards compatibility does repoze.bitblt require? Should I 
replace the 
existing rewrite_image_tags or implement a new one alongside and implement some 
kind of 
configurability into ImageTransformationMiddleware?

__
Repoze Bugs 
<http://bugs.repoze.org/issue103>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue103] repoze.bitblt removes doctype

2010-01-28 Thread Brian Sutherland

Brian Sutherland  added the comment:

Fixed in revision 8095 by using regexes instead of lxml to parse img tags.

--
status: chatting -> resolved

__
Repoze Bugs 
<http://bugs.repoze.org/issue103>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] repoze.bitblt 0.8 released

2010-03-01 Thread Brian Sutherland
Hi,

I've just uploaded a new release of repoze.bitblt to pypi. As noted in
the changelog, it's quite a big change but resolves all the open issues
with repoze.bitblt.

For the lazy among us:
http://pypi.python.org/pypi/repoze.bitblt

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue170] repoze.who's auth_tkt plugin gives paste a string list of tokens

2010-11-30 Thread Brian Sutherland

New submission from Brian Sutherland :

Looking here it seems obvious that tokens is meant to be passed as a list/tuple:
http://bitbucket.org/ianb/paste/src/4f5cfde87603/paste/auth/auth_tkt.py

However the auth_tkt plugin passes it as a string. The resulting cookie is 
obviously wrong:
 
auth_tkt="5a7c66804ce862df5810ac6d92ce83664cf50461%40%40brian!R,o,o,t!"

I find it hard to believe that this bug was at large for such a long time. So, 
perhaps there's a reason for the current behavior? If so, 
please let me know, otherwise I'll commit the attached patch to fix this.

--
messages: 463
nosy: jinty
priority: bug
status: unread
title: repoze.who's auth_tkt plugin gives paste a string list of tokens
topic: repoze.who

__
Repoze Bugs 
<http://bugs.repoze.org/issue170>
__
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] [issue170] repoze.who's auth_tkt plugin gives paste a string list of tokens

2010-11-30 Thread Brian Sutherland
Thanks Steve and Matt for confirming I wasn't hallucinating;)

In the end I committed a mix between my fix and Steve's:
http://lists.repoze.org/pipermail/repoze-checkins/2010-November/010457.html

I'll go close both issues now.

On Tue, Nov 30, 2010 at 08:51:45PM +0530, steve wrote:
> Hi,
> 
> Just wanted to chime in, this has already been reported in:
> http://bugs.repoze.org/issue160
> 
> I too wonder why the fix hasn't been pulled in yet.
> 
> cheers,
> - steve
> 
> On 11/30/2010 08:46 PM, Matt Goodall wrote:
> > Hi,
> >
> > I would add this to the ticket but I registered and can't log in. In
> > addition the password reset doesn't seem to be working. So ...
> >
> > This sounds like a problem I came across before when experimenting
> > with tokens (I never used them in the end). See
> > http://lists.repoze.org/pipermail/repoze-dev/2010-April/002928.html.
> >
> > - Matt
> >
> >
> > On 30 November 2010 14:52, Brian Sutherland  wrote:
> >>
> >>  New submission from Brian Sutherland:
> >>
> >>  Looking here it seems obvious that tokens is meant to be passed as a 
> >> list/tuple:
> >>  
> >> http://bitbucket.org/ianb/paste/src/4f5cfde87603/paste/auth/auth_tkt.py
> >>
> >>  However the auth_tkt plugin passes it as a string. The resulting cookie is
> >>  obviously wrong:
> >>
> >>  auth_tkt="5a7c66804ce862df5810ac6d92ce83664cf50461%40%40brian!R,o,o,t!"
> >>
> >>  I find it hard to believe that this bug was at large for such a long 
> >> time. So,
> >>  perhaps there's a reason for the current behavior? If so,
> >>  please let me know, otherwise I'll commit the attached patch to fix this.
> >>
> >>  --
> >>  messages: 463
> >>  nosy: jinty
> >>  priority: bug
> >>  status: unread
> >>  title: repoze.who's auth_tkt plugin gives paste a string list of tokens
> >>  topic: repoze.who
> >>
> >>  __
> >>  Repoze Bugs
> >>  <http://bugs.repoze.org/issue170>
> >>  __
> >>  ___
> >>  Repoze-dev mailing list
> >>  Repoze-dev@lists.repoze.org
> >>  http://lists.repoze.org/listinfo/repoze-dev
> >>
> > ___
> > Repoze-dev mailing list
> > Repoze-dev@lists.repoze.org
> > http://lists.repoze.org/listinfo/repoze-dev
> 
> 
> -- 
> random spiel: http://lonetwin.net/
> what i'm stumbling into: http://lonetwin.stumbleupon.com/
> ___
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] Chameleon and Genshi Text Templates

2011-02-14 Thread Brian Sutherland
Hi,

The genshi text template language doesn't seem to work at all with
chameleon.genshi:

http://genshi.edgewall.org/wiki/Documentation/text-templates.html

In fact it seems that chameleon.genshi.template.GenshiTextTemplate
cannot do anything more than string substitution. Am I missing
something obvious?

I've attached a test that I would have expected to have worked, should I
commit that?

-- 
Brian Sutherland
import unittest

class TestExplicitDoctypes(unittest.TestCase):

def test_for(self):
from chameleon.genshi.template import GenshiTextTemplate
template = u"{% for item in foo %}* xxx\n{% end %}"
t = GenshiTextTemplate(template)
self.assertEqual(t(foo=[1, 2]), "* xxx\n* xxx\n")

def test_suite():
import sys
return unittest.findTestCases(sys.modules[__name__])
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Chameleon and Genshi Text Templates

2011-02-14 Thread Brian Sutherland
On Mon, Feb 14, 2011 at 05:22:34PM +0100, Malthe Borch wrote:
> Hey Brian,
> 
> That's right. It hasn't been implemented and it's a bit of "false
> advertisement" really.
> 
> That said, implementing it should be relatively straight-forward.

I see. Unfortunately at the moment I have too much other stuff going on
to have a look. Also what we're doing is not performance critical so I
guess we'll go back to using the original genshi for the time being...

> \malthe
> 
> On 14 February 2011 17:20, Brian Sutherland  wrote:
> > Hi,
> >
> > The genshi text template language doesn't seem to work at all with
> > chameleon.genshi:
> >
> >    http://genshi.edgewall.org/wiki/Documentation/text-templates.html
> >
> > In fact it seems that chameleon.genshi.template.GenshiTextTemplate
> > cannot do anything more than string substitution. Am I missing
> > something obvious?
> >
> > I've attached a test that I would have expected to have worked, should I
> > commit that?
> >
> > --
> > Brian Sutherland
> >
> > ___
> > Repoze-dev mailing list
> > Repoze-dev@lists.repoze.org
> > http://lists.repoze.org/listinfo/repoze-dev
> >
> >

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Migration to Github

2011-02-22 Thread Brian Sutherland
On Tue, Feb 22, 2011 at 09:40:38AM -0500, Tres Seaver wrote:
> We have chosen to leave "dormant" projects in SVN for the indefinite
> future..  Please let us know if there is an existing 'repoze.*' project
> which you think needs to be migrated:

repoze.bitblt is also used and maintained.

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Migration to Github

2011-03-24 Thread Brian Sutherland
On Tue, Feb 22, 2011 at 09:40:38AM -0500, Tres Seaver wrote:
> After working with git / Github on the Pylons project, we have decided
> to move the "active" / "supported" repoze.* projects over to Github,
> under a new organization:
> 
>  https://github.com/repoze

I'd like to make a new release of repoze.bitblt (when my pull request is
accepted). Is there any documentation anywhere about how releases should
be tagged/created within the Repoze github repository?

-- 
Brian Sutherland
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev