1 2011-02-20T00:10:31 *** Pranav_rcmas1
2 2011-02-20T00:23:00 *** Pranav_rcmas1
3 2011-02-20T01:04:17 *** Pranav_rcmas1
4 2011-02-20T01:17:28 *** Pranav_rcmas1
5 2011-02-20T01:47:28 *** Pranav_rcmas1
6 2011-02-20T02:01:49 *** Pranav_rcmas1
7 2011-02-20T02:18:11 *** Pranav_rcmas1
8 2011-02-20T02:30:46 *** Pranav_rcmas1
9 2011-02-20T02:41:30 *** Pranav_rcmas1
10 2011-02-20T04:21:59 *** kasun
11 2011-02-20T05:47:33 *** Pranav_rcmas
12 2011-02-20T06:36:31 *** kasun
13 2011-02-20T06:39:19 *** kasun
14 2011-02-20T06:54:12 *** kasun
15 2011-02-20T09:02:09 *** kasun
16 2011-02-20T09:34:09 *** kasunbg
17 2011-02-20T09:36:22 *** kasun
18 2011-02-20T10:43:43 *** kasun
19 2011-02-20T10:46:01 *** kasunbg
20 2011-02-20T10:50:28 *** grzywacz
21 2011-02-20T10:50:28 *** grzywacz
22 2011-02-20T10:50:34 *** kasun
23 2011-02-20T11:03:16 *** kasun
24 2011-02-20T11:14:31 *** greg_f
25 2011-02-20T11:40:41 *** Pranav_rcmas
26 2011-02-20T12:01:29 *** kasun
27 2011-02-20T12:12:06 <CIA-65> Reimar Bauer <rb.proj AT googlemail DOT com> default * 10480:3e216bdb8ae3 2.0-dev/MoinMoin/script/account/resetpw.py: account.script.resetpw: fixed docstring
28 2011-02-20T12:12:08 <CIA-65> Reimar Bauer <rb.proj AT googlemail DOT com> default * 10481:bdaf111acc83 2.0-dev/MoinMoin/script/account/ (create.py disable.py resetpw.py): scripts: removed not needed import Manager
29 2011-02-20T12:34:49 *** kasun
30 2011-02-20T13:34:17 <ThomasWaldmann> moin
31 2011-02-20T13:34:45 <ThomasWaldmann> dreimark: why do you import app from MoinMoin.app?
32 2011-02-20T13:39:25 <dreimark> ThomasWaldmann: because of flaskg.unprotected_storage = app.unprotected_storage
33 2011-02-20T13:41:36 <dreimark> user currently works only with unprotected_storage
34 2011-02-20T13:42:10 <ThomasWaldmann> maybe look where other modules get "app" from
35 2011-02-20T13:43:36 <ThomasWaldmann> or where MoinMoin.app gets app from
36 2011-02-20T13:45:54 <dreimark> oh, seen stupid, i could do it also as
37 2011-02-20T13:45:58 <dreimark> from flask import current_app as app
38 2011-02-20T13:49:08 <ThomasWaldmann> also, it should be checked how script stuff works with before_request / after_request
39 2011-02-20T13:51:53 <CIA-65> Reimar Bauer <rb.proj AT googlemail DOT com> default * 10482:e4f988727ed1 2.0-dev/MoinMoin/script/account/ (create.py disable.py resetpw.py): scripts: use app directly from flask
40 2011-02-20T13:54:28 <dreimark> hmm, i've ignored those because they did more than i needed, but if it did not harm it simplifies that lines
41 2011-02-20T13:54:58 <dreimark> (before_wiki, after_wiki)
42 2011-02-20T13:56:07 <dreimark> ThomasWaldmann: before_wiki or before_request ?
43 2011-02-20T13:57:13 <ThomasWaldmann> before_wiki is a handler registered with before_request()
44 2011-02-20T14:00:45 <dreimark> yes, but where do i get before_request from?
45 2011-02-20T14:02:58 * dreimark reads flask docu
46 2011-02-20T14:16:54 <dreimark> ronny: thx for this post http://groups.google.com/group/python-virtualenv/browse_thread/thread/4c9d88177caf7fa8?fwc=2
47 2011-02-20T14:32:10 <ThomasWaldmann> dreimark: the flask-test docs say the stuff runs within a test request. so do you really have to patch stuff from app into flaskg?
48 2011-02-20T14:38:49 <ThomasWaldmann> dreimark: if i try to create same username/email/password a second time (expecting something like "user already exists"), it crashes with a type consistency problem in kvstore
49 2011-02-20T14:42:08 <dreimark> ThomasWaldmann: not for me
50 2011-02-20T14:42:14 <dreimark> ./moin account_create -n Hans -e Hans@localhost -p e1m2i3l4
51 2011-02-20T14:42:34 <dreimark> the second time i get This user name already belongs to somebody else.
52 2011-02-20T14:43:28 *** Pranav_rcmas
53 2011-02-20T14:44:45 <dreimark> in user we need the unprotected_storage backend
54 2011-02-20T14:45:08 <dreimark> I have copied the TODO from there to all three scripts
55 2011-02-20T14:46:30 <ThomasWaldmann> that's not a todo anyway
56 2011-02-20T14:46:49 <ThomasWaldmann> (but rather a description of how it works right now)
57 2011-02-20T14:47:02 <ThomasWaldmann> and having same TODO at many place is a bad idea
58 2011-02-20T14:47:05 <dreimark> yeah only a todo if we want to change that
59 2011-02-20T14:48:41 *** Pranav_rcmas
60 2011-02-20T14:51:34 *** Pranav_rcmas1
61 2011-02-20T14:52:47 <ThomasWaldmann> all cmdline option values are str (not unicode)
62 2011-02-20T14:55:14 <dreimark> is that the reason why it crashes for you?
63 2011-02-20T14:55:21 <ThomasWaldmann> and if you create a useraccount for name foo, it'll want str for names ever and crash when the first unicode item name is encountered
64 2011-02-20T14:55:50 <ThomasWaldmann> it'll crash for you also if you use load_xml and index_rebuild
65 2011-02-20T14:59:05 <MattMaker> I have been doing a lot of reading on python + unicode
66 2011-02-20T14:59:28 <MattMaker> this is one of the best so far: http://www.stereoplex.com/blog/python-unicode-and-unicodedecodeerror
67 2011-02-20T15:01:51 <MattMaker> several more writings, especially recently, all say keep everything inside your app Unicode and handle it uniformly, only decoding when you are outputting from the app (or calling a 3rd party lib that explicitly can't handle it)
68 2011-02-20T15:02:18 <dreimark> yes, but why are input parameters of type str?
69 2011-02-20T15:03:38 <MattMaker> they are input, we should translate them to Unicode first thing
70 2011-02-20T15:06:39 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10483:49a51090b6ae 2.0-dev/MoinMoin/script/account/ (create.py disable.py resetpw.py): scripts: use type=unicode for string-like options
71 2011-02-20T15:07:05 <ThomasWaldmann> moin matt
72 2011-02-20T15:07:42 <ThomasWaldmann> MattMaker: yes, that's exactly what we are doing
73 2011-02-20T15:08:05 <dreimark> you were faster
74 2011-02-20T15:08:07 <dreimark> :)
75 2011-02-20T15:08:12 <ThomasWaldmann> (or at least try to)
76 2011-02-20T15:08:43 <ThomasWaldmann> dreimark: that's only a first fix, there is more todo
77 2011-02-20T15:09:24 <dreimark> i wished that unicode is the default, how does it care on the various str encodings?
78 2011-02-20T15:09:33 <ThomasWaldmann> ./moin account_create: error: argument --name/-n: invalid unicode value: '\xc3\x9cbel'
79 2011-02-20T15:09:34 <MattMaker> I am glad to hear it; I have found a few other spots where it needs adjustment, but I am still figuring out the code
80 2011-02-20T15:09:55 <MattMaker> dreimark python 3+ is all unicode strings
81 2011-02-20T15:11:11 <MattMaker> how do you feel about borrowing a string module from another project that does some magic on this?
82 2011-02-20T15:12:01 <dreimark> http://paste.pocoo.org/show/341717/
83 2011-02-20T15:12:39 <MattMaker> yes, many places where there is str() will need adjusting
84 2011-02-20T15:13:57 <MattMaker> str uses the default encoding
85 2011-02-20T15:14:09 <MattMaker> the default default encoding, is ascii
86 2011-02-20T15:14:56 <MattMaker> and str() will throw exceptions if you give it anything that isn't
87 2011-02-20T15:15:09 <dreimark> we had not these problems in 1.x because of the different storage apis
88 2011-02-20T15:15:42 <dreimark> at least not all sorts of these problems
89 2011-02-20T15:16:48 <MattMaker> yes, new problems... or old problems that didn't matter, that suddenly do
90 2011-02-20T15:18:04 <MattMaker> things like, the native string format for sqlite being unicode
91 2011-02-20T15:22:17 * ThomasWaldmann looks into argparse
92 2011-02-20T15:22:17 *** Pranav_rcmas1
93 2011-02-20T15:24:58 *** kasun
94 2011-02-20T15:33:25 <MattMaker> patch: the timezone error I mentioned the other day, was a bug in pytz that has been fixed, but this is the workaround http://paste.pocoo.org/show/341727/
95 2011-02-20T15:40:01 <MattMaker> arguably, could also catch UnknownTimeZoneError exception here
96 2011-02-20T15:42:47 *** kasun
97 2011-02-20T15:51:15 <ThomasWaldmann> hmm, looks like argparse does nothing special for decoding argv strs
98 2011-02-20T15:51:53 <ThomasWaldmann> that kind of sucks, it leaves the difficult part to the user
99 2011-02-20T15:53:03 <dreimark> can we use the moin shell for the commands too?
100 2011-02-20T15:53:26 <dreimark> then we are in a python environment
101 2011-02-20T15:54:01 <dreimark> ./moin shell
102 2011-02-20T15:54:43 <ThomasWaldmann> we need something shell-scriptable
103 2011-02-20T15:57:57 * ThomasWaldmann tries a quick hack
104 2011-02-20T16:04:48 <MattMaker> ThomasWaldmann parser.add_argument('-i', type=unicode) ?
105 2011-02-20T16:07:43 * MattMaker tries it
106 2011-02-20T16:08:30 <ThomasWaldmann> i already did that
107 2011-02-20T16:08:59 <ThomasWaldmann> but what it does is just calling unicode(s), which only works for ascii and thus is a bit pointless
108 2011-02-20T16:09:26 <MattMaker> whoops
109 2011-02-20T16:09:44 * dreimark hates encoding problems
110 2011-02-20T16:09:54 <ThomasWaldmann> is there some sane method to find out console encoding?
111 2011-02-20T16:11:19 <dreimark> locale.getpreferredencoding()
112 2011-02-20T16:12:02 <dreimark> http://mail.python.org/pipermail/pythonmac-sig/2006-February/016340.html
113 2011-02-20T16:13:27 <dreimark> locale.getlocale()
114 2011-02-20T16:13:53 <MattMaker> here is a thing I found: http://paste.pocoo.org/show/341753/
115 2011-02-20T16:14:00 <dreimark> Return the charset that the user is likely using, │
116 2011-02-20T16:14:01 <dreimark> │ according to the system configuration.
117 2011-02-20T16:14:06 <dreimark> ocale.getpreferredencoding: ( │
118 2011-02-20T16:14:07 <dreimark> │ do_setlocale=True)
119 2011-02-20T16:18:33 <dreimark> or the magic chardet
120 2011-02-20T16:18:35 <ThomasWaldmann> where does it say this is the correct coding for the console?
121 2011-02-20T16:18:52 <dreimark> chardet.detect(text)['encoding'])
122 2011-02-20T16:19:07 <ThomasWaldmann> no
123 2011-02-20T16:23:58 <dreimark> what the hell is PYTHONIOENCODING
124 2011-02-20T16:24:55 <dreimark> http://docs.python.org/using/cmdline.html
125 2011-02-20T16:27:26 <MattMaker> hey, this looks promising: https://drj11.wordpress.com/2007/05/14/python-how-is-sysstdoutencoding-chosen/
126 2011-02-20T16:29:27 <ThomasWaldmann> lol
127 2011-02-20T16:30:11 <ThomasWaldmann> if one gives something nonascii arg to a windows python script and just outputs it again "as is", it is scrambled
128 2011-02-20T16:33:46 <ThomasWaldmann> dreimark: local.getpreferredencoding() seems to give right values. just strange that the docs do not more explicitely tell that.
129 2011-02-20T16:34:10 <dreimark> the question is if it works on all platforms
130 2011-02-20T16:34:38 <dreimark> i thought also PYTHONIOENCODING is helpful
131 2011-02-20T16:36:45 <MattMaker> here's one that's kind of humorous: http://tahoe-lafs.org/trac/pyutil/browser/experiment/pyutil/scripts/try_decoding.py ... and painful
132 2011-02-20T16:39:03 <dreimark> MattMaker: i have converted for a project 60K CMS pages and there had nothing cared for encoding on the content
133 2011-02-20T16:39:05 <MattMaker> dreimark that one looks good, but only if the user sets it?
134 2011-02-20T16:39:18 <dreimark> MattMaker: we can set it to
135 2011-02-20T16:39:20 <dreimark> o
136 2011-02-20T16:40:29 <MattMaker> it looks like that might hide some exceptions you want to see
137 2011-02-20T16:40:46 <MattMaker> but, could always change it back and forth for testing I guess
138 2011-02-20T16:42:02 <dreimark> testing of that is also a good question
139 2011-02-20T16:43:42 <ThomasWaldmann> sys.stdout.encoding has an incorrect value on windows
140 2011-02-20T16:46:57 <MattMaker> see comments on http://tahoe-lafs.org/trac/tahoe-lafs/ticket/565#
141 2011-02-20T17:04:38 <ThomasWaldmann> locale.getpreferredencoding() should be used when converting
142 2011-02-20T17:04:38 <ThomasWaldmann> Unicode strings to and from byte strings to be stored on the local
143 2011-02-20T17:04:38 <ThomasWaldmann> system (e.g. in files). Notice that this may or may not be adequate
144 2011-02-20T17:04:38 <ThomasWaldmann> also when printing data to the terminal. Specifically, on Windows,
145 2011-02-20T17:04:39 <ThomasWaldmann> the terminal often uses yet another encoding.
146 2011-02-20T17:10:38 <ThomasWaldmann> OMG
147 2011-02-20T17:11:05 <ThomasWaldmann> always surprising how such fundamental stuff can be that complicated
148 2011-02-20T17:11:43 *** Pranav_rcmas
149 2011-02-20T17:15:57 *** kasunbg
150 2011-02-20T17:18:31 *** kasun
151 2011-02-20T17:23:43 <ThomasWaldmann> http://paste.pocoo.org/show/341784/ that was my solution up to reading that tahoe/python issues
152 2011-02-20T17:24:37 <ThomasWaldmann> but after reading about all that pain, i tend to just use some config setting for the coding
153 2011-02-20T17:32:27 <ThomasWaldmann> hmm, no, that's not enough
154 2011-02-20T17:35:09 * ThomasWaldmann really thinks about dropping the script interface
155 2011-02-20T17:35:36 <xorAxAx> ?
156 2011-02-20T17:35:53 <ThomasWaldmann> without usable unicode support, all sorts of names (of users, of items) are pointless somehow
157 2011-02-20T17:36:09 <ThomasWaldmann> xorAxAx: http://bugs.python.org/issue2128
158 2011-02-20T17:37:55 <xorAxAx> well, accept the command line from a file and you are done
159 2011-02-20T17:38:55 <ThomasWaldmann> but if one needs a file, one could also have a python file and just call some api funcs
160 2011-02-20T17:39:23 <ThomasWaldmann> s/cmd/python/g
161 2011-02-20T17:39:41 <xorAxAx> thats much harder for a non-programmer
162 2011-02-20T17:42:25 <ThomasWaldmann> well, having to put cmdline args into files all the time is a pain also
163 2011-02-20T17:43:59 <ThomasWaldmann> create_user(name=u"JoeDoe", email=u"foo@bar", password=u"secret")
164 2011-02-20T17:46:49 <dreimark> well that is quite close to the moin shell
165 2011-02-20T17:46:53 <dreimark> import script
166 2011-02-20T17:50:09 <dreimark> ha, may be we should have our own independent terminal
167 2011-02-20T17:50:28 <ThomasWaldmann> or our own OS :P
168 2011-02-20T17:54:59 <ThomasWaldmann> ronny: any progress on your changesets?
169 2011-02-20T18:03:38 *** Pranav_rcmas
170 2011-02-20T18:08:30 <ThomasWaldmann> flask-static looks like what we need for moin dump replacement.
171 2011-02-20T18:10:35 <dreimark> this account check, should that be splitted into smaller units?
172 2011-02-20T18:13:05 <ThomasWaldmann> i think such stuff has to be run BEFORE data gets into moin2
173 2011-02-20T18:13:30 <ThomasWaldmann> so we likely don't need that script in moin2
174 2011-02-20T18:16:04 *** greg_f
175 2011-02-20T18:19:52 <dreimark> ok, had that feeling too, that was the reason i had not worked on it
176 2011-02-20T18:36:11 <ronny> ThomasWaldmann: didnt get to work much in the after exam excess party time
177 2011-02-20T18:39:00 <ThomasWaldmann> ok, because I am thinking about doing the repo reboot rsn
178 2011-02-20T18:40:32 <ronny> ThomasWaldmann: i'll make my changes a patch queue for no
179 2011-02-20T18:40:33 <ronny> w
180 2011-02-20T18:41:18 <ronny> ThomasWaldmann: cause the port to pytest 2.0 will take some more time, the current generative test patterns are messed up
181 2011-02-20T18:42:38 <ThomasWaldmann> ronny: can you make your bb repo to not show incoming stuff for me?
182 2011-02-20T18:44:06 <ronny> lets see
183 2011-02-20T18:44:14 <ronny> in case of doubt, i'll kill my repo
184 2011-02-20T18:44:52 <dreimark> http://stackoverflow.com/questions/846850/how-to-read-unicode-characters-from-command-line-arguments-in-python-on-windows
185 2011-02-20T18:44:57 <dreimark> another aspect
186 2011-02-20T18:50:05 <ThomasWaldmann> yes, doing lowlevel windows crap with ctypes :|
187 2011-02-20T18:55:34 <ThomasWaldmann> ronny: saving your changesets and killing repo might be a good idea
188 2011-02-20T18:55:58 <ThomasWaldmann> as you can clone the new much smaller repo afterwards
189 2011-02-20T18:59:46 <ronny> yupp
190 2011-02-20T19:05:43 * ThomasWaldmann suggested that "maker" also proceeds like that, after making sure there is nothing important left to merge.
191 2011-02-20T19:08:12 <ThomasWaldmann> does anyone have pending stuff to push?
192 2011-02-20T19:11:48 <ThomasWaldmann> any stuff in the repo we want to clean before moin/2.0 comes to life?
193 2011-02-20T19:15:13 <ThomasWaldmann> ronny: maybe drop the pytest in the toplevel dir and require it by setup.py for now?
194 2011-02-20T19:18:34 <ronny> ThomasWaldmann: yup, make sure to require one less than 2.x for now
195 2011-02-20T19:18:44 <ronny> as far as i can tell its only needed for testing
196 2011-02-20T19:41:32 <ThomasWaldmann> yeah, but extras_require won't work for pip, correct?
197 2011-02-20T19:46:20 <ThomasWaldmann> Downloading/unpacking pytest==1.3.4 (from moin) Could not find a version that satisfies the requirement pytest==1.3.4 (from moin) (from versions: )
198 2011-02-20T19:46:23 <ThomasWaldmann> No distributions matching the version for pytest==1.3.4 (from moin)
199 2011-02-20T19:50:50 * ThomasWaldmann tries py==1.3.4
200 2011-02-20T19:52:46 <ThomasWaldmann> ok, that works
201 2011-02-20T20:08:32 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10484:1b4998ab42c2 2.0-dev/setup.py: require py 1.3.4 because we currently need py.test 1.3.4 (not newer) for the unit tests
202 2011-02-20T20:08:37 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10485:bd9740154e8c 2.0-dev/pytest: remove pytest, use the py.test which is installed into the virtual env
203 2011-02-20T20:15:22 <ThomasWaldmann> dreimark: kill scripts/account/check?
204 2011-02-20T20:15:41 <dreimark> ThomasWaldmann: no, why?
205 2011-02-20T20:16:06 <dreimark> ThomasWaldmann: yes
206 2011-02-20T20:16:15 <dreimark> misunderstood
207 2011-02-20T20:17:09 <dreimark> ThomasWaldmann: should i or do you?
208 2011-02-20T20:20:57 <ThomasWaldmann> i do it
209 2011-02-20T20:21:09 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10486:cce13c90588a 2.0-dev/docs/changes/CHANGES_1.x_and_0.x: remove moin 0.x / 1.x changelog, not needed for moin2
210 2011-02-20T20:26:04 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10487:c5781511e094 2.0-dev/MoinMoin/script/account/check.py: remove moin account check script - such stuff needs to be done before data enters moin2
211 2011-02-20T20:29:21 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10488:075132a755dc 2.0-dev/setup.cfg: fix *gettext keywords for babel
212 2011-02-20T20:32:53 * ThomasWaldmann creates moin/2.0
213 2011-02-20T20:56:21 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 10489:6506125f6752 2.0-dev/.hgtags: tag last changeset in this repo, we continue in moin/2.0 repo
214 2011-02-20T21:45:04 <CIA-65> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 2:ca7580cd1f30 2.0/MoinMoin/ (__init__.py util/_tests/test_version.py util/version.py): use PEP386 strict version numbers
215 2011-02-20T21:45:21 <ThomasWaldmann> new repo ^^ \o/
216 2011-02-20T21:55:58 <dreimark> :)
217 2011-02-20T21:57:15 * dreimark clones and ready
218 2011-02-20T21:57:22 <dreimark> faster than i can typo
219 2011-02-20T21:58:15 <ThomasWaldmann> hehe
220 2011-02-20T22:16:17 <ThomasWaldmann> http://bitbucket.org/thomaswaldmann/moin-2.0/issues < moin2 issue tracker
221 2011-02-20T22:26:59 <ronny> ThomasWaldmann: quite awesome
222 2011-02-20T22:52:42 * ThomasWaldmann used first issue for some general note
223 2011-02-20T22:59:00 *** grzywacz
224 2011-02-20T23:06:44 *** kasunbg
225 2011-02-20T23:07:01 * ThomasWaldmann tries flask-static
226