[issue42821] HTMLParser: subsequent duplicate attributes should be ignored

2021-01-05 Thread Ezio Melotti


Ezio Melotti  added the comment:

If we follow the behavior of the browser, we will have to pick one of the two 
values and discard the other, making this value unaccessible.  If we provide 
both, scripts and libraries that use HTMLParser will have access to both and 
can decide what to do.

For example BeautifulSoup already does the right thing:
>>> bs4.BeautifulSoup('text')

text

Changing this might also break code that rely on this behavior.  I'm therefore 
going to close this as "not a bug".

--
assignee:  -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-01-05 Thread Ammar Askar


Change by Ammar Askar :


--
nosy: +eryksun
title: Optimization opportunity on Windows -> Build libraries with "/OPT:REF" 
linker optimization on Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-05 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Do we have good intuition or data about which operations need speeding up 
> most? Everybody always assumes it's BINARY_ADD, but much Python code isn't 
> actually numeric, and binary operations aren't all that common.

IMO, we shouldn't focus too much on optimizing binops. Regular webapps/network 
kind of code wouldn't benefit from that, and scientific code that uses numpy/ml 
libraries already offsets most of expensive computation to outside of CPython 
eval. Instead, I think, we should continue focusing on lowering the cost of 
function/method calls and attribute access.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom

Michael L. Boom  added the comment:

The gcc 10.x seems to think this is also a bug:

/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41:
 error: expected ‘(’ before ‘PyType_HasFeature’
  633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-01-05 Thread David Justo


David Justo  added the comment:

Hi folks! I'm interested in contributing to this issue, but I'm unsure about 
the context.

Can `` prompts be toggled on-and-off in the docs? I do not see that option. 
I read that this is possible in javascript-enabled versions of the site, but 
isn't that the default? If so, I have JS enabled and I do not see how to toggle 
them out :) . Maybe that's part of what we need to fix as well.

Thanks for your time!

--
nosy: +davidmrdavid

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Looks to me like this line is at fault:

  607 | } else if PyLong_Check(obj) {

That's not valid C. In the GitHub mirror this line has been corrected.

--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Do we have good intuition or data about which operations need speeding up most? 
Everybody always assumes it's BINARY_ADD, but much Python code isn't actually 
numeric, and binary operations aren't all that common. (For example, IIRC at my 
previous employer the hottest code was some kind of web template expansion and 
another bottleneck was marshalling RPC requests and results.)

Optimizers usually evolve to be excellent at optimizing the benchmark du jour 
-- what benchmark do we want to use?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30044] shutil.copystat should (allow to) copy ownership, and other attributes

2021-01-05 Thread David Justo


David Justo  added the comment:

Hi folks,
I'd be interested in contributing to this issue, since it seems "easy" enough, 
but I'm unsure that consensus was reached about the right solution.

>From what I gathered from Giampaolo's comments, we have solutions that should 
>work for Unix-y systems and MacOS. So that's clear.

For Windows though, I'm unsure. It appears, we'd need kernel-mode-enabled 
clients to do this and maybe that's enough to discourage this effort altogether.

So it appears we have 3 options then:
1. Implement a new function that copies ownership in linux+mac but not in 
Windows. Then to document that difference.
2. Implement a new function that copies ownership in linux+mac, then use the 
native NT API to achieve the same result in Windows. Document the limitations
3. Just document the existing limitations.

Do we have a preference? I do not, just excited to potentially contribute 
something :) 

Thanks!

--
nosy: +davidmrdavid

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom

Michael L. Boom  added the comment:

The gcc 10.x thinks that the right side of the expression on 
incoude/python3.9/object.h should be in parentheses.  It seems like a Python 
bug.  Perhaps earlier versions of gcc didn't have a problem with this.

/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41:
 error: expected ‘(’ before ‘PyType_HasFeature’
  633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42712] Segmentation fault in running ast.literal_eval() with large expression size.

2021-01-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I think we really need a customer parser for ast.literal_eval(), one that 
doesn't have the same constraints and that can be counted on for safe 
evaluation of untrusted input.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-05 Thread Yury Selivanov


Yury Selivanov  added the comment:

> The gist seems to be to have extra opcodes that only work for certain 
> situations (e.g. INT_BINARY_ADD). In a hot function we can rewrite opcodes 
> with their specialized counterpart. The new opcode contains a guard that 
> rewrites itself back if the guard fails (and then it stays unoptimized).

This is also roughly what I suggested in https://bugs.python.org/msg379333. 
Except that I don't think it's necessary to add new opcodes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14014] codecs.StreamWriter.reset contract not fulfilled

2021-01-05 Thread Berker Peksag


Change by Berker Peksag :


--
assignee:  -> docs@python
components:  -Unicode
nosy: +docs@python -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14014] codecs.StreamWriter.reset contract not fulfilled

2021-01-05 Thread Berker Peksag


Change by Berker Peksag :


--
assignee: lemburg -> 
components: +Documentation
nosy: +vstinner
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14014] codecs.StreamWriter.reset contract not fulfilled

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset a3ca6747f50efa2fe59caf516a26b0fd1912b8e8 by Miss Islington (bot) 
in branch '3.9':
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
https://github.com/python/cpython/commit/a3ca6747f50efa2fe59caf516a26b0fd1912b8e8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14014] codecs.StreamWriter.reset contract not fulfilled

2021-01-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +22966
pull_request: https://github.com/python/cpython/pull/24136

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14014] codecs.StreamWriter.reset contract not fulfilled

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e by Berker Peksag in 
branch 'master':
bpo-14014: Clarify StreamWriter.reset() documentation (GH-13716)
https://github.com/python/cpython/commit/1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread Richard Damon
On 1/5/21 8:02 PM, Mats Wichmann wrote:
> On 1/5/21 4:04 PM, Chris Angelico wrote:
>> On Wed, Jan 6, 2021 at 10:01 AM Eli the Bearded
>> <*@eli.users.panix.com> wrote:
>>>
>>> In comp.lang.python, Chris Angelico   wrote:
 There are multiple definitions for "day of year", depending on how you
 want to handle certain oddities. The simplest is to identify Jan 1st
 as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
 libraries will define the year as starting with the week that contains
 the Thursday, or something, and then will define days of year
 accordingly.
>>>
>>> That sounds like some weird off-shoot of the ISO-8601 calendar. That
>>> document primarily concerns itself with weeks. Week 1 of a year is the
>>> first week with a Thursday in it. The last week of a year will be
>>> either
>>> 52 or 53, and you can have things like days in January belonging to the
>>> week of the previous year.
>>
>> The "weird off-shoot" part is probably a result of me misremembering
>> things, so don't read too much into the details :) I just remember
>> coming across something that numbered days within a year in a way that
>> was consistent with the way that it numbered weeks, which would indeed
>> have been based on the ISO 8601 week numbering. Not 100% sure of the
>> exact details.
>
> "workweeks" has always been fun, ISO standard or not, there's been a
> variation for ages since people don't seem to always follow ISO for
> that.  I spent over a decade at a place that lived and died by their
> WorkWeek references ("due WW22" or the like would appear in every
> status report ever written, and there were zillions of those) - and it
> didn't agree with ISO on whether WW1 was the week that contained Jan 1
> or whether it was the week that followed the previous year's last
> workweek. After all, those few days can't actually belong to two
> different workweeks, now can they?  :)
>
> (that was not a good memory you guys brought back :) )

I'm reminded of a video made describing 'ISO Weeks' that was put out on
Dec 30, 2019, which was the first day of the ISO week bsed 2020, and he
ended it with a comment that if 2019 wasn't going so well, you could
always just use ISO to get an early start on 2020.

Apparently a lot of people were getting this recommended a number of
months later, and people were commenting how that line just was not
aging well. And we couldn't use that te get out of 2020, as 2020 is a
long year, and ISO 2021 didn't start until Jan 4th.

-- 
Richard Damon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: dayofyear is not great when going into a new year

2021-01-05 Thread Eli the Bearded
In comp.lang.python, Mats Wichmann   wrote:
> "workweeks" has always been fun, ISO standard or not, there's been a 
> variation for ages since people don't seem to always follow ISO for 
> that.  I spent over a decade at a place that lived and died by their 
> WorkWeek references ("due WW22" or the like would appear in every status 
> report ever written, and there were zillions of those) - and it didn't 
> agree with ISO on whether WW1 was the week that contained Jan 1 or 
> whether it was the week that followed the previous year's last workweek. 
> After all, those few days can't actually belong to two different 
> workweeks, now can they?  :)

I think the ISO standard was to try to unify a bunch of inconsistent
locally defined things like that. In Gnu date(1), there are THREE
different, and sometimes the same and sometimes not, week of year
codes:

   %U week number of year, with Sunday as first day of week (00..53)

   %V ISO week number, with Monday as first day of week (01..53)

   %W week number of year, with Monday as first day of week (00..53)

I don't think that is an exhaustive list of methods used, either.

(excuse the vi command ugliness; % is special to : commands in vi)

:r! date +"U: \%U; V: \%V; W: \%W"
U: 01; V: 01; W: 01

Today they all match. But not always.

:r! date --date="Jan 02 2005" +"U: \%U; V: \%V; W: \%W"
U: 01; V: 53; W: 00

> (that was not a good memory you guys brought back :) )

Oh what a tangled web we weave, when we first begin to [measure time].

Elijah
--
they all disagree for Jan 02 2022, too, but slightly differently
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

I've skimmed several papers by Stefan Brunthaler about something called 
Quickening that I first found via the Pyston blog, which linked to an ancient 
bpo issue with a patch created by Stefan (https://bugs.python.org/issue14757).

The gist seems to be to have extra opcodes that only work for certain 
situations (e.g. INT_BINARY_ADD). In a hot function we can rewrite opcodes with 
their specialized counterpart. The new opcode contains a guard that rewrites 
itself back if the guard fails (and then it stays unoptimized).

I think the idea is that it's pretty cheap to keep an extra pointer to a 
"alternate bytecode" array.

--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread Mats Wichmann

On 1/5/21 4:04 PM, Chris Angelico wrote:

On Wed, Jan 6, 2021 at 10:01 AM Eli the Bearded <*@eli.users.panix.com> wrote:


In comp.lang.python, Chris Angelico   wrote:

There are multiple definitions for "day of year", depending on how you
want to handle certain oddities. The simplest is to identify Jan 1st
as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
libraries will define the year as starting with the week that contains
the Thursday, or something, and then will define days of year
accordingly.


That sounds like some weird off-shoot of the ISO-8601 calendar. That
document primarily concerns itself with weeks. Week 1 of a year is the
first week with a Thursday in it. The last week of a year will be either
52 or 53, and you can have things like days in January belonging to the
week of the previous year.


The "weird off-shoot" part is probably a result of me misremembering
things, so don't read too much into the details :) I just remember
coming across something that numbered days within a year in a way that
was consistent with the way that it numbered weeks, which would indeed
have been based on the ISO 8601 week numbering. Not 100% sure of the
exact details.


"workweeks" has always been fun, ISO standard or not, there's been a 
variation for ages since people don't seem to always follow ISO for 
that.  I spent over a decade at a place that lived and died by their 
WorkWeek references ("due WW22" or the like would appear in every status 
report ever written, and there were zillions of those) - and it didn't 
agree with ISO on whether WW1 was the week that contained Jan 1 or 
whether it was the week that followed the previous year's last workweek. 
After all, those few days can't actually belong to two different 
workweeks, now can they?  :)


(that was not a good memory you guys brought back :) )
--
https://mail.python.org/mailman/listinfo/python-list


[issue40959] Remove unused and unneeded function declaration from sqlite3 header files

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:

Thank you!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40959] Remove unused and unneeded function declaration from sqlite3 header files

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 203b2493ae6fd7c1f039f3f906f087d67d9100d5 by Erlend Egeberg 
Aasland in branch 'master':
bpo-40959: Remove unused declarations from sqlite3 headers (GH-20828)
https://github.com/python/cpython/commit/203b2493ae6fd7c1f039f3f906f087d67d9100d5


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Maybe libxml is using a deprecated API or an invalid combination of command 
line flags. I don't feel like debugging this until there's a clearer indication 
of who's at fault.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2021-01-05 Thread Berker Peksag


Change by Berker Peksag :


--
components: +macOS

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:

It's now deprecated in 3.10.

--
components: +Extension Modules -Build, macOS
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
versions: +Python 3.10 -Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset ddb5e11683c8db9d2095f2f9406701443c4dc9b3 by Erlend Egeberg 
Aasland in branch 'master':
bpo-24464: Deprecate sqlite3.enable_shared_cache (GH-24008)
https://github.com/python/cpython/commit/ddb5e11683c8db9d2095f2f9406701443c4dc9b3


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom


Michael L. Boom  added the comment:

I thought the problem was in a Python file.  Perhaps I am mistaken.  The 
libxml2 builds fine when using Python 3.8.x.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset db91714faa6d3ede59003cdcc719a758160f3970 by Steve Dower in branch 
'3.8':
bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)
https://github.com/python/cpython/commit/db91714faa6d3ede59003cdcc719a758160f3970


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Change by Steve Dower :


--
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40956] Use Argument Clinic in sqlite3

2021-01-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22965
pull_request: https://github.com/python/cpython/pull/24135

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



ANN: pvlib-0.8.1 released

2021-01-05 Thread Dr. Mark Alexander Mikofski PhD
Dear Pythonistas and solar power enthusiasts,

On behalf of the maintainers, we're happy to announce a new release of
pvlib python:
software for simulating performance of photovoltaic solar energy systems.

*See what's new for v0.8.1:*
* https://pvlib-python.readthedocs.io/en/stable/whatsnew.html

*Releases are available from PyPI and the conda-forge channel:*
* https://pypi.org/project/pvlib/
* https://anaconda.org/conda-forge/pvlib-python

*Read the Documentation:*
* https://pvlib-python.readthedocs.io/en/stable/index.html

*Report issues & contribute:*
* https://github.com/pvlib/pvlib-python

*Highlights:*
* AirSpeed Velocity benchmarks are now available!
https://pvlib-benchmarker.github.io/pvlib-benchmarks/
* A numpy-based implementation of the SPECTRL2 spectral irradiance model
and a usage example in the gallery.
https://pvlib-python.readthedocs.io/en/stable/auto_examples/plot_spectrl2_fig51A.html
* New functions for modeling inverters with multiple MPPTs.
* The Liu-Jordan irradiance function is deprecated, and will be removed in
v0.9. Please use the newer Campbell-Norman function instead, but note it
expects some different arguments.
* Added the option of fetching 5 and 15-minute PSM3 data using a new
"attributes" keyword argument.
* Clear-sky detection now uses centered rolling windows instead of
left-aligned rolling windows.

*The maintainers thank you for using pvlib python!*

-- 
Mark Mikofski, PhD (2005)
*Fiat Lux*
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue42755] sqlite3.Connection.backup default value is diffrent between implmentation and docs

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 28611c28474a7fafdcf7ea2712f2670dda940eef by Miss Islington (bot) 
in branch '3.8':
bpo-42755: Fix sqlite3.Connection.backup docs (GH-23965)
https://github.com/python/cpython/commit/28611c28474a7fafdcf7ea2712f2670dda940eef


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38413] Remove or change "Multithreading" section

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 03a079f7cf8eacc29ea616060916e8a63ba6e5ba by Miss Islington (bot) 
in branch '3.8':
bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)
https://github.com/python/cpython/commit/03a079f7cf8eacc29ea616060916e8a63ba6e5ba


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38413] Remove or change "Multithreading" section

2021-01-05 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +22964
pull_request: https://github.com/python/cpython/pull/24134

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38413] Remove or change "Multithreading" section

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset f9949f82e17c88609adb53eff3a7d5cd63a645bd by Vladimir in branch 
'master':
bpo-38413: Remove outdated section about multithreading in sqlite3 (GH-23159)
https://github.com/python/cpython/commit/f9949f82e17c88609adb53eff3a7d5cd63a645bd


--
nosy: +berker.peksag

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:

I believe this is all done now.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +22963
pull_request: https://github.com/python/cpython/pull/24133

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

Have you approached the libxml2 developers with this problem?

--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> Sorry, I've been doing it. They're just slow because I'm getting OpenSSL done 
> at the same time and they both keep causing merge conflicts.

No problem. I noticed that, so I aborted my cherry-picker.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset 77d54710506b67e48b50bb1758fb31fc33a33c83 by Steve Dower in branch 
'3.9':
bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)
https://github.com/python/cpython/commit/77d54710506b67e48b50bb1758fb31fc33a33c83


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset 86b1207dbb9201d1259d1ec7603e720e29ba9042 by Steve Dower in branch 
'3.8':
bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)
https://github.com/python/cpython/commit/86b1207dbb9201d1259d1ec7603e720e29ba9042


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:

> Steve Dower, do you mind if I create backports for the Windows build as well?

Sorry, I've been doing it. They're just slow because I'm getting OpenSSL done 
at the same time and they both keep causing merge conflicts.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42811] Update docs for importlib.util.resolve_name() to use __spec__.parent instead of __package__

2021-01-05 Thread Brett Cannon


Change by Brett Cannon :


--
title: Update docs for importlib.util.resolve_name() to use __spec__ instead of 
__package__ -> Update docs for importlib.util.resolve_name() to use 
__spec__.parent instead of __package__

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1

2021-01-05 Thread Berker Peksag


Change by Berker Peksag :


--
versions:  -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:

I think this is now done. Thank you, Erlend!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40810] sqlite3 test CheckTraceCallbackContent fails for sqlite v3.7.3 through 3.7.14.1

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset cf0b23908cc902ac38cd83dd7ca5afdf89e1543b by Erlend Egeberg 
Aasland in branch 'master':
bpo-40810: Require SQLite 3.7.15 (GH-24106)
https://github.com/python/cpython/commit/cf0b23908cc902ac38cd83dd7ca5afdf89e1543b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40956] Use Argument Clinic in sqlite3

2021-01-05 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c7f8d3caf0b10c19cd46b1b334a98628eac15672 by Erlend Egeberg 
Aasland in branch 'master':
bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)
https://github.com/python/cpython/commit/c7f8d3caf0b10c19cd46b1b334a98628eac15672


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42835] Can't Built libxml2 When Using Python 3.9.x

2021-01-05 Thread Michael L. Boom

New submission from Michael L. Boom :

When building libxml2 using Python 3.9.0 or Python 3.9.1 and gcc 10.2.0 I get 
the below error.  Others are having this problem according to my Google search.
make[4]: Entering directory 
'/local/users/michael.l.boom/gits/scoring_engine/git/aae_tmp_dir/libxml2-2.9.10/python'
  CC   libxml.lo
  CC   libxml2-py.lo
  CC   types.lo
In file included from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/pytime.h:6,
 from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:85,
 from libxml_wrap.h:1,
 from types.c:9:
types.c: In function ‘libxml_xmlXPathObjectPtrConvert’:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41:
 error: expected ‘(’ before ‘PyType_HasFeature’
  633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
  | ^
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/longobject.h:15:9:
 note: in expansion of macro ‘PyType_FastSubclass’
   15 | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS)
  | ^~~
types.c:607:15: note: in expansion of macro ‘PyLong_Check’
  607 | } else if PyLong_Check(obj) {
  |   ^~~~
types.c:607:33: error: expected ‘;’ before ‘{’ token
  607 | } else if PyLong_Check(obj) {
  | ^
libxml.c: In function ‘xmlPythonFileCloseRaw’:
libxml.c:259:5: warning: ‘PyEval_CallMethod’ is deprecated 
[-Wdeprecated-declarations]
  259 | ret = PyEval_CallMethod(file, (char *) "close", (char *) "()");
  | ^~~
In file included from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:145,
 from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/ceval.h:28:43:
 note: declared here
   28 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
  |   ^
libxml.c: In function ‘xmlPythonFileReadRaw’:
libxml.c:289:5: warning: ‘PyEval_CallMethod’ is deprecated 
[-Wdeprecated-declarations]
  289 | ret = PyEval_CallMethod(file, (char *) "read", (char *) "(i)", len);
  | ^~~
In file included from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:145,
 from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/ceval.h:28:43:
 note: declared here
   28 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
  |   ^
In file included from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/pytime.h:6,
 from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:85,
 from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/object.h:633:41:
 error: expected ‘(’ before ‘PyType_HasFeature’
  633 | #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
  | ^
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/unicodeobject.h:115:18:
 note: in expansion of macro ‘PyType_FastSubclass’
  115 |  PyType_FastSubclass(Py_TYPE(op), 
Py_TPFLAGS_UNICODE_SUBCLASS)
  |  ^~~
libxml.c:297:15: note: in expansion of macro ‘PyUnicode_Check’
  297 | } else if PyUnicode_Check (ret) {
  |   ^~~
libxml.c:297:37: error: expected ‘;’ before ‘{’ token
  297 | } else if PyUnicode_Check (ret) {
  | ^
libxml.c: In function ‘xmlPythonFileRead’:
libxml.c:354:5: warning: ‘PyEval_CallMethod’ is deprecated 
[-Wdeprecated-declarations]
  354 | ret = PyEval_CallMethod(file, (char *) "io_read", (char *) "(i)", 
len);
  | ^~~
In file included from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/Python.h:145,
 from libxml.c:14:
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/ceval.h:28:43:
 note: declared here
   28 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
  |   ^
In file included from 
/local/users/michael.l.boom/gits/scoring_engine/git/aae_build_python_3.9.1/include/python3.9/pytime.h:6,
 from 

[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +22962
pull_request: https://github.com/python/cpython/pull/24132

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +22961
pull_request: https://github.com/python/cpython/pull/24131

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset c8333931434389ae72da9eb0471054f4393249db by Steve Dower in branch 
'3.9':
bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)
https://github.com/python/cpython/commit/c8333931434389ae72da9eb0471054f4393249db


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread Chris Angelico
On Wed, Jan 6, 2021 at 10:01 AM Eli the Bearded <*@eli.users.panix.com> wrote:
>
> In comp.lang.python, Chris Angelico   wrote:
> > There are multiple definitions for "day of year", depending on how you
> > want to handle certain oddities. The simplest is to identify Jan 1st
> > as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
> > libraries will define the year as starting with the week that contains
> > the Thursday, or something, and then will define days of year
> > accordingly.
>
> That sounds like some weird off-shoot of the ISO-8601 calendar. That
> document primarily concerns itself with weeks. Week 1 of a year is the
> first week with a Thursday in it. The last week of a year will be either
> 52 or 53, and you can have things like days in January belonging to the
> week of the previous year.

The "weird off-shoot" part is probably a result of me misremembering
things, so don't read too much into the details :) I just remember
coming across something that numbered days within a year in a way that
was consistent with the way that it numbered weeks, which would indeed
have been based on the ISO 8601 week numbering. Not 100% sure of the
exact details.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: dayofyear is not great when going into a new year

2021-01-05 Thread Eli the Bearded
In comp.lang.python, Chris Angelico   wrote:
> There are multiple definitions for "day of year", depending on how you
> want to handle certain oddities. The simplest is to identify Jan 1st
> as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
> libraries will define the year as starting with the week that contains
> the Thursday, or something, and then will define days of year
> accordingly.

That sounds like some weird off-shoot of the ISO-8601 calendar. That
document primarily concerns itself with weeks. Week 1 of a year is the
first week with a Thursday in it. The last week of a year will be either
52 or 53, and you can have things like days in January belonging to the
week of the previous year. Wikipedia gives examples:

https://en.wikipedia.org/wiki/ISO_week_date

If you are operating on that, then it might indeed make sense to number
the days from -W1-1. I can't say I've ever encountered that. Since
W1-1 is always a Monday on the ISO calendar, it would have the neat
property that you could always turn day of year into day of week with a
mod operation. It would have the quirk that years are either 364 or 371
days, neither of which most people would answer when asked "How many
days are there in a year?"

I've only used ISO dates for by-week graphs, because they have the nice
property of "all weeks are seven days", so you don't get oddball weeks
screwing up your plots.

> If you want an easy way to graph day-by-day data and the exact day
> numbers are irrelevant, what I'd recommend is: Convert the date into
> Unix time, divide by 86400, floor it. That'll give you a Julian-style
> date number where Jan 1st 1970 is 0, Jan 2nd is 1, etc, and at the end
> of a year, it'll just keep on incrementing. That would get you past
> the 2020/2021 boundary pretty smoothly.

That works well. The previous suggestion using January 1st 2020 as an
epoch start is also good.

Elijah
--
also finds "week starts on Monday" to be oddball about ISO-8601
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42746] python3.7.3 - ssl.SSLContext() - "Killed"

2021-01-05 Thread Christian Heimes


Christian Heimes  added the comment:

What exactly happens when you try to instantiate an SSLContext() object? Does 
it just print the string "Killed" or does the process stop and segfault 
immediately?

If it's a segfault then it is likely caused by an incompatibility between 
recent LibreSSL and old Python 3.7.3. Can you switch to OpenSSL? LibreSSL isn't 
well supported.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread Chris Angelico
On Wed, Jan 6, 2021 at 9:51 AM Michael F. Stemper  wrote:
>
> On 05/01/2021 15.27, Chris Angelico wrote:
> > On Wed, Jan 6, 2021 at 8:02 AM Martin Schöön  
> > wrote:
>
> >> I have had some Python fun with COVID-19 data. I have done
> >> some curve fitting and to make that easier I have transformed
> >> date to day of year. Come end of 2020 and beginning of 2021
> >> and this idea falls on its face.
>
> > There are multiple definitions for "day of year", depending on how you
> > want to handle certain oddities. The simplest is to identify Jan 1st
> > as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
> > libraries will define the year as starting with the week that contains
> > the Thursday, or something, and then will define days of year
> > accordingly.
> >
> > If you want an easy way to graph day-by-day data and the exact day
> > numbers are irrelevant, what I'd recommend is: Convert the date into
> > Unix time, divide by 86400, floor it. That'll give you a Julian-style
> > date number where Jan 1st 1970 is 0, Jan 2nd is 1, etc, and at the end
> > of a year, it'll just keep on incrementing. That would get you past
> > the 2020/2021 boundary pretty smoothly.
>
> Possibly better than rolling your own is using standard stuff:
>
>  >>> from datetime import date,datetime
>  >>> datetime.toordinal(date(2020,1,1))
> 737425
>  >>> datetime.toordinal(date(2021,1,5))
> 737795
>  >>> datetime.toordinal(date(2021,1,5)) - datetime.toordinal(date(2020,1,1))
> 370
>  >>>
>

Oh yes. In fact, not "possibly", but "definitely" :) ALWAYS use a
library for date manipulation. But you have to know what you're doing
before you can figure out how to call on the library.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread miss-islington


miss-islington  added the comment:


New changeset e9a71dab094c0467f07d13cce4324c8a93727863 by Erlend Egeberg 
Aasland in branch '3.9':
[3.9] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674) 
(GH-24130)
https://github.com/python/cpython/commit/e9a71dab094c0467f07d13cce4324c8a93727863


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread Michael F. Stemper

On 05/01/2021 15.27, Chris Angelico wrote:

On Wed, Jan 6, 2021 at 8:02 AM Martin Schöön  wrote:



I have had some Python fun with COVID-19 data. I have done
some curve fitting and to make that easier I have transformed
date to day of year. Come end of 2020 and beginning of 2021
and this idea falls on its face.



There are multiple definitions for "day of year", depending on how you
want to handle certain oddities. The simplest is to identify Jan 1st
as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
libraries will define the year as starting with the week that contains
the Thursday, or something, and then will define days of year
accordingly.

If you want an easy way to graph day-by-day data and the exact day
numbers are irrelevant, what I'd recommend is: Convert the date into
Unix time, divide by 86400, floor it. That'll give you a Julian-style
date number where Jan 1st 1970 is 0, Jan 2nd is 1, etc, and at the end
of a year, it'll just keep on incrementing. That would get you past
the 2020/2021 boundary pretty smoothly.


Possibly better than rolling your own is using standard stuff:

>>> from datetime import date,datetime
>>> datetime.toordinal(date(2020,1,1))
737425
>>> datetime.toordinal(date(2021,1,5))
737795
>>> datetime.toordinal(date(2021,1,5)) - datetime.toordinal(date(2020,1,1))
370
>>>

--
Michael F. Stemper
This post contains greater than 95% post-consumer bytes by weight.
--
https://mail.python.org/mailman/listinfo/python-list


[issue22213] Make pyvenv style virtual environments easier to configure when embedding Python

2021-01-05 Thread Andrew Brunner


Change by Andrew Brunner :


--
nosy: +abrunner73

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread miss-islington


miss-islington  added the comment:


New changeset f27451dc35f1c69be0c26e8aeafee7ba6771039a by Erlend Egeberg 
Aasland in branch '3.8':
[3.8] bpo-42584: Update macOS installer to use SQLite 3.34.0 (GH-23674). 
(GH-24129)
https://github.com/python/cpython/commit/f27451dc35f1c69be0c26e8aeafee7ba6771039a


--
nosy: +miss-islington
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Steve Dower, do you mind if I create backports for the Windows build as well?

--
resolution:  -> fixed
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22960
pull_request: https://github.com/python/cpython/pull/24130

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22959
pull_request: https://github.com/python/cpython/pull/24129

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread dn via Python-list
On 1/6/21 9:55 AM, Martin Schöön wrote:
> Hello,
> 
> I have had some Python fun with COVID-19 data. I have done
> some curve fitting and to make that easier I have transformed
> date to day of year. Come end of 2020 and beginning of 2021
> and this idea falls on its face.
> 
> There must be a better way of doing this.
> 
> I am using Pandas for reading and manipulating data coming
> from a csv file. Scipy, numpy and matplotlib are used
> for the curve fitting and plotting.


An important question is how the day/date is presented in these graphs.

The Julian date format used to be more common in Data Processing. Dates
are expressed as yy-ddd. Thus, prepending "20" or "21" to existing
day-of-year numbers, would separate and sequence correctly.
(NB carefully consider str cf int)

Another solution is to use a Unix Timestamp for each day.

In both cases, arithmetic comparison-logic is possible, and library
routines exist to format various reporting-formats.
-- 
Regards =dn
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22958
pull_request: https://github.com/python/cpython/pull/24128

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Ned Deily, can you fix the macOS backports?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2021-01-05 Thread Ned Deily


Ned Deily  added the comment:

Thanks, Ronald and others. I have done some testing now with macOS 11 Big Sur 
and retested on 10.15 Catalina and with various versions of Tk and what I am 
seeing is as follows.

- On macOS 11.1 Big Sur with IDLE.app from the python.org 3.9.1 universal2 
installer set as the user default for .py files, double-clicking on a .py file 
causes IDLE 3.10 to launch and the .py file to open in an edit window as 
expected. Double-clicking on additional .py files in the Finder while IDLE is 
already launched does cause the files to be opened in the active IDLE.app also 
as expected. Performing the same sequence with the same 3.9.1 installer on 
macOS 10.15.7 Catalina, double-clicking on additional files do not cause them 
to be opened in the active IDLE.app as reported in this issue.

- I also verified that the same behavior is seen with IDLE.app from a couple of 
other python.org installers, for example, 3.8.7: double-clicking on additional 
.py files does not cause them to be opened in an active IDLE.ap on 10.15.7 but 
does on 11.1.

So, it looks like this really is an operating system (Launch Services?) issue 
in macOS 10.15 that has been changed/fixed in macOS 11. While there *might* be 
a way to programmatically workaround this within IDLE, Python, or Tk on 10.15, 
so far we haven't found one. And there is a fairly simple workaround on 10.15: 
just use the IDLE File -> Open menu item or keyboard shortcut (cmd-O).  It's 
not as elegant if you are used to double-clicking but it works and 
realistically we are not going to see a change in 10.15 behavior from Apple.

I would appreciate any other confirmations of this behavior or any ideas for a 
workaround. Barring the latter, I think we should probably just close this 
issue, unfortunately, as an OS bug.



Now just to make things a bit more complicated - sigh: I also tested with the 
recent python.org installer for the 3.10.0a4 pre-release. The principal 
difference between the 3.9.1 and 3.10.0a4 versions I tested with is that the 
3.9.1 is linked with Tk 8.6.10 while 3.10.0a4 is linked with the just-released 
Tk 8.6.11. On macOS 11 Big Sur, there is one noticeable difference in behavior 
between the two. With the macOS 11 Big Sur / 3.10.0a4 / 8.6.11 combo, when 
double-clicking on a .py file without IDLE.app being active, a message window 
appears saying that the application cannot open Python Script files but does 
launch IDLE.app. With IDLE.app now active, double-clicking again on the same 
file then does cause the file to be opened in an edit window of the active IDLE 
as expected and double-clicking on other .py files then open edit windows for 
them as expected. Without more detailed investigation, this appears to be a 
minor problem (possibly a change in Tk) unrelated to those in this issue
  other than that it involves double-clicking on .py files but I thought I 
should mention it here in case someone runs into it before it is resolved.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42584] Upgrade macOS and Windows installers to use SQLite 3.34.0

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset dd74c01d3bd2833f72ffe400a1d10b8583c0ba6a by Erlend Egeberg 
Aasland in branch 'master':
bpo-42584: Update Windows installer to use SQLite 3.34.0 (GH-23675)
https://github.com/python/cpython/commit/dd74c01d3bd2833f72ffe400a1d10b8583c0ba6a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +22957
pull_request: https://github.com/python/cpython/pull/24127

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Steve Dower  added the comment:


New changeset afb71443788a7b20f9104243b3d8d37e3d12cfe2 by Steve Dower in branch 
'master':
bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i (GH-24125)
https://github.com/python/cpython/commit/afb71443788a7b20f9104243b3d8d37e3d12cfe2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: dayofyear is not great when going into a new year

2021-01-05 Thread Chris Angelico
On Wed, Jan 6, 2021 at 8:02 AM Martin Schöön  wrote:
>
> Hello,
>
> I have had some Python fun with COVID-19 data. I have done
> some curve fitting and to make that easier I have transformed
> date to day of year. Come end of 2020 and beginning of 2021
> and this idea falls on its face.
>

There are multiple definitions for "day of year", depending on how you
want to handle certain oddities. The simplest is to identify Jan 1st
as 1, Jan 2nd as 2, etc, to Dec 31st as either 365 or 366; but some
libraries will define the year as starting with the week that contains
the Thursday, or something, and then will define days of year
accordingly.

If you want an easy way to graph day-by-day data and the exact day
numbers are irrelevant, what I'd recommend is: Convert the date into
Unix time, divide by 86400, floor it. That'll give you a Julian-style
date number where Jan 1st 1970 is 0, Jan 2nd is 1, etc, and at the end
of a year, it'll just keep on incrementing. That would get you past
the 2020/2021 boundary pretty smoothly.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue42712] Segmentation fault in running ast.literal_eval() with large expression size.

2021-01-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I closed the following by Xinmeng as duplicates of this:
#42713 eval(...) 
#42714 compile(...)
#42715 exec(...)
#42716 ast.parse(...)

This is probably a duplicate of #42609, and should likely be closed also.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42746] python3.7.3 - ssl.SSLContext() - "Killed"

2021-01-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

3.7.3 is an old release of an old version.  It has already been patched a few 
times.  If you cannot upgrade to at least the last bugfix release of 3.7, you 
are somewhat on your own.

The word 'Killed' in not in the ssl module, so I presume it comes from the 
LibreSSL, which on your system is what is imported as _ssl.  On Win 10, 'import 
ssl' prints nothing (normal for most imports) and ssl.SSLContext returns an 
instance of class SSLContext.

You question would be better asked on a help forum, such as python-list or 
stackoverflow.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
pull_requests: +22956
pull_request: https://github.com/python/cpython/pull/24126

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



dayofyear is not great when going into a new year

2021-01-05 Thread Martin Schöön
Hello,

I have had some Python fun with COVID-19 data. I have done
some curve fitting and to make that easier I have transformed
date to day of year. Come end of 2020 and beginning of 2021
and this idea falls on its face.

There must be a better way of doing this.

I am using Pandas for reading and manipulating data coming
from a csv file. Scipy, numpy and matplotlib are used
for the curve fitting and plotting.

TIA,

/Martin
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41837] Upgrade installers to OpenSSL 1.1.1i

2021-01-05 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +22955
pull_request: https://github.com/python/cpython/pull/24125

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42818] AttributeError: 'zipimporter' object has no attribute 'find_spec'

2021-01-05 Thread Klaus Ethgen


Klaus Ethgen  added the comment:

I don't know if that is an issue with zipimporter or an issue with a version of 
setuptools.

My knowledge of python is very limited.

But from what I can see in the backtrace it is missing find_spec. How ever that 
reverting is or should be implemented, it seams to be obviously that it is not 
working.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42827] pegen parser: Multiline eval with assignment to function call: assertion failed

2021-01-05 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +22954
pull_request: https://github.com/python/cpython/pull/24124

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Christian Heimes


Christian Heimes  added the comment:

> BTW, do we still want to keep the socket CAPI for external users?

Yes, at least for a while. socket.h is not part of the public include headers. 
It's still possible that the CAPI is used by an external project.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API

2021-01-05 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

> I'm also in the process of removing PySocketModuleAPI from _ssl.c.

BTW, do we still want to keep the socket CAPI for external users?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42828] Python readline module

2021-01-05 Thread Marco Franzo


Marco Franzo  added the comment:

So, I use Ubuntu 20.10 and the terminal
is the one distributed with the system.

I think this problem born in my code here:

def generate_input():
while True:
str = input().strip()
yield helloworld_pb2.Operazione(operazione = str)


I think the string

os.system('stty sane')

it can be very useful for those who have the shell unusable at the end of the 
program.

If i remove import readline, I no longer have any problems, but i need 
the features of readline

--
Added file: https://bugs.python.org/file49722/io_console.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2021-01-05 Thread Malversán

Malversán  added the comment:

That means the core code also works for SOCK_RAW sockets. It's only limited by 
explicit socket type checks at a higher level.

As a curious note (not related to the issue), I'm also using the SOCK_SEQPACKET 
connection created with BaseEventLoop to access a custom daemon related to BLE 
functionality.

--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42498] smtplib is glitchy after receive server code 500

2021-01-05 Thread izomiac


izomiac  added the comment:

I agree, it's my suspicion that the server's error message and python's 
outbound command are sent so close to each other that buffering ensures they 
disagree about the exact sequence of commands/responses.

As for my server, it was HAProxy doing the injection and I rewrote the server 
to both ignore PROXY commands and to listen on multiple ports so a proxy is not 
necessary. 

So this issue no longer exists for me, but I know that I'm not the only one who 
uses HAProxy to forward SMTP requests (residential ISPs block port 25), and 
Python was relatively unique in its intolerance of this behavior.  (Python uses 
lower case commands, which are easy to recognize on server logs to determine 
which clients are using it.)  It's certainly not a critical issue affecting 
thousands, but in my experience glitchy behavior is a good indicator that the 
code is buggy in general.  Plus, buffering errors scare me because there are so 
many potential security exploits associated with them (on top of being a pain 
to debug.)  But, yeah, this is more of a courtesy bug to let you know about a 
tricky glitch I encountered.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate

2021-01-05 Thread mike bayer


mike bayer  added the comment:

> Under your proposal, the first line would be changed to say 
> "autocommit=True", even though not all the code below is in autocommit mode 
> (according to the SQLite engine's definition). What's more, I could insert 
> this line of code between statements 3 and 6:

  >  print("Autocommit mode?", conn.autocommit)

As Marc-Andre indicated, this is in fact how "autocommit" behaves on other 
drivers, including:

psycopg2 - uses either connection.autocommit, or 
extensions.ISOLATION_LEVEL_AUTOCOMMIT
pymysql - uses conn.autocommit(True|False)
mysqldb - uses conn.autocommit(True|False)
cx_Oracle - uses conn.autocommit
pyodbc - uses conn.autocommit

With all of the above drivers, one can emit "BEGIN" and "COMMIT" using
connection.execute(), and within the scope of that BEGIN/COMMIT pair, the 
database "engine" itself is in a transaction.  The "driver" however remains in 
"autocommit" mode.   This mode specifically means the driver is not getting
involved in starting and stopping transactions. 

As Marc mentions, we're not supposed to be emitting "BEGIN" and "COMMIT" on 
the driver, but none of them get in the way of us doing so, and additionally
most databases support additional options for the "BEGIN/START TRANSACTION" 
phase
that aren't available in the DBAPIs so sometimes we don't have much choice at 
least for the "BEGIN" command.

Here's an example using psycopg2, where the timestamp now() will freeze
when we're in a transaction started using manual "BEGIN"/ "COMMIT", while 
.autocommit stays True, and otherwise match statement execution time if we're 
not:

>>> import psycopg2
>>> conn = psycopg2.connect(user="scott", password="tiger", 
host="localhost", database="test")
>>> conn.autocommit = True
>>> cursor = conn.cursor()
>>> cursor.execute("SELECT 1")
>>> cursor.execute("select now() = statement_timestamp()")
>>> cursor.fetchall()
[(True,)]
>>> cursor.execute("BEGIN")
>>> cursor.execute("select now() = statement_timestamp();")
>>> cursor.fetchall()
[(False,)]  # we're in a transaction
>>> conn.autocommit   # still in driver-level autocommit
True
>>> cursor.execute("COMMIT")
>>> cursor.execute("select now() = statement_timestamp();")
>>> cursor.fetchall()
[(True,)]

For SQLAlchemy we already support pysqlite's "isolation_level=None" to 
implement "autocommit" so this issue does not affect us much, but the meaning 
of the term "autocommit" at the driver level shouldn't be controversial at this 
point as there's a lot of precedent.   "connection.autocommit" does not refer 
to the current transactional state of the database, just the current preference 
set upon the driver itself.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42828] Python readline module

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

This should be discussed on a user forum, not in our bug tracker.

--
nosy: +gvanrossum
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42829] get_type_hints throws for nested class with __future__ annotations

2021-01-05 Thread Guido van Rossum


Guido van Rossum  added the comment:

If you want this to work you have to pass the namespace where B is defined as 
locals to get_type_hint(). The recommended approach is to make B a global 
class; where that is not possible (as in your second example) you should chose 
a different name.

We're not going to guess additional namespaces to add to the lookup, so I will 
close this as won't fix.

PS. For short code snippets like your examples, I prefer pasting the code 
inline.

--
nosy: +gvanrossum
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38285] Asyncio BaseEventLoop can support socket types other than SOCK_STREAM

2021-01-05 Thread John Beeler


John Beeler  added the comment:

For what it's worth, a library I use currently hacks in this functionality by 
accessing the private method _create_connection_transport directly. This is 
done to allow a SOCK_RAW to be passed (which is itself required to then enable 
asyncio to be used for handling BLE).

This works, but as it requires the use of a private method, it's not ideal.

--
nosy: +jbeeler

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



NumPy 1.19.5 released

2021-01-05 Thread Charles R Harris
Hi All,

On behalf of the NumPy team I am pleased to announce the release of NumPy
1.19.5. NumPy 1.19.5 is a short bugfix release. Apart from fixing several
bugs, the main improvement is an update to OpenBLAS 0.3.13 that works
around the Windows 2004 fmod bug while not breaking execution on other
platforms. This release supports Python 3.6-3.9 and is planned to be the
last release in the 1.19.x cycle. NumPy Wheels can be downloaded from PyPI
, source archives, release notes,
and wheel hashes are available on Github
. Linux users will
need pip >= 0.19.3 in order to install manylinux2010 and manylinux2014
wheels.

*Contributors*

A total of 8 people contributed to this release.  People with a "+" by their
names contributed a patch for the first time.


   - Charles Harris
   - Christoph Gohlke
   - Matti Picus
   - Raghuveer Devulapalli
   - Sebastian Berg
   - Simon Graham +
   - Veniamin Petrenko +
   - Bernie Gray +


*Pull requests merged*

A total of 11 pull requests were merged for this release.

   - #17756: BUG: Fix segfault due to out of bound pointer in floatstatus...
   - #17774: BUG: fix np.timedelta64('nat').__format__ throwing an exception
   - #17775: BUG: Fixed file handle leak in array_tofile.
   - #17786: BUG: Raise recursion error during dimension discovery
   - #17917: BUG: Fix subarray dtype used with too large count in fromfile
   - #17918: BUG: 'bool' object has no attribute 'ndim'
   - #17919: BUG: ensure _UFuncNoLoopError can be pickled
   - #17924: BLD: use BUFFERSIZE=20 in OpenBLAS
   - #18026: BLD: update to OpenBLAS 0.3.13
   - #18036: BUG: make a variable volatile to work around clang compiler bug
   - #18114: REL: Prepare for the NumPy 1.19.5 release.

Cheers,

Charles Harris
___
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com


[issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate

2021-01-05 Thread Géry

Géry  added the comment:

@james.oldfield

> What that answer doesn't mention is that, even with even with 
> isolation_mode=None, it's perfectly possible to start a transaction, which 
> takes the SQLite engine out of autocommit mode.

Exactly, so since autocommit=True is equivalent to isolation_mode=None I do not 
see why you the name ‘autocommit’ would be a problem. As you said, when you 
issue BEGIN, you leave autocommit mode.

> Under your proposal, the first line would be changed to say 
> "autocommit=True", even though not all the code below is in autocommit mode 
> (according to the SQLite engine's definition).

What is the difference with isolation_mode=None which also means autocommit 
mode?

> What's more, I could insert this line of code between statements 3 and 6:
>print("Autocommit mode?", conn.autocommit)
> And it would print True even though autocommit mode is off!

No, because the autocommit property would be automatically updated to False at 
conn.execute("BEGIN"), which is the standard behaviour as @lemburg explained.

@lemburg

> I guess the SQLite driver does not start a new transaction for SELECTs, since 
> these are usually read-only

Nor for DDL statements (CREATE, DROP).

> For the same reason, removing the SELECT "optimization" may cause
> a backwards incompatible change, which can be tricky to identify
> and cause corruption of data (in this case, data not written to
> the database, where it previously was written).

Since DQL statements (SELECT) are read-only, maybe we could keep the 
optimization and start transactions implicitly only for DDL statements (CREATE, 
DROP)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42831] IDLE fix colours for MacOS dark mode

2021-01-05 Thread E. Paine


E. Paine  added the comment:

I have also done a grep and believe the other affected parts from the user's 
perspective are the debugger (I haven't checked if Mark's version also 
suffers), the help dialog and hover tip (e.g. over the squeezer button).

> Would it work to just remove those specifications?

Almost certainly for the about dialog, though we would probably need to 
explicitly give the foreground colour for others (similar to what you did in PR 
12262, I think)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I do not understand what this discussion in a long-closed article is about. If 
you propose to add warning, I am against it. You are against removing the 
module. Well, the module will not be removed, the warning is no longer needed. 
The issue is closed.

I do not propose to change the rule. I say that the procedure cannot be 
executed in this case, because it will cause more harm than benefit. If we 
cannot follow the procedure for removing module, we cannot remove that module. 
It is fine to me. If you want to change this, propose changes to the procedure, 
but it should be discussed not here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42531] importlib.resources.path() raises TypeError for packages without __file__

2021-01-05 Thread William Schwartz


William Schwartz  added the comment:

@jaraco Did you have any other questions after my comments in msg382423? Do you 
think you or someone else could review PR 23611? Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate

2021-01-05 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

I think there's a bit of a misunderstanding here. When relying on
a DB-API driver's transaction API, you are not allowed to issue
separate transaction commands to the DB backend via the .execute()
methods. You have to use conn.commit() and conn.rollback().

The DB-API wants drivers to have connections default to transactional
behavior and implicitly start transactions when opening the connection
as well as when ending one (via .commit() or .rollback()) - provided the
backend does support transactions.

It also suggests that a method may be used to set the transactional
behavior.

Now, historically, many drivers have not always used methods for
this, but instead (or in addition) provide a property
connection.autocommit to allow setting or querying the current
state. Over time, this has become more or less a standard.

Aside: This is a bit unfortunate, since users would not expect
exceptions from such properties (e.g. network errors), but this where
things have moved and it's hard to change.

I guess the SQLite driver does not start a new transaction for
SELECTs, since these are usually read-only, but don't know whether
this still holds today (e.g. think of UDFs running INSERTs or UPDATEs).

For the same reason, removing the SELECT "optimization" may cause
a backwards incompatible change, which can be tricky to identify
and cause corruption of data (in this case, data not written to
the database, where it previously was written).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42831] IDLE fix colours for MacOS dark mode

2021-01-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This might be related to #7949, about KDE/GTK dark themes.

In general, IDLE only controls colors for Shell and editor windows, leaving 
dialogs to system default.  This appears to be true for the settings and search 
dialogs. 'About' is unusual in having some colors specified.  I had nothing to 
do with that.  Would it work to just remove those specifications?  Otherwise, 
every widget should specify both foreground and background color.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Christian Heimes


Christian Heimes  added the comment:

Apparently my defusedxml package is low-quality code...

Anyhow PEP 387 has clear rules how to handle incompatible changes. Every core 
dev has to follow these rules. You cannot simply ignore the rule, because you 
don't like it. If you want to change the rules or get an exception for a 
special case, please open a discussion, lobby for an amendment to PEP 387, and 
get approval from the SC.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39457] Add an autocommit property to sqlite3.Connection with a PEP 249 compliant manual commit mode and migrate

2021-01-05 Thread James Oldfield


James Oldfield  added the comment:

> Yes if you are talking about SQLite, the database ENGINE

I sure was! In this comment I will stick to saying either "SQLite engine" or 
"sqlite3 driver" as appropriate, hopefully that will be clearer.

> But here I am talking about SQLite3, the Python database DRIVER

Yep, I was aware of that. I was trying to say, please don't use the word 
"autocommit" in the sqlite3 driver when that word has a related but different 
meaning in the SQLite engine.

> You do not issue BEGIN statements with database DRIVERS, they are issued 
> implicitly, so that the manual mode is the default mode for database DRIVERS.

This sentence isn't literally true for several reasons (you say "you do not" 
but I certainly do, you use of "with database drivers" is dubious, and you seem 
to have causality in the wrong direction). I think there might be a bit of a 
language barrier here, so I hope you don't mind if I leave this to one side.

> Cf. this Stack Overflow answer for more details: 
> https://stackoverflow.com/a/48391535/2326961

I am fully, and painfully, aware of when the sqlite3 driver code will 
automatically issue BEGIN statements to the engine. I have no need to read 
StackOverflow answers about it, I have read the C source code to sqlite3 (and 
pysqlite) directly. I spent more time than I care to admit recently doing that! 
In fact that happened as a result of reading several confusing StackOverflow 
answers about transactions (maybe I'll write my own and add to the confusion...)

What that answer doesn't mention is that, even with even with 
isolation_mode=None, it's perfectly possible to start a transaction, which 
takes the SQLite engine out of autocommit mode. This is fully and intentionally 
supported by the sqlite3 driver, and the original author has said so and even 
recommended. For example, let's look at this code:

conn = sqlite3.connect(path, isolation_mode=None)
conn.execute("INSERT INTO test (i) VALUES (?)", (1,))  # stmt 1
foo = conn.execute("SELECT * FROM test").fetchall()# stmt 2
conn.execute("BEGIN")  # stmt 3
conn.execute("INSERT INTO test (i) VALUES (?)", (4,))  # stmt 4
bar = conn.execute("SELECT * FROM test").fetchall()# stmt 5
conn.execute("COMMIT") # stmt 6

Statement 1 and statement 2 execute using the SQLite engine's autocommit mode. 
Statements 3 through to 5 execute in a single transaction and do *not* use the 
SQLite engine's autocommit mode. (Technically statement 6 actually does use 
autocommit because COMMIT uses the autocommit mechanism under the hood ... but 
let's forget about that!)

Under your proposal, the first line would be changed to say "autocommit=True", 
even though not all the code below is in autocommit mode (according to the 
SQLite engine's definition). What's more, I could insert this line of code 
between statements 3 and 6:

print("Autocommit mode?", conn.autocommit)

And it would print True even though autocommit mode is off!

Now, maybe your reaction is that "autocommit mode *in the driver*" can have a 
different meaning from "autocommit mode *in the engine*". Yes, it can, but that 
doesn't mean it should! Please, just pick a different name! For example, say 
"manual mode" (instead of autocommit=True) or "auto-start-transaction mode" 
(instead of autocommit=False).


> No, you do not want that at the database DRIVER level. Because like Mike 
> Bayer explained in issue #9924, this is not what other database DRIVERS do, 
> and this is not PEP 249 compliant 

The "that" you are referring to here was when I said that I prefer to set 
isolation_level = None, like the above code snippet. Do not tell me that it is 
not what I want; it certainly IS what I want! I do not want the sqlite3 driver 
getting in the way between me and the SQLite engine. Many future users of the 
sqlite3 driver are likely to feel the same way, and the API should allow that 
to happen clearly.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41818] Lib/pty.py major revision

2021-01-05 Thread Soumendra Ganguly


Soumendra Ganguly  added the comment:

Thank you for the fix. That test was created by modifying an existing test 
which already had that issue; it is documented in a comment by user nnorwitz in 
the file. If your solution resolves the problem for all the tests in "class 
PtyTest", then can you please also remove that comment?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Deprecation warning may help users of old lower-quality code at the cost of 
harming users of old higher-quality code. It does not look right to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42833] Lib/urllib/request.py: digest algorithm should be case insensitive

2021-01-05 Thread Pierre Tardy


Change by Pierre Tardy :


--
pull_requests: +22953
status: pending -> open
pull_request: https://github.com/python/cpython/pull/24122

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables

2021-01-05 Thread Ken Jin


Change by Ken Jin :


--
keywords: +patch
pull_requests: +22952
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/24121

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >