Re: [Python-Dev] Semi-official read-only Github mirror of the CPython Mercurial repository

2014-10-15 Thread Eli Bendersky
On Mon, Oct 6, 2014 at 12:37 PM, Benjamin Peterson 
wrote:

> Eli,
> Thanks for setting this up. People are evidently finding it quite useful
> and are wondering if it could be more frequently run. We don't want you
> to have to absorb the bandwidth costs yourself, though. Is the code you
> use available somewhere? It shouldn't be hard to set up the cron job on
> PSF infrastructure.
>
>
Sorry I missed this. Alex reached out directly a few days ago and I updated
it to hourly; I don't think there are significant costs involved, but if
someone at the PSF wants to run this, I have no objections to that either.

It's using the hg-fast-export tool, though, so its whole cache is required
(incremental updates are done and it has its own hg hash -> git hash
mapping).

Eli





> On Sat, Jul 12, 2014, at 09:15, Eli Bendersky wrote:
> > Just a quick update on this. I've finally found time to set up a VPS at
> > DigitalOcean of myself, and I'm moving the cronjob for updating the
> > Github
> > mirrors to it. This lets me ramp up the update frequency. For now I'll
> > set
> > it to every 4 hours, but in the future I may make it even more frequent.
> > Hopefully this will not overrun my bandwidth allocation :)
> >
> > The CPython mirror (https://github.com/python/cpython) has been pretty
> > popular so far, with over 70 forks.
> >
> > Eli
> >
> >
> >
> > On Mon, Sep 30, 2013 at 6:09 AM, Eli Bendersky  wrote:
> >
> > > Hi all,
> > >
> > > https://github.com/python/cpython is now live as a semi-official,
> *read
> > > only* Github mirror of the CPython Mercurial repository. Let me know
> if you
> > > have any problems/concerns.
> > >
> > > I still haven't decided how often to update it (considering either
> just N
> > > times a day, or maybe use a Hg hook for batching). Suggestions are
> welcome.
> > >
> > > The methodology I used to create it is via hg-fast-export. I also
> tried to
> > > pack and gc the git repo as much as possible before the initial Github
> push
> > > - it went down from almost ~2GB to ~200MB (so this is the size of a
> fresh
> > > clone right now).
> > >
> > > Eli
> > >
> > > P.S. thanks Jesse for the keys to https://github.com/python
> > >
> > >
> > >
> > >
> > ___
> > Python-Dev mailing list
> > Python-Dev@python.org
> > https://mail.python.org/mailman/listinfo/python-dev
> > Unsubscribe:
> > https://mail.python.org/mailman/options/python-dev/benjamin%40python.org
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] How io.IOBase.readline() should behave when used on non-blocking obj and no data available?

2014-10-15 Thread Paul Sokolovsky
Hello,

io.RawIOBase.read() is well specified for behavior in case it
immediately gets a would-block condition: "If the object is in
non-blocking mode and no bytes are available, None is returned."
(https://docs.python.org/3/library/io.html#io.RawIOBase.read).

However, nothing is said about such condition for io.IOBase.readline(),
which is mixin method in a base class, default implementation of which
thus would use io.RawIOBase.read(). Looking at 3.4.0 source, iobase.c:
iobase_readline() has:

b = _PyObject_CallMethodId(self, &PyId_read, "n", nreadahead);
[...]
if (!PyBytes_Check(b)) {
PyErr_Format(PyExc_IOError,
 "read() should have returned a bytes object, "
 "not '%.200s'", Py_TYPE(b)->tp_name);

I.e. it's not even ready to receive legitimate return value of None
from read(). I didn't try to write a testcase though, so may be missing
something.


So, how readline() should behave in this case, and can that be
specified in the Library Reference?


Thanks,
 Paul  mailto:pmis...@gmail.com
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com