[Repoze-dev] repoze.configuration - YAML with LibYAML

2010-02-18 Thread Joan Miller
It's possible that PyYAML has been built to support the LibYAML
bindings so it should be used:


try:
from yaml import CLoader as Loader
from yaml import CDumper as Dumper
except ImportError:
from yaml import Loader, Dumper



http://pyyaml.org/wiki/PyYAMLDocumentation#Installation
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] [issue87] auth_tkt: Cookies will always expire when the user agent is closed

2010-02-18 Thread Luca Barbato

Luca Barbato  added the comment:

Looks like feature had been implemented independently

--
status: unread -> chatting

__
Repoze Bugs 

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


[Repoze-dev] [issue87] auth_tkt: Cookies will always expire when the user agent is closed

2010-02-18 Thread Luca Barbato

Luca Barbato  added the comment:

Looks like feature had been implemented independently 

in remember now you get

max_age = identity.get('max_age', None)

and _get_cookies correctly sets it

__
Repoze Bugs 

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


[Repoze-dev] [issue87] auth_tkt: Cookies will always expire when the user agent is closed

2010-02-18 Thread admin

System message:


__
Repoze Bugs 

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


Re: [Repoze-dev] repoze.bfg not installing on Windows

2010-02-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Shailesh Kumar wrote:

> I am new to repoze. I was trying to install repoze.bfg on a Windows-XP
> machine. It crashed while trying to install WebOb.
> 
> Searching for WebOb>=0.9.7
> Reading http://dist.repoze.org/bfg/current/simple/WebOb/
> Best match: WebOb 0.9.7.1
> Downloading http://dist.repoze.org/bfg/current/WebOb-0.9.7.1.tar.gz
> 
> 
>dir = convert_path(words[1])
>   File "c:\Python26\Lib\distutils\util.py", line 191, in convert_path
> raise ValueError, "path '%s' cannot end with '/'" % pathname
> ValueError: path 'docs/' cannot end with '/'
> 
> After googling I found that this was a known issue for WebOb 0.9.7.1 and has
> been fixed since.  PythonPaste shows the latest version to be 0.9.8.
> repoze.org still holds on to 0.9.7.1.
> 
> 
> What should I do to make my installation work?

Two options:

- - Install the updated version of WebOb from PyPI before installing BFG.

- - Wait for the dist.repoze.org index to get updated (likely sometime in
  the wext week during PyCon).


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkt9TxAACgkQ+gerLs4ltQ5kygCgzlrUy86b9XMSS/XM9kGEBVkB
KTMAoMAgJHJnxvNi2PsIOtsS1VL+l5bC
=Vo9D
-END PGP SIGNATURE-
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.configuration - YAML with LibYAML

2010-02-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joan Miller wrote:
> It's possible that PyYAML has been built to support the LibYAML
> bindings so it should be used:
> 
> 
> try:
> from yaml import CLoader as Loader
> from yaml import CDumper as Dumper
> except ImportError:
> from yaml import Loader, Dumper
> 
> 
> 
> http://pyyaml.org/wiki/PyYAMLDocumentation#Installation

Thanks:  can you kick this into http://bugs.repoze.org/ so we don't lose
track of it?


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkt9UGMACgkQ+gerLs4ltQ721ACgzs3W8lMxG+mtC41AvqEWJZ6l
RJMAniIEMRCYh1q89GsjqPXQtKlVW80b
=av4V
-END PGP SIGNATURE-
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.bfg not installing on Windows

2010-02-18 Thread Chris McDonough
I have placed WebOb-0.9.8.tar.gz into the 
http://dist.repoze.org/bfg/current/simple index, so it should be picked up now.

On 2/18/10 9:30 AM, Tres Seaver wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Shailesh Kumar wrote:
>
>> I am new to repoze. I was trying to install repoze.bfg on a Windows-XP
>> machine. It crashed while trying to install WebOb.
>>
>> Searching for WebOb>=0.9.7
>> Reading http://dist.repoze.org/bfg/current/simple/WebOb/
>> Best match: WebOb 0.9.7.1
>> Downloading http://dist.repoze.org/bfg/current/WebOb-0.9.7.1.tar.gz
>> 
>>
>> dir = convert_path(words[1])
>>File "c:\Python26\Lib\distutils\util.py", line 191, in convert_path
>>  raise ValueError, "path '%s' cannot end with '/'" % pathname
>> ValueError: path 'docs/' cannot end with '/'
>>
>> After googling I found that this was a known issue for WebOb 0.9.7.1 and has
>> been fixed since.  PythonPaste shows the latest version to be 0.9.8.
>> repoze.org still holds on to 0.9.7.1.
>>
>>
>> What should I do to make my installation work?
>
> Two options:
>
> - - Install the updated version of WebOb from PyPI before installing BFG.
>
> - - Wait for the dist.repoze.org index to get updated (likely sometime in
>the wext week during PyCon).
>
>
> Tres.
> - --
> ===
> Tres Seaver  +1 540-429-0999  tsea...@palladion.com
> Palladion Software   "Excellence by Design"http://palladion.com
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkt9TxAACgkQ+gerLs4ltQ5kygCgzlrUy86b9XMSS/XM9kGEBVkB
> KTMAoMAgJHJnxvNi2PsIOtsS1VL+l5bC
> =Vo9D
> -END PGP SIGNATURE-
> ___
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>


-- 
Chris McDonough
Agendaless Consulting, Fredericksburg VA
The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] repoze.bfg not installing on Windows

2010-02-18 Thread Shailesh Kumar
Thanx a lot.

I was able to run the hello world / good bye example on the Windows. Will
now be able to try out other things.

With regards,
- Shailesh




On Thu, Feb 18, 2010 at 8:46 PM, Chris McDonough  wrote:

> I have placed WebOb-0.9.8.tar.gz into the
> http://dist.repoze.org/bfg/current/simple index, so it should be picked up
> now.
>
>
> On 2/18/10 9:30 AM, Tres Seaver wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Shailesh Kumar wrote:
>>
>>  I am new to repoze. I was trying to install repoze.bfg on a Windows-XP
>>> machine. It crashed while trying to install WebOb.
>>>
>>> Searching for WebOb>=0.9.7
>>> Reading http://dist.repoze.org/bfg/current/simple/WebOb/
>>> Best match: WebOb 0.9.7.1
>>> Downloading http://dist.repoze.org/bfg/current/WebOb-0.9.7.1.tar.gz
>>> 
>>>
>>>dir = convert_path(words[1])
>>>   File "c:\Python26\Lib\distutils\util.py", line 191, in convert_path
>>> raise ValueError, "path '%s' cannot end with '/'" % pathname
>>> ValueError: path 'docs/' cannot end with '/'
>>>
>>> After googling I found that this was a known issue for WebOb 0.9.7.1 and
>>> has
>>> been fixed since.  PythonPaste shows the latest version to be 0.9.8.
>>> repoze.org still holds on to 0.9.7.1.
>>>
>>>
>>> What should I do to make my installation work?
>>>
>>
>> Two options:
>>
>> - - Install the updated version of WebOb from PyPI before installing BFG.
>>
>> - - Wait for the dist.repoze.org index to get updated (likely sometime in
>>   the wext week during PyCon).
>>
>>
>> Tres.
>> - --
>> ===
>> Tres Seaver  +1 540-429-0999  tsea...@palladion.com
>> Palladion Software   "Excellence by Design"http://palladion.com
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.9 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkt9TxAACgkQ+gerLs4ltQ5kygCgzlrUy86b9XMSS/XM9kGEBVkB
>> KTMAoMAgJHJnxvNi2PsIOtsS1VL+l5bC
>> =Vo9D
>> -END PGP SIGNATURE-
>> ___
>> Repoze-dev mailing list
>> Repoze-dev@lists.repoze.org
>> http://lists.repoze.org/listinfo/repoze-dev
>>
>>
>
> --
> Chris McDonough
> Agendaless Consulting, Fredericksburg VA
> The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book
>
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] repoze.configuration - looks like INI

2010-02-18 Thread Joan Miller
What advantages there is over INI files?

Since that it only can check types when the declaration’s structure is
a mapping type, it looks to me to INI files
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] repoze.configuration - converting from a yaml block sequence

2010-02-18 Thread Joan Miller
Could use repoze.configuration to have a similar structure to the next one?

note that any keys could be optional as i.e. 'flag'

--
1:
#number: 1
label: foo
size: 512
flag: boot

2:
#number: 2
label: bar
size: 10
fs_type: ext4
--

For each item, I could replace '1:' by 'number:1'

--
--- !item
number: 1
label: foo
size: 512
flag: boot

--- !item
number: 2
label: bar
size: 10
fs_type: ext4
--
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


[Repoze-dev] Need advise on using session with repoze.bfg

2010-02-18 Thread georgehu
I'm trying to implement a simple session management like the Amazon 
site, you can throw your order item into your shopping cart even without 
a login, and Amazon can remember your ordered items for many days. I'm 
using mysql and sqlalchemy, according to the document, the Beaker is 
suggested in this case. But I would like to see an example code snippet 
or tutorial on how to do it.

Thanks

George Hu
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Need advise on using session with repoze.bfg

2010-02-18 Thread Fernando Correa Neto
Hey there,

Using beaker is no biggie.
In your .ini you need something like:

[filter:beaker]
use = egg:Beaker#beaker_session
beaker.session.key = yourapp.session
beaker.session.secret = supersecret

[pipeline:main]
pipeline = egg:repoze.zodbconn#closer
   egg:repoze.tm2#tm
   beaker
   app

And then you'll have 'yourapp.session' in your environment. i.e.:
request.environ['yourapp.session'] or
request.environ['beaker.session'].

Cheers,
Fernando

On Thu, Feb 18, 2010 at 10:10 PM, georgehu  wrote:
> I'm trying to implement a simple session management like the Amazon
> site, you can throw your order item into your shopping cart even without
> a login, and Amazon can remember your ordered items for many days. I'm
> using mysql and sqlalchemy, according to the document, the Beaker is
> suggested in this case. But I would like to see an example code snippet
> or tutorial on how to do it.
>
> Thanks
>
> George Hu
> ___
> 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


Re: [Repoze-dev] Need advise on using session with repoze.bfg

2010-02-18 Thread Tim Hoffman
Hi

Yeah I am using beaker on app engine as well with bfg, real easy to
setup and it works well.
I am using memcache on app engine as the store at the moment as I
don't mind if sessions
disappear if not used for a little while, but it would be easy to make
writes to the session persist in the datastore.

T

On Fri, Feb 19, 2010 at 8:51 AM, Fernando Correa Neto  wrote:
> Hey there,
>
> Using beaker is no biggie.
> In your .ini you need something like:
>
> [filter:beaker]
> use = egg:Beaker#beaker_session
> beaker.session.key = yourapp.session
> beaker.session.secret = supersecret
>
> [pipeline:main]
> pipeline = egg:repoze.zodbconn#closer
>           egg:repoze.tm2#tm
>           beaker
>           app
>
> And then you'll have 'yourapp.session' in your environment. i.e.:
> request.environ['yourapp.session'] or
> request.environ['beaker.session'].
>
> Cheers,
> Fernando
>
> On Thu, Feb 18, 2010 at 10:10 PM, georgehu  wrote:
>> I'm trying to implement a simple session management like the Amazon
>> site, you can throw your order item into your shopping cart even without
>> a login, and Amazon can remember your ordered items for many days. I'm
>> using mysql and sqlalchemy, according to the document, the Beaker is
>> suggested in this case. But I would like to see an example code snippet
>> or tutorial on how to do it.
>>
>> Thanks
>>
>> George Hu
>> ___
>> 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
>
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev


Re: [Repoze-dev] Need advise on using session with repoze.bfg

2010-02-18 Thread Chris McDonough
It's also possible to use repoze.session, based on ZODB:

http://docs.repoze.org/bfg/1.2/tutorials/zodbsessions/index.html

- C

On 2/18/10 7:56 PM, Tim Hoffman wrote:
> Hi
>
> Yeah I am using beaker on app engine as well with bfg, real easy to
> setup and it works well.
> I am using memcache on app engine as the store at the moment as I
> don't mind if sessions
> disappear if not used for a little while, but it would be easy to make
> writes to the session persist in the datastore.
>
> T
>
> On Fri, Feb 19, 2010 at 8:51 AM, Fernando Correa Neto  
> wrote:
>> Hey there,
>>
>> Using beaker is no biggie.
>> In your .ini you need something like:
>>
>> [filter:beaker]
>> use = egg:Beaker#beaker_session
>> beaker.session.key = yourapp.session
>> beaker.session.secret = supersecret
>>
>> [pipeline:main]
>> pipeline = egg:repoze.zodbconn#closer
>>egg:repoze.tm2#tm
>>beaker
>>app
>>
>> And then you'll have 'yourapp.session' in your environment. i.e.:
>> request.environ['yourapp.session'] or
>> request.environ['beaker.session'].
>>
>> Cheers,
>> Fernando
>>
>> On Thu, Feb 18, 2010 at 10:10 PM, georgehu  wrote:
>>> I'm trying to implement a simple session management like the Amazon
>>> site, you can throw your order item into your shopping cart even without
>>> a login, and Amazon can remember your ordered items for many days. I'm
>>> using mysql and sqlalchemy, according to the document, the Beaker is
>>> suggested in this case. But I would like to see an example code snippet
>>> or tutorial on how to do it.
>>>
>>> Thanks
>>>
>>> George Hu
>>> ___
>>> 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
>>
> ___
> Repoze-dev mailing list
> Repoze-dev@lists.repoze.org
> http://lists.repoze.org/listinfo/repoze-dev
>


-- 
Chris McDonough
Agendaless Consulting, Fredericksburg VA
The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book
___
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev