Re: [Twisted-Python] regarding callbacks.

2012-04-30 Thread Ivan Kozik
On Mon, Apr 30, 2012 at 20:45, Jasper St. Pierre jstpie...@mecheye.net wrote:
 Right now, you could implement inlineCallbacks in Mozilla JavaScript.

A few years ago, I confirmed that this actually works:

http://ludios.org/js-inlineCallbacks-POC/

(though the above is inconvenient to use because it relied on my fork
of Divmod's JS).

I think there has been similar work in the node.js world.  I recall
some node.js forks that run on SpiderMonkey just so that they can use
its `yield`.

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] (no subject)

2012-04-18 Thread Ivan Kozik
On Thu, Apr 19, 2012 at 01:54, joel tremblet bingopi...@gmail.com wrote:
 Its is possible to use twistd in Windows console  ?
 I tried
 - twistd -y finger11.tac but twistd is not recognize
 - python finger11.tac, it's run the script but stop and the prompt symbol
 come back

 How we can test this script ?

twistd does work on Windows, but doesn't support some features like
daemonization.

This works here:

C:\Python27\python C:\Python27\Scripts\twistd.py -y
./doc/core/howto/tutorial/listings/finger/finger11.tac

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Twisted Project Jobs Volunteer

2011-11-08 Thread Ivan Kozik
On Wed, Nov 9, 2011 at 03:39, Tim Allen screwt...@froup.com wrote:
 On Tue, Nov 08, 2011 at 05:43:09PM -0800, Glyph Lefkowitz wrote:
 or they include 'a/' and 'b/' prefixes (i.e.  they're -p1 patches when
 they should be -p0 according to the submission standard).

 Git doesn't provide any way to generate patches without the fixed,
 standard prefixes. As I understand it, this is to prevent ambiguities
 when filenames contain spaces. So, you're probably stuck with it. :/

I thought so too, but Glyph found this today:

git diff --src-prefix=./ --dst-prefix=./


Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] adbapi / Postgres : LISTEN/NOTIFY and RealDictCursor

2011-11-03 Thread Ivan Kozik
On Thu, Nov 3, 2011 at 20:54, Corbin Simpson mostawesomed...@gmail.com wrote:
 I should point out that git-svn isn't happy about Twisted's repo, so the git
 mirror is non-trivial to maintain. Last time I tried, I got quite a few
 curious errors.

I keep a tarball of a git-svn clone of Twisted at
https://ludios.org/mirror/ and update it several times a year.  Anyone
can grab it and update their copy with:

git svn fetch
git checkout trunk

OR

git svn rebase


On Windows, first edit .git/config and set `filemode = false` to avoid
problems with executable bits.

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-05 Thread Ivan Kozik
On Tue, Jul 5, 2011 at 22:19, Kevin Horn kevin.h...@gmail.com wrote:
 Git requires bash.  This makes it painful for me (on Windows).

In what sense? You can run git from cmd.exe, without having to deal
with bash.  (You're not required to use 'Git Bash'.)

 Also, Git _is_ worse on Windows than it is on *nix.  It's just not as bad as
 it _used_ to be.  It's functional.  It works.  But it is difficult to deal
 with,
 and a lot of Windows users I have talked to (as well as myself, of course)
 just don't like using it.

Is there anything in specific that is difficult?  I haven't had
Windows-specific problems with Git on Windows, and I've been using it
a lot.

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] SURVEY: Have you submitted a patch to Twisted and it never got in?

2011-07-01 Thread Ivan Kozik
On Sat, Jul 2, 2011 at 02:23, Tim Allen screwt...@froup.com wrote:
 On Fri, Jul 01, 2011 at 09:11:34PM +0200, Laurens Van Houtven wrote:
 Only if there's a decent Github mirror to fork from, otherwise you're asking
 people to do a multi-hour operation (I know, because I'm doing it right now)
 to get a decent git repo,

 Last time I tried (perhaps a year ago), a git-svn clone of the Twisted
 SVN repo took the better part of a week. I seem to recall somebody
 preparing a tarball of a git-svn-clone'd repository to help people
 bootstrap, but my clone was already completed at that point so I didn't
 investigate further.

I update the tarball a few times a year at http://ludios.net/mirror/ -
see Twisted-checkout-README.txt for notes.

If you do it yourself, keep in mind that git svn clone has to restart
at r1 several times, for reasons I don't fully understand (due to
partial SVN branches?).  A few months back, a branch created by bzr
with an svn:mergeinfo property caused it to restart at r1 again.  This
adds about 27 hours to the git svn clone time, unfortunately.

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] getPage generates a traceback in abstract.py

2010-10-01 Thread Ivan Kozik
On Sat, Oct 2, 2010 at 01:01, Jason J. W. Williams
jasonjwwilli...@gmail.com wrote:
 I'm really pulling my hair out here. The code in question uses getPage:
 http://gist.github.com/607124
 If I remove the postdata argument to getPage no problem (except the postdata
 is required by server I'm calling). However, no matter what I put in
 postdata, I get this:
 http://gist.github.com/607126

This looks really strange.  Could you add a print statement before
line 112 of abstract.py, to see what's in self._tempDataBuffer?

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] inlineCallbacks cascading cancelling and more

2010-08-16 Thread Ivan Kozik
On Mon, Aug 16, 2010 at 08:34, Sergey Magafurov smagafu...@naumen.ru wrote:
 Wanted features:
 1. Ability to delete callbacks (delCallbacks)
 2. Automatic cancelling Deferreds if they are not needed any more (no
 callbacks registered any more, all was deleted)
 3. Ability to add/del hooks on deferred's finishing with errback or
 callback (addFinalizer/delFinalizer)
 4. Automatic call registered finalizers when deferred finished with
 errback or callback (and cancel due to cancel calls errback)

I like to think of Deferreds as a good way to structure asynchronous
control flow.  For each synchronous Python control flow structure, you
can usually build an asynchronous variant of that control flow with
Deferreds.  For example, `addBoth` is like an asynchronous
try/finally.  I think Deferreds accomplish this task quite well, and I
would like to think that the API for Deferreds is essentially done.
Most of those features don't look right to me, and the implementation
is complicated enough already.

 With this features we can make cascading cancelling of inlineCallbacks
 and cancelling full stack tree of inlineCallbacks when it is not needed
 any more (some shutdown occurs for example at top level)

Better cancellation for @inlineCallbacks functions would be great.
Cancellation was added recently, which is why most things don't yet
support it well.  But which of those four features are really required
to improve inlineCallbacks cancellation?  I see that you filed
http://twistedmatrix.com/trac/ticket/4632 - but the 'Solution (idea)'
there did not have API changes to Deferreds.  Did you discover
anything that makes those API changes necessary?

You're also welcome to discuss this on irc.freenode.net #twisted.  The
best time is usually early morning, Boston time.

 See full code for details (this is runnable script):

I didn't read this, because it's very long, and the lines were wrapped
at 80 characters.  If you want to contribute changes, it's better to
post Twisted patches to the bug tracker, rather than monkeypatching
code.  With the monkeypatching, it's very hard to tell what you've
changed.

Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] mercurial branch

2010-04-17 Thread Ivan Kozik
On Fri, Apr 9, 2010 at 6:05 AM, Manlio Perillo manlio_peri...@libero.it wrote:
 Does twisted have a Mercurial (git is also fine) mirror?

 Unofficial mirror is ok; I just would like to avoid download entire svn
 history with hgsvn.

I keep an unofficial git-svn cloned copy here:
http://ludios.net/mirror/

The tarball includes all of the SVN metadata. To update it, you can:
git svn fetch  git checkout trunk

During a `git svn fetch` or another operation, you may see this error:
error: cannot lock ref 'refs/remotes/ctrl+\\-2371+2123-2'

This is due to a bug somewhere in svn or git-svn; to fix it, you can
recursively grep the .git/ directory and manually delete all references
to the branch. Everything seems to work fine after doing this.

In case anyone is curious, git-svn takes about 26 hours to mirror it,
because it restarts at r1 for several branches. I am told this is due
to the use of SVN partial branches.


Ivan

___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python