Re: [Python-Dev] datetime.timedelta total_microseconds

2019-02-28 Thread INADA Naoki
>
> I *think* this is the "correct" way to do it:
>
> def timedelta_to_microseconds(td):
> return td.microseconds + td.seconds * 1000 + td.days * 8640
>
> (hardly tested)
>
> -CHB
>

1000?  milli? micro?


-- 
INADA Naoki  
___
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


Re: [Python-Dev] Compact ordered set

2019-02-28 Thread INADA Naoki
On Thu, Feb 28, 2019 at 7:23 AM Henry Chen  wrote:

> If sets were ordered, then what ought pop() return - first, last, or
> nevertheless an arbitrary element? I lean toward arbitrary because in
> existing code, set.pop often implies that which particular element is
> immaterial.
>
>
dict.popitem() pops last inserted pair.  So set.pop() must remove last
element.

https://docs.python.org/3/library/stdtypes.html#dict.popitem

-- 
INADA Naoki  
___
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


Re: [Python-Dev] Compact ordered set

2019-02-28 Thread Steven D'Aprano
On Wed, Feb 27, 2019 at 02:15:53PM -0800, Barry Warsaw wrote:

> I’m just relaying a data point.  Some Python folks I’ve worked with do 
> make the connection between dicts and sets, and have questions about 
> the ordering guarantees of then (and how they relate).

Sets and dicts are not related by inheritence (except that they're both 
subclasses of ``object``, but so is everything else). They don't share 
an implementation. They don't provide the same API. They don't do the 
same thing, except in the most general sense that they are both 
collections.

What connection are these folks making?

If they're old-timers, or read some Python history, they might remember 
back in the ancient days when sets were implemented on top of dicts, or 
even before then, when we didn't have a set type at all and used dicts 
in an ad-hoc way.

But apart from that long-obsolete historical connection, I think the 
two types are unrelated and the behaviour of one has little or no 
implications for the behaviour of the other.

"Cars have windows that you can open. Submarines should have the same. 
They're both vehicles, right?"


-- 
Steven
___
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


Re: [Python-Dev] Compact ordered set

2019-02-28 Thread Antoine Pitrou
On Thu, 28 Feb 2019 22:43:04 +1100
Steven D'Aprano  wrote:
> On Wed, Feb 27, 2019 at 02:15:53PM -0800, Barry Warsaw wrote:
> 
> > I’m just relaying a data point.  Some Python folks I’ve worked with do 
> > make the connection between dicts and sets, and have questions about 
> > the ordering guarantees of then (and how they relate).  
> 
> Sets and dicts are not related by inheritence (except that they're both 
> subclasses of ``object``, but so is everything else). They don't share 
> an implementation. They don't provide the same API. They don't do the 
> same thing, except in the most general sense that they are both 
> collections.
> 
> What connection are these folks making?

Some of them may be coming from C++, where the respective
characteristics of set and map (or unordered_set and
unordered_multimap) are closely related.  I'm sure other languages
show similar analogies.

On a more abstract level, set and dict are both content-addressed
collections parametered on hash and equality functions.  For
algorithmically-minded people it makes sense to see a close connection
between them.

Regards

Antoine.


___
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


Re: [Python-Dev] Compact ordered set

2019-02-28 Thread Xavier Morel

> On 2019-02-28, at 12:56 , Antoine Pitrou  wrote:
> 
> On Thu, 28 Feb 2019 22:43:04 +1100
> Steven D'Aprano  wrote:
>> On Wed, Feb 27, 2019 at 02:15:53PM -0800, Barry Warsaw wrote:
>> 
>>> I’m just relaying a data point.  Some Python folks I’ve worked with do 
>>> make the connection between dicts and sets, and have questions about 
>>> the ordering guarantees of then (and how they relate).  
>> 
>> Sets and dicts are not related by inheritence (except that they're both 
>> subclasses of ``object``, but so is everything else). They don't share 
>> an implementation. They don't provide the same API. They don't do the 
>> same thing, except in the most general sense that they are both 
>> collections.
>> 
>> What connection are these folks making?
> 
> Some of them may be coming from C++, where the respective
> characteristics of set and map (or unordered_set and
> unordered_multimap) are closely related.  I'm sure other languages
> show similar analogies.

Indeed e.g. Rust's hashset is a trivial wrapper around a hashmap (with
no value): https://doc.rust-
lang.org/src/std/collections/hash/set.rs.html#121-123, its btreeset has
the exact same relationship to btreemap: https://doc.rust-
lang.org/src/alloc/collections/btree/set.rs.html#72-74

> On a more abstract level, set and dict are both content-addressed
> collections parametered on hash and equality functions.  For
> algorithmically-minded people it makes sense to see a close connection
> between them.

I can't speak for anyone else but before seeing this thread I actually
assumed (without any evidence or having checked obviously) that the set
builtin was built on top of dict or that they were built on the same
base and that the changes to dict's implementation in 3.6 (ordering,
space, …) had affected  sets in the same way.

That seems intuitively straightforward, even more so with dict.keys()
being a set.
___
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


Re: [Python-Dev] Compact ordered set

2019-02-28 Thread Chris Angelico
On Thu, Feb 28, 2019 at 10:58 PM Antoine Pitrou  wrote:
> Some of them may be coming from C++, where the respective
> characteristics of set and map (or unordered_set and
> unordered_multimap) are closely related.  I'm sure other languages
> show similar analogies.
>
> On a more abstract level, set and dict are both content-addressed
> collections parametered on hash and equality functions.  For
> algorithmically-minded people it makes sense to see a close connection
> between them.

Looking from the opposite direction, sets and dicts can be used to
solve a lot of the same problems. Want to detect cycles? Stuff things
you see into a set. If the thing is in the set, you've already seen
it. What if you want to track WHERE the cycle came from? Then stuff
things you see into a dict, mapping them to some kind of trace
information. Again, if the thing's in the collection, you've already
seen it, but now, since it's a dict, you can pull up some more info.
And collections.Counter can be used kinda like a multiset, but it's
definitely a dictionary. I think the similarities are more pragmatic
than pure, but that doesn't mean they aren't real.

ChrisA
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread INADA Naoki
No stats for last week?

On Sat, Feb 9, 2019 at 3:11 AM Python tracker 
wrote:

>
> ACTIVITY SUMMARY (2019-02-01 - 2019-02-08)
> Python tracker at https://bugs.python.org/
>
> To view or respond to any of the issues listed below, click on the issue.
> Do NOT respond to this message.
>
> Issues counts and deltas:
>   open6998 (+13)
>   closed 40696 (+47)
>   total  47694 (+60)
>
> Open issues with patches: 2783
>
> --
INADA Naoki  
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Jonathan Goble
On Thu, Feb 28, 2019, 8:02 AM INADA Naoki  wrote:

> No stats for last week?
>

Been missing for two weeks actually. I did not receive a summary on either
the 15th or 22nd.

>
___
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] Can I get a review for PR 10437?

2019-02-28 Thread Kevin Adler
This PR has been open for nearly 3 months without any comment. Can I please get someone to review it?
 
PR link: https://github.com/python/cpython/pull/10437
Bug report: https://bugs.python.org/issue35198

___
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


Re: [Python-Dev] Can I get a review for PR 10437?

2019-02-28 Thread Brett Cannon
While more reviewers never hurt, Victor has left at least one comment on
the PR.

On Thu, Feb 28, 2019 at 7:59 AM Kevin Adler  wrote:

> This PR has been open for nearly 3 months without any comment. Can I
> please get someone to review it?
>
> PR link: https://github.com/python/cpython/pull/10437
> Bug report: https://bugs.python.org/issue35198
>
> ___
> 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/brett%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


Re: [Python-Dev] Compile-time resolution of packages [Was: Another update for PEP 394...]

2019-02-28 Thread Gregory P. Smith
On Wed, Feb 27, 2019 at 5:12 PM Toshio Kuratomi  wrote:

>
> On Tue, Feb 26, 2019 at 2:07 PM Neil Schemenauer 
> wrote:
>
>> On 2019-02-26, Gregory P. Smith wrote:
>> > On Tue, Feb 26, 2019 at 9:55 AM Barry Warsaw  wrote:
>> > For an OS distro provided interpreter, being able to restrict its use to
>> > only OS distro provided software would be ideal (so ideal that people
>> who
>> > haven't learned the hard distro maintenance lessons may hate me for it).
>>
>> This idea has some definite problems.  I think enforcing it via
> convention is about as much as would be good to do.  Anything more and you
> make it hard for people who really need to use the vendor provided
> interpreter from being able to do so.
>
> Why might someone need to use the distro provided interpreter?
>
> * Vendor provides some python modules in their system packages which are
> not installable from pip (possibly even a proprietary extension module, so
> not even buildable from source or copyable from the system location) which
> the end user needs to use to do something to their system.
> * End user writes a python module which is a plugin to a system tool which
> has to be installed into the system python to from which that system tool
> runs.  The user then wants to write a script which uses the system tool
> with the plugin in order to do something to their system outside of the
> system tool (perhaps the system tool is GUI-driven and the user wants to
> automate a part of it via the python module).  They need their script to
> use the system python so that they are using the same code as the system
> tool itself would use.
>
> There's probably other scenarios where the benefits of locking the user
> out of the system python outweigh the benefits but these are the ones that
> I've run across lately.
>
>
Agreed.  The convention approach as someone said RHEL 8 has apparently done
with an os distro reserved interpreter (yay) is likely good enough for most
situations.

I'd go a *little* further than that and suggest such an os distro reserved
interpreter attempt to prevent installation of packages (ie: remove
pip/ensurepip/distutils) via any other means than the OS package manager
(rpms, debs).  Obviously that can't actually prevent someone from figuring
out how to run getpip or manually installing trees of packages within its
sys.path, but it acts as a deterrent suggesting that this interpreter is
not intended for arbitrary software installation.

-gps
___
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


Re: [Python-Dev] datetime.timedelta total_microseconds

2019-02-28 Thread Alexander Belopolsky
> while "some_var / some_other_var" could be doing anything.

"At an elementary level the division of two natural numbers is – among
other possible interpretations – the process of calculating the number of
times one number is contained within another one."

-- 

The process of figuring out how many seconds fit into a given interval is
called division by a second.

I am afraid people who get confused by timedelta / timedelta division know
too much about Python where / can indeed mean anything including e.g.
joining filesystem paths.
___
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


Re: [Python-Dev] datetime.timedelta total_microseconds

2019-02-28 Thread Wes Turner
You could specify the return value type annotations in the docstring of a
convert()/to_unit() method, or for each to_unit() method. Are they all
floats?

div and floordiv are not going away. Without reading the docs, I, too,
wouldn't have guessed that division by the desired unit is the correct way.

In terms of performance, a convert()/to_unit() method must do either a hash
lookup or multiple comparisons to present a more useful exception  than
that returned by initializing timedelta with something like nanoseconds=.

FWIW, astropy.time.TimeDelta supports sub-nanosecond precision and has a
.to() method for changing units/quantities.
http://docs.astropy.org/en/stable/time/#time-deltas

> The TimeDelta class is derived from the Time class and shares many of its
properties. One difference is that the time scale has to be one for which
one day is exactly 86400 seconds. Hence, the scale cannot be UTC.
>
> The available time formats are:
>
> Format Class
> secTimeDeltaSec
> jd  TimeDeltaJD
> datetime  TimeDeltaDatetime

http://docs.astropy.org/en/stable/api/astropy.time.TimeDelta.html#astropy.time.TimeDelta

http://docs.astropy.org/en/stable/_modules/astropy/time/core.html#TimeDelta.to


On Thursday, February 28, 2019, Alexander Belopolsky <
alexander.belopol...@gmail.com> wrote:

> > while "some_var / some_other_var" could be doing anything.
>
> "At an elementary level the division of two natural numbers is – among
> other possible interpretations – the process of calculating the number of
> times one number is contained within another one."
>
> -- 
>
> The process of figuring out how many seconds fit into a given interval is
> called division by a second.
>
> I am afraid people who get confused by timedelta / timedelta division know
> too much about Python where / can indeed mean anything including e.g.
> joining filesystem paths.
>
___
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


Re: [Python-Dev] Compact ordered set

2019-02-28 Thread Greg Ewing

Antoine Pitrou wrote:


On a more abstract level, set and dict are both content-addressed
collections parametered on hash and equality functions.


Indeed. It's been said that a set is like "half a dict", and
this is why sets were implemented using dicts in the old days.
It's kind of an obvious thing to do.

You can argue about how far the analogy should be taken, but
you can't blame people for noticing the similarity.

--
Greg
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Terry Reedy

On 2/28/2019 8:07 AM, Jonathan Goble wrote:
On Thu, Feb 28, 2019, 8:02 AM INADA Naoki > wrote:


No stats for last week?


Been missing for two weeks actually. I did not receive a summary on 
either the 15th or 22nd.


Ditto for me.  I get pydev via gmane.  Anyone missing the same issues 
get pydev directly by email?



--
Terry Jan Reedy

___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Jonathan Goble
On Thu, Feb 28, 2019, 5:11 PM Terry Reedy  wrote:

> On 2/28/2019 8:07 AM, Jonathan Goble wrote:
> > On Thu, Feb 28, 2019, 8:02 AM INADA Naoki  > > wrote:
> >
> > No stats for last week?
> >
> >
> > Been missing for two weeks actually. I did not receive a summary on
> > either the 15th or 22nd.
>
> Ditto for me.  I get pydev via gmane.  Anyone missing the same issues
> get pydev directly by email?
>

I get direct emails only and stated my observation above. :-)

>
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Glenn Linderman

On 2/28/2019 2:18 PM, Jonathan Goble wrote:
On Thu, Feb 28, 2019, 5:11 PM Terry Reedy > wrote:


On 2/28/2019 8:07 AM, Jonathan Goble wrote:
> On Thu, Feb 28, 2019, 8:02 AM INADA Naoki
mailto:songofaca...@gmail.com>
> >>
wrote:
>
>     No stats for last week?
>
>
> Been missing for two weeks actually. I did not receive a summary on
> either the 15th or 22nd.

Ditto for me.  I get pydev via gmane.  Anyone missing the same issues
get pydev directly by email?


I get direct emails only and stated my observation above. :-)


I confirm and concur with Jonathan's observation, by searching my email 
archive for this group list. So it is not just something about his 
particular email address... except we both do use Google Mail services.  
I do check my Google SPAM box for the account, and it wasn't there 
either, by recollection (I don't archive the SPAM, but delete it ASAP).


Can someone not using a Google email address also confirm?

Glenn
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Terry Reedy

On 2/28/2019 5:38 PM, Glenn Linderman wrote:

On 2/28/2019 2:18 PM, Jonathan Goble wrote:
On Thu, Feb 28, 2019, 5:11 PM Terry Reedy > wrote:


On 2/28/2019 8:07 AM, Jonathan Goble wrote:
> On Thu, Feb 28, 2019, 8:02 AM INADA Naoki
mailto:songofaca...@gmail.com>
> >>
wrote:
>
>     No stats for last week?
>
>
> Been missing for two weeks actually. I did not receive a summary on
> either the 15th or 22nd.

Ditto for me.  I get pydev via gmane.  Anyone missing the same issues
get pydev directly by email?


I get direct emails only and stated my observation above. :-)


I confirm and concur with Jonathan's observation, by searching my email 
archive for this group list. So it is not just something about his 
particular email address... except we both do use Google Mail services.  
I do check my Google SPAM box for the account, and it wasn't there 
either, by recollection (I don't archive the SPAM, but delete it ASAP).


Can someone not using a Google email address also confirm?


I effectively did when I said I access via gmane -- as a newsgroup via 
NNTP.  I am sure that the mail server sends directly to news.gmane.org 
rather than through google.



--
Terry Jan Reedy


___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Glenn Linderman

On 2/28/2019 2:52 PM, Terry Reedy wrote:

On 2/28/2019 5:38 PM, Glenn Linderman wrote:

On 2/28/2019 2:18 PM, Jonathan Goble wrote:
On Thu, Feb 28, 2019, 5:11 PM Terry Reedy > wrote:


    On 2/28/2019 8:07 AM, Jonathan Goble wrote:
    > On Thu, Feb 28, 2019, 8:02 AM INADA Naoki
    mailto:songofaca...@gmail.com>
    > >>
    wrote:
    >
    >     No stats for last week?
    >
    >
    > Been missing for two weeks actually. I did not receive a 
summary on

    > either the 15th or 22nd.

    Ditto for me.  I get pydev via gmane.  Anyone missing the same 
issues

    get pydev directly by email?


I get direct emails only and stated my observation above. :-)


I confirm and concur with Jonathan's observation, by searching my 
email archive for this group list. So it is not just something about 
his particular email address... except we both do use Google Mail 
services.  I do check my Google SPAM box for the account, and it 
wasn't there either, by recollection (I don't archive the SPAM, but 
delete it ASAP).


Can someone not using a Google email address also confirm?


I effectively did when I said I access via gmane -- as a newsgroup via 
NNTP.  I am sure that the mail server sends directly to news.gmane.org 
rather than through google.


That's a whole different protocol. I don't know all the configurations 
for the server that sends the Summary messages, or how it is handled, 
but you confirm it didn't get to gnane via NNTP, and Jonathan and I 
confirm it didn't get to Google email servers, but neither one really 
confirms that it didn't get to other email servers. Google email is 
definitely different than other email servers.


There seems to be enough evidence that something went wrong somewhere, 
though, and whoever maintains that process should start investigating, 
but it would still be nice to get confirmation from a non-Google email 
recipient whether they did or did not get the Summary messages.


I wonder if there is a way to manually send them, and if the missing two 
weeks of activity can be reported... once the sending problem is 
understood and resolved.
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Jonathan Goble
On Thu, Feb 28, 2019 at 6:57 PM Glenn Linderman 
wrote:

> On 2/28/2019 2:52 PM, Terry Reedy wrote:
>
> On 2/28/2019 5:38 PM, Glenn Linderman wrote:
>
> On 2/28/2019 2:18 PM, Jonathan Goble wrote:
>
> On Thu, Feb 28, 2019, 5:11 PM Terry Reedy   > wrote:
>
> On 2/28/2019 8:07 AM, Jonathan Goble wrote:
> > On Thu, Feb 28, 2019, 8:02 AM INADA Naoki
> mailto:songofaca...@gmail.com>
> 
> >   >>
> wrote:
> >
> > No stats for last week?
> >
> >
> > Been missing for two weeks actually. I did not receive a summary on
> > either the 15th or 22nd.
>
> Ditto for me.  I get pydev via gmane.  Anyone missing the same issues
> get pydev directly by email?
>
>
> I get direct emails only and stated my observation above. :-)
>
>
> I confirm and concur with Jonathan's observation, by searching my email
> archive for this group list. So it is not just something about his
> particular email address... except we both do use Google Mail services.  I
> do check my Google SPAM box for the account, and it wasn't there either, by
> recollection (I don't archive the SPAM, but delete it ASAP).
>
> Can someone not using a Google email address also confirm?
>
>
> I effectively did when I said I access via gmane -- as a newsgroup via
> NNTP.  I am sure that the mail server sends directly to news.gmane.org
> rather than through google.
>
>
> That's a whole different protocol. I don't know all the configurations for
> the server that sends the Summary messages, or how it is handled, but you
> confirm it didn't get to gnane via NNTP, and Jonathan and I confirm it
> didn't get to Google email servers, but neither one really confirms that it
> didn't get to other email servers. Google email is definitely different
> than other email servers.
>
> There seems to be enough evidence that something went wrong somewhere,
> though, and whoever maintains that process should start investigating, but
> it would still be nice to get confirmation from a non-Google email
> recipient whether they did or did not get the Summary messages.
>
> I wonder if there is a way to manually send them, and if the missing two
> weeks of activity can be reported... once the sending problem is understood
> and resolved.
>

It's also possible that the fault is not in sending (we have evidence here
that two entirely different protocols have not received it, and they are
also not in the archives [1]), but in the generation of the report. Could
there have been a subtle change to the bpo tracker itself, or something
else along those lines, that is causing the script to fail silently before
it ever reaches the point of attempting to send? Or perhaps a disk ran out
of space somewhere?

[1] https://mail.python.org/pipermail/python-dev/2019-February/date.html
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread INADA Naoki
>
> It's also possible that the fault is not in sending (we have evidence here 
> that two entirely different protocols have not received it, and they are also 
> not in the archives [1]), but in the generation of the report. Could there 
> have been a subtle change to the bpo tracker itself, or something else along 
> those lines, that is causing the script to fail silently before it ever 
> reaches the point of attempting to send? Or perhaps a disk ran out of space 
> somewhere?
>
> [1] https://mail.python.org/pipermail/python-dev/2019-February/date.html

I suspect so.  See "Open issues deltas (weekly)" graph in this page.
It is ended by 2/8.

https://bugs.python.org/issue?@template=stats

-- 
INADA Naoki  
___
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


Re: [Python-Dev] [RELEASE] Python 3.8.0a1 is now available for testing

2019-02-28 Thread Neil Schemenauer
On 2019-02-26, Stephane Wirtel wrote:
> I also filled an issue [2] for brotlipy (used by httpbin and requests).
> The problem is with PyInterpreterState.

I tried compiling psycopg2 today and it has a similar problem:

psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’:
psycopg/psycopgmodule.c:689:18: error: dereferencing pointer to incomplete 
type ‘PyInterpreterState’ {aka ‘struct _is’}
 while (interp->next)

That code is inside a function:

/* Return nonzero if the current one is the main interpreter */
static int
psyco_is_main_interp(void)
...

I believe the correct fix is to use PEP 3121 per-interpreter module
state.  I created a new issue:

https://github.com/psycopg/psycopg2/issues/854

I think the fix is not trival as the psycopgmodule.c source code has
change a fair bit to use the PEP 3121 APIs.

Regards,

  Neil
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread MRAB

On 2019-02-28 23:54, Glenn Linderman wrote:

On 2/28/2019 2:52 PM, Terry Reedy wrote:

On 2/28/2019 5:38 PM, Glenn Linderman wrote:

On 2/28/2019 2:18 PM, Jonathan Goble wrote:
On Thu, Feb 28, 2019, 5:11 PM Terry Reedy > wrote:


    On 2/28/2019 8:07 AM, Jonathan Goble wrote:
    > On Thu, Feb 28, 2019, 8:02 AM INADA Naoki
    mailto:songofaca...@gmail.com>
    > >>
    wrote:
    >
    >     No stats for last week?
    >
    >
    > Been missing for two weeks actually. I did not receive a 
summary on

    > either the 15th or 22nd.

    Ditto for me.  I get pydev via gmane.  Anyone missing the same 
issues

    get pydev directly by email?


I get direct emails only and stated my observation above. :-)


I confirm and concur with Jonathan's observation, by searching my 
email archive for this group list. So it is not just something about 
his particular email address... except we both do use Google Mail 
services.  I do check my Google SPAM box for the account, and it 
wasn't there either, by recollection (I don't archive the SPAM, but 
delete it ASAP).


Can someone not using a Google email address also confirm?


I effectively did when I said I access via gmane -- as a newsgroup via 
NNTP.  I am sure that the mail server sends directly to news.gmane.org 
rather than through google.


That's a whole different protocol. I don't know all the configurations 
for the server that sends the Summary messages, or how it is handled, 
but you confirm it didn't get to gnane via NNTP, and Jonathan and I 
confirm it didn't get to Google email servers, but neither one really 
confirms that it didn't get to other email servers. Google email is 
definitely different than other email servers.


There seems to be enough evidence that something went wrong somewhere, 
though, and whoever maintains that process should start investigating, 
but it would still be nice to get confirmation from a non-Google email 
recipient whether they did or did not get the Summary messages.


I wonder if there is a way to manually send them, and if the missing two 
weeks of activity can be reported... once the sending problem is 
understood and resolved.


I subscribed at https://mail.python.org/mailman/listinfo/python-dev and 
I don't use Google for email. I didn't receive them either.

___
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


Re: [Python-Dev] [RELEASE] Python 3.8.0a1 is now available for testing

2019-02-28 Thread Victor Stinner
Hi,

Le ven. 1 mars 2019 à 02:12, Neil Schemenauer  a écrit :
> I believe the correct fix is to use PEP 3121 per-interpreter module
> state.  I created a new issue:
>
> https://github.com/psycopg/psycopg2/issues/854
>
> I think the fix is not trival as the psycopgmodule.c source code has
> change a fair bit to use the PEP 3121 APIs.

The problem is this function:


/* Return nonzero if the current one is the main interpreter */
static int
psyco_is_main_interp(void)
{
static PyInterpreterState *main_interp = NULL;  /* Cached reference */
PyInterpreterState *interp;

if (main_interp) {
return (main_interp == PyThreadState_Get()->interp);
}

/* No cached value: cache the proper value and try again. */
interp = PyInterpreterState_Head();
while (interp->next)
interp = interp->next;

main_interp = interp;
assert (main_interp);
return psyco_is_main_interp();
}

https://github.com/psycopg/psycopg2/blob/599432552aae4941c2b282e9251330f1357b2a45/psycopg/utils.c#L407

I'm not sure that this code is safe. In CPython, iterating on
interp->next is protected by a lock:

HEAD_LOCK();
...
HEAD_UNLOCK();

We already expose the main interpreter since Python 3.7:
PyInterpreterState_Main(). psycopg can be modified to use directly
this function rather than playing black magic with CPython internals.

IMHO it's a good thing that the compilation failed: that such bug is found :-)

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Terry Reedy

On 2/28/2019 6:54 PM, Glenn Linderman wrote:

There seems to be enough evidence that something went wrong somewhere, 
though, and whoever maintains that process should start investigating, 
but it would still be nice to get confirmation from a non-Google email 
recipient whether they did or did not get the Summary messages.


I wonder if there is a way to manually send them, and if the missing two 
weeks of activity can be reported... once the sending problem is 
understood and resolved.


I posted a note to the core-workflow list, but I don't know if anyone 
with power or knowledge still reads it.


To get a listing, go to the tracker search page, put
2019-02-09 to 2019-03-01
in the date box, and change status to don't care.  At the moment, this 
returns 204 issues.


--
Terry Jan Reedy

___
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


Re: [Python-Dev] Summary of Python tracker Issues

2019-02-28 Thread Ezio Melotti
On Fri, Mar 1, 2019 at 5:59 AM Terry Reedy  wrote:
>
> On 2/28/2019 6:54 PM, Glenn Linderman wrote:
>
> > There seems to be enough evidence that something went wrong somewhere,
> > though, and whoever maintains that process should start investigating,
> > but it would still be nice to get confirmation from a non-Google email
> > recipient whether they did or did not get the Summary messages.
> >
> > I wonder if there is a way to manually send them, and if the missing two
> > weeks of activity can be reported... once the sending problem is
> > understood and resolved.
>
> I posted a note to the core-workflow list, but I don't know if anyone
> with power or knowledge still reads it.
>

The tracker got migrated recently, and that's the most likely cause of
the missing reports.
We'll look into it and get them back :)

> To get a listing, go to the tracker search page, put
> 2019-02-09 to 2019-03-01
> in the date box, and change status to don't care.  At the moment, this
> returns 204 issues.
>
> --
> Terry Jan Reedy
>
___
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