[issue39273] ncurses does not include BUTTON5_* constants

2020-01-08 Thread Michael Yoo


New submission from Michael Yoo :

Hi,

Recently I was working with ncurses, and when handling the mouse scroll events, 
I noticed that the curses library does not include the BUTTON5_* macros 
provided by ncurses. On my system, BUTTON5 corresponds to the mouse down event.

Is there a reason for this, or has it just not been updated? If so, the 
expectation is that it exists.

Relevant source location: 
https://github.com/python/cpython/blob/2bc3434/Modules/_cursesmodule.c#L4668

--
components: Library (Lib)
messages: 359657
nosy: michael@akunacapital.com
priority: normal
severity: normal
status: open
title: ncurses does not include BUTTON5_* constants
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue39271] Dead assignment in pattern_subx

2020-01-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you Alex.

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



[issue39271] Dead assignment in pattern_subx

2020-01-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1a183faccbe5c32c367dbced721a25c1444dc5c1 by Serhiy Storchaka 
(Alex Henrie) in branch 'master':
bpo-39271: Remove dead assignment from pattern_subx (GH-17915)
https://github.com/python/cpython/commit/1a183faccbe5c32c367dbced721a25c1444dc5c1


--
nosy: +serhiy.storchaka

___
Python tracker 

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



ANN: Astropy v4.0 released

2020-01-08 Thread Erik Tollerud
Dear colleagues,

We are very happy to announce the v4.0 release of the Astropy package,
a core Python package for Astronomy:

http://www.astropy.org

Astropy is a community-driven Python package intended to contain much
of the core functionality and common tools needed for astronomy and
astrophysics. It is part of the Astropy Project, which aims to foster
an ecosystem of interoperable astronomy packages for Python.

New and improved major functionality in this release includes:

* Support for Planck 2018 Cosmological Parameters
* Improved Consistency of Physical Constants and Units
* Scientific enhancements to the Galactocentric Frame
* New ymdhms Time Format
* New Context Manager for plotting time values
* Dynamic and improved handling of leap second
* Major Improvements in Compatibility of Quantity Objects with NumPy Functions
* Multiple interface improvements to WCSAxes
* Fitting of WCS to Pairs of Pixel/World Coordinates
* Support for WCS Transformations between Pixel and Time Values
* Improvements to Folding for Time Series
* New Table Methods and significant performance improvements for Tables
* Improved downloading and caching of remote files

In addition, hundreds of smaller improvements and fixes have been
made. An overview of the changes is provided at:

 http://docs.astropy.org/en/stable/whatsnew/4.0.html

The Astropy v4.0.x series now replaces v2.0.x as the long term support
release, and will be supported until the end of 2021. Also note that
the Astropy 4.x series only supports Python 3. Python 2 users can
continue to use the 2.x series but as of now it is no longer supported
(as Python 2 itself is no longer supported). For assistance converting
Python 2 code to Python 3, see the Python 3 for scientists conversion
guide.

Instructions for installing Astropy are provided on our website, and
extensive documentation can be found at:

 http://docs.astropy.org

If you make use of the Anaconda Python Distribution, you can update to
Astropy v4.0 with:

conda update astropy

Whereas if you usually use pip, you can do:

pip install astropy --upgrade

Please report any issues, or request new features via our GitHub repository:

 https://github.com/astropy/astropy/issues

Over 350 developers have contributed code to Astropy so far, and you
can find out more about the team behind Astropy here:

 http://www.astropy.org/team.html

If you use Astropy directly for your work, or as a dependency to
another package, please remember to acknowledgment it by citing the
appropriate Astropy paper. For the most up-to-date suggestions, see
the acknowledgement page, but as of this release the recommendation
is:

This research made use of Astropy, a community-developed core Python
package for Astronomy (Astropy Collaboration, 2018).

Special thanks to the coordinator for this release: Brigitta Sipocz.

We hope that you enjoy using Astropy as much as we enjoyed developing it!

Erik Tollerud, Tom Robitaille, Kelle Cruz, and Tom Aldcroft
on behalf of The Astropy Collaboration

https://www.astropy.org/announcements/release-4.0.html
--
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/

Support the Python Software Foundation:
http://www.python.org/psf/donations/


[issue39272] Dead assignment in _ssl__SSLContext_load_verify_locations_impl

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


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

___
Python tracker 

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



[issue39272] Dead assignment in _ssl__SSLContext_load_verify_locations_impl

2020-01-08 Thread Alex Henrie


New submission from Alex Henrie :

The function _ssl__SSLContext_load_verify_locations_impl currently contains the 
following code:

if (r != 1) {
ok = 0;
if (errno != 0) {
ERR_clear_error();
PyErr_SetFromErrno(PyExc_OSError);
}
else {
_setSSLError(NULL, 0, __FILE__, __LINE__);
}
goto error;
}
}
goto end;

  error:
ok = 0;

It is unnecessary to set ok to 0 before jumping to error because the first 
instruction after the error label does the same thing.

--
assignee: christian.heimes
components: SSL
messages: 359654
nosy: alex.henrie, christian.heimes
priority: normal
severity: normal
status: open
title: Dead assignment in _ssl__SSLContext_load_verify_locations_impl
type: performance
versions: Python 3.9

___
Python tracker 

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



[issue39271] Dead assignment in pattern_subx

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


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

___
Python tracker 

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



[issue39271] Dead assignment in pattern_subx

2020-01-08 Thread Alex Henrie


New submission from Alex Henrie :

The function pattern_subx currently sets the variable b to charsize, but that 
variable is reset to STATE_OFFSET(, state.start) before it is ever used.

--
components: Regular Expressions
messages: 359653
nosy: alex.henrie, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Dead assignment in pattern_subx
type: performance
versions: Python 3.9

___
Python tracker 

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



[issue39270] Dead assignment in config_init_module_search_paths

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


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

___
Python tracker 

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



[issue39270] Dead assignment in config_init_module_search_paths

2020-01-08 Thread Alex Henrie


New submission from Alex Henrie :

config_init_module_search_paths currently has the following code:

const wchar_t *p = sys_path;
while (1) {
p = wcschr(sys_path, delim);

The first assignment to p is unnecessary because it is immediately overwritten. 
Victor Stinner suggested moving the variable declaration into the loop itself 
to clarify that it does not need to be initialized elsewhere: 
https://github.com/python/cpython/pull/16267/files#r364216448

--
messages: 359652
nosy: alex.henrie
priority: normal
severity: normal
status: open
title: Dead assignment in config_init_module_search_paths
type: performance
versions: Python 3.9

___
Python tracker 

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



[issue39262] Unused error message in _sharedexception_bind

2020-01-08 Thread miss-islington


miss-islington  added the comment:


New changeset 45e5750a013291c5729e0ebad2b9e340fdffbd36 by Miss Islington (bot) 
in branch '3.8':
closes bpo-39262: Use specific out-of-memory message in _sharedexception_bind. 
(GH-17908)
https://github.com/python/cpython/commit/45e5750a013291c5729e0ebad2b9e340fdffbd36


--
nosy: +miss-islington

___
Python tracker 

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



[issue39150] See if PyToken_OneChar would be faster as a lookup table

2020-01-08 Thread Andy Lester


Andy Lester  added the comment:

I tried out some experimenting with the lookup table vs. the switch
statement.

The relevant diff (not including the patches to the code generator) is:


--- Parser/token.c
+++ Parser/token.c
@@ -77,31 +77,36 @@
 int
 PyToken_OneChar(int c1)
 {
-switch (c1) {
-case '%': return PERCENT;
-case '&': return AMPER;
-case '(': return LPAR;
-case ')': return RPAR;
-case '*': return STAR;
-case '+': return PLUS;
-case ',': return COMMA;
-case '-': return MINUS;
-case '.': return DOT;
-case '/': return SLASH;
-case ':': return COLON;
-case ';': return SEMI;
-case '<': return LESS;
-case '=': return EQUAL;
-case '>': return GREATER;
-case '@': return AT;
-case '[': return LSQB;
-case ']': return RSQB;
-case '^': return CIRCUMFLEX;
-case '{': return LBRACE;
-case '|': return VBAR;
-case '}': return RBRACE;
-case '~': return TILDE;
-}
+static char op_lookup[] = {
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,PERCENT,   AMPER, OP,
+LPAR,  RPAR,  STAR,  PLUS,  COMMA,
+MINUS, DOT,   SLASH, OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,COLON, SEMI,
+LESS,  EQUAL, GREATER,   OP,AT,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,LSQB,  OP,RSQB,  CIRCUMFLEX,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,OP,OP,
+OP,OP,OP,LBRACE,VBAR,
+RBRACE,TILDE
+};
+if (c1>=37 && c1<=126)
+return op_lookup[c1];
 return OP;
 }

To test the speed change, I couldn't use pyperformance, because the only
thing I wanted to time was the In my testing, I didn't use pyperformance
because the only part of the code I wanted to test was the actual
compilation of the code.  My solution for this was to find the 100 largest
*.py files in the cpython repo and compile them like so:

python -m py_compile $(List-of-big-*.py-files)

The speedup was significant: My table-driven lookup ran the compile tests
about 10% than the existing switch approach.  That was without
--enable-optimizations in my configure.

However, as pablogsal suspected, with PGO enabled, the two approaches ran
the code in pretty much the same speed.

I do think that there may be merit in using a table-driven approach that
generates less code and doesn't rely on PGO speeding things up.

If anyone's interested, all my work is on branch Issue39150 in my fork
petdance/cpython.

--

___
Python tracker 

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



[issue39262] Unused error message in _sharedexception_bind

2020-01-08 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 5cae042f686cc174e00093944dc118914c874b7c by Benjamin Peterson 
(Alex Henrie) in branch 'master':
closes bpo-39262: Use specific out-of-memory message in _sharedexception_bind. 
(GH-17908)
https://github.com/python/cpython/commit/5cae042f686cc174e00093944dc118914c874b7c


--
nosy: +benjamin.peterson
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



[issue39262] Unused error message in _sharedexception_bind

2020-01-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17325
pull_request: https://github.com/python/cpython/pull/17913

___
Python tracker 

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



[issue39261] Dead assignment in pyinit_config

2020-01-08 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 2c7ed417a4c758f1c3f97fcbca70a49f79e58c07 by Benjamin Peterson 
(Alex Henrie) in branch 'master':
closes bpo-39261: Remove dead assignment from pyinit_config. (GH-17907)
https://github.com/python/cpython/commit/2c7ed417a4c758f1c3f97fcbca70a49f79e58c07


--
nosy: +benjamin.peterson
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



[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin


Thomas Passin  added the comment:

I came across it while working on some code running in the Leo editor.  I had 
no idea it was not really public; I just assumed that someone knew something I 
didn't.  Then I discovered that it couldn't find some files I  thought it 
clearly should, and wrote the issue, thinking it might help someone else who 
didn't know the limitations.

But from what you say, I see it will be better to use another way, and to leave 
this bit alone.  Thank you.

--

___
Python tracker 

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



[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-08 Thread Dong-hee Na


Dong-hee Na  added the comment:

ftplib: 
https://github.com/python/cpython/blob/efa3b51fd060352cc6220b27a1026e4d4d5401bd/Lib/ftplib.py#L155
nntplib: 
https://github.com/python/cpython/blob/2e6a8efa837410327b593dc83c57492253b1201e/Lib/nntplib.py#L1049
smtplib: 
https://github.com/python/cpython/blob/3faf826e5879536d2272f1a51c58965a16827f81/Lib/smtplib.py#L386


I found more things that depends on socket.makefile.
IMHO, we can apply this change to those modules. What do you think?

--

___
Python tracker 

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



[issue39269] Descriptor how-to guide wanting update for 3.6+ features

2020-01-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for the reminder.
I'll have time soon to work on this.
Since the other tracker issue cover this,
will close this one as a duplicate.

--
resolution:  -> duplicate
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



[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-08 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Éric Araujo

Éric Araujo  added the comment:

The problem is that distutils.spawn.find_executable is an internal API, never 
meant for general usage.

Only minimal change happens to distutils these days, partly because the 
codebase is full of dark corners and weird interactions (so a fix can easily 
break someone else’s setup.py script), partly because few core developers have 
the expertise and willingess to write patches or review PRs.

So the question is: is the problem you reported a problem that happens when 
people write setup.py scripts, or when using the function for something else?  
If it’s the latter, I’m afraid the safe course of action would be to change 
nothing, and recommend people use truly general-use functions like shutil.which.

--

___
Python tracker 

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



[issue39269] Descriptor how-to guide wanting update for 3.6+ features

2020-01-08 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Seems like a duplicate of https://bugs.python.org/issue34394

--
nosy: +xtreak

___
Python tracker 

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



[issue39269] Descriptor how-to guide wanting update for 3.6+ features

2020-01-08 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue39269] Descriptor how-to guide wanting update for 3.6+ features

2020-01-08 Thread wim glenn


New submission from wim glenn :

https://docs.python.org/3/howto/descriptor.html

Current descriptor how-to guide, above, has no mention about API features added 
since Python 3.6 (see __set_name__ in PEP 487)

It's an important and useful piece of using descriptors effectively and the 
guide could be updated to include some info about that. 

There's some info in datamodel.html (e.g. 3.3.3.6. Creating the class object) 
but a mention in the how-to guide would be welcome too.

--
assignee: docs@python
components: Documentation
messages: 359642
nosy: docs@python, wim.glenn
priority: normal
severity: normal
status: open
title: Descriptor how-to guide wanting update for 3.6+ features
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue28617] Why isn't "in" called a comparison operation?

2020-01-08 Thread wim glenn


Change by wim glenn :


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



[issue36761] Extended slice assignment + iterable unpacking

2020-01-08 Thread wim glenn


Change by wim glenn :


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



[issue39264] Fix UserDict.get to account for __missing__

2020-01-08 Thread Bar Harel


Bar Harel  added the comment:

See also bpo-39267

--

___
Python tracker 

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



[issue39267] Fix dict's __missing__ documentation

2020-01-08 Thread Bar Harel


Change by Bar Harel :


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

___
Python tracker 

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



[issue39268] test_asyncio: test_create_server_ssl_verified() failed on AMD64 FreeBSD Non-Debug 3.x

2020-01-08 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 FreeBSD Non-Debug 3.x:
https://buildbot.python.org/all/#/builders/214/builds/123

==
ERROR: test_create_server_ssl_verified 
(test.test_asyncio.test_events.SelectEventLoopTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/test_asyncio/test_events.py",
 line 1106, in test_create_server_ssl_verified
proto.transport.close()
AttributeError: 'NoneType' object has no attribute 'close'

--
components: Tests, asyncio
messages: 359640
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: test_create_server_ssl_verified() failed on AMD64 FreeBSD 
Non-Debug 3.x
versions: Python 3.9

___
Python tracker 

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



[issue39267] Fix dict's __missing__ documentation

2020-01-08 Thread Bar Harel


New submission from Bar Harel :

Continuing bpo-39264, and according to the mailing list discussion at 
Python-Dev.
Fixing dict's __missing__ documentation. Clarify .get() does not call 
__missing__, and move __missing__ from the data model to dict's section as it's 
not a general object or ABC method but a dict-only implementation.

--
assignee: docs@python
components: Documentation
messages: 359639
nosy: bar.harel, docs@python
priority: normal
severity: normal
status: open
title: Fix dict's __missing__ documentation
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue39266] [2.7] test_bsddb3 leaked [1, 1, 1] file descriptors on AMD64 RHEL7 Refleaks 2.7

2020-01-08 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 RHEL7 Refleaks 2.7:
https://buildbot.python.org/all/#/builders/51/builds/13

test_bsddb3 leaked [1, 1, 1] file descriptors, sum=3

--
components: Tests
messages: 359638
nosy: vstinner
priority: normal
severity: normal
status: open
title: [2.7] test_bsddb3 leaked [1, 1, 1] file descriptors on AMD64 RHEL7 
Refleaks 2.7
versions: Python 2.7

___
Python tracker 

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



[issue39264] Fix UserDict.get to account for __missing__

2020-01-08 Thread Bar Harel


Change by Bar Harel :


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

___
Python tracker 

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



[issue38338] [2.7] test_ssl fails on RHEL8

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-39265 as a duplicate.

--

___
Python tracker 

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



[issue38338] [2.7] test_ssl: test_protocol_sslv23() and test_protocol_tlsv1_1() fail on RHEL8

2020-01-08 Thread STINNER Victor


Change by STINNER Victor :


--
title: [2.7] test_ssl fails on RHEL8 -> [2.7] test_ssl: test_protocol_sslv23() 
and test_protocol_tlsv1_1() fail on RHEL8

___
Python tracker 

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



[issue39265] test_ssl failed on AMD64 RHEL8 Refleaks 2.7

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I even already reported this issue as bpo-38338 :-)

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> [2.7] test_ssl fails on RHEL8

___
Python tracker 

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



[issue39265] test_ssl failed on AMD64 RHEL8 Refleaks 2.7

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

Note: it's not a regression, AMD64 RHEL8 Refleaks 2.7 is failing since build 
#1. Logs of oldest builds are no longer available, but I can see that test_ssl 
was already failing at build #10 (22 days ago, commit 
5f2c1345a79f205c680ed6e0a6ed44199546d79e).

--

___
Python tracker 

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



[issue39265] test_ssl failed on AMD64 RHEL8 Refleaks 2.7

2020-01-08 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +cstratak

___
Python tracker 

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



[issue39265] test_ssl failed on AMD64 RHEL8 Refleaks 2.7

2020-01-08 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 RHEL8 Refleaks 2.7:
https://buildbot.python.org/all/#/builders/102/builds/45

test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options ... 
 Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or 
directory: '/etc/ssl/openssl.cnf'

 PROTOCOL_TLS->PROTOCOL_TLS CERT_NONE
 PROTOCOL_TLSv1->PROTOCOL_TLS CERT_NONE
ERROR

Connecting to a TLSv1.1 server with various client options. ... 
 Could not scan /etc/ssl/openssl.cnf for MinProtocol: [Errno 2] No such file or 
directory: '/etc/ssl/openssl.cnf'

 PROTOCOL_TLSv1_1->PROTOCOL_TLSv1_1 CERT_NONE
 {PROTOCOL_TLS->PROTOCOL_TLSv1_1} CERT_NONE
 PROTOCOL_TLSv1_1->PROTOCOL_TLS CERT_NONE
ERROR


==
ERROR: test_protocol_sslv23 (test.test_ssl.ThreadedTests)
Connecting to an SSLv23 server with various client options
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 189, in f
return func(*args, **kwargs)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 2402, in test_protocol_sslv23
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 2134, in try_protocol_combo
chatty=False, connectionchatty=False)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 2062, in server_params_test
s.connect((HOST, server.port))
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/ssl.py", 
line 864, in connect
self._real_connect(addr, False)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/ssl.py", 
line 855, in _real_connect
self.do_handshake()
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/ssl.py", 
line 828, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version 
(_ssl.c:727)

==
ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests)
Connecting to a TLSv1.1 server with various client options.
--
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 189, in f
return func(*args, **kwargs)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 2477, in test_protocol_tlsv1_1
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 2134, in try_protocol_combo
chatty=False, connectionchatty=False)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/test/test_ssl.py",
 line 2062, in server_params_test
s.connect((HOST, server.port))
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/ssl.py", 
line 864, in connect
self._real_connect(addr, False)
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/ssl.py", 
line 855, in _real_connect
self.do_handshake()
  File 
"/home/buildbot/buildarea/2.7.cstratak-RHEL8-x86_64.refleak/build/Lib/ssl.py", 
line 828, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version 
(_ssl.c:727)

--
assignee: christian.heimes
components: SSL, Tests
messages: 359634
nosy: christian.heimes, vstinner
priority: normal
severity: normal
status: open
title: test_ssl failed on AMD64 RHEL8 Refleaks 2.7
versions: Python 2.7

___
Python tracker 

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



[issue39264] Fix UserDict.get to account for __missing__

2020-01-08 Thread Bar Harel


New submission from Bar Harel :

Unlike dict, UserDict.__missing__ is called on .get().
After a discussion on the Python-Dev mailing list, mimicking dict's behavior 
was chosen as a solution to the issue.

--
components: Library (Lib)
messages: 359633
nosy: bar.harel
priority: normal
severity: normal
status: open
title: Fix UserDict.get to account for __missing__
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



Re: Coding technique: distinguish using type or abc?

2020-01-08 Thread Rob Gaddi

On 1/8/20 1:40 PM, DL Neil wrote:

Do you prefer to use isinstance() with type() or to refer to collections.abc?


This team producing bases statistical analyses for (lesser capable) user-coders 
to utilise with their own experimental 'control code'; faces situations where a 
list-parameter is often only one element long. As is so often the way, amongst 
the 'clients' there are a couple of strong-minded (am not allowed to call them 
"awkward", or otherwise!) user-coder-analysts, who demand that entry of a 
single-element not require them to surround it with "unnecessary" 
square-brackets. Despite complaining, we realise that this is actually quite a 
good practice, and likely save us (as well as 'them') from interface mistakes.


Such single elements appear in both string and numeric formats, but for 
simplicity (here) let's ignore numerics...


The problem rearing its ugly head, is when the string single-element becomes 
input to a for-loop. If we loop around a list, then each element is handled 
individually (as desired). Whereas if the element is a string, then each 
character is treated as if it were a list-element (not)!



In Code Review, I noticed that two 'solutions' have been coded.

1 using type()s to distinguish:

 def format_as_list( parameter:Union[ str, list ] )->list:
     if isinstance( parameter, str ):
     parameter_list = [ parameter ]
     elif isinstance( parameter, list ):
     parameter_list = parameter
     else:
     raise NotImplementedError
     return parameter_list

2 using abstract base classes from PSL.collections to distinguish:

 import collections.abc as abc
 def is_list_not_string( parameter:Union[ str, list ] ) -> bool:
     return isinstance( parameter, abc.MutableSequence )

 def format_as_list( parameter:str )->list:
     if is_list_not_string( parameter ):
     return parameter
     else:
     return [ parameter, ]

(ignoring implicit assumption/error!)
NB I've simplified the code and attempted to harmonise the varNMs between 
snippets.

With our preference for EAFP, I went looking for a way to utilise an exception 
by way of distinguishing between the input-types - but couldn't see how, without 
major artifice (false/purposeless construct which would confuse the next reader 
of the code). That said, I'm wondering if using (or appearing to use) tuples and 
*args might solve the problem - but will have to dig back through the code-base...



Meantime, faced with such a challenge, would you recommend utilising one of 
these ideas over the other, or perhaps some other solution?


Are there perhaps circumstances where you would use one solution, and others the 
other?




I try to avoid making assumptions, so I wind up with a lot of

if isinstance(parameter, str):
  plist = [parameter]
else:
  try:
plist = list(parameter)
  except TypeError:
plist = [parameter]

Any iterable gets listified unless it's a string, which gets treated the same 
way a non-iterable does.  EAFP.

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


Coding technique: distinguish using type or abc?

2020-01-08 Thread DL Neil via Python-list
Do you prefer to use isinstance() with type() or to refer to 
collections.abc?



This team producing bases statistical analyses for (lesser capable) 
user-coders to utilise with their own experimental 'control code'; faces 
situations where a list-parameter is often only one element long. As is 
so often the way, amongst the 'clients' there are a couple of 
strong-minded (am not allowed to call them "awkward", or otherwise!) 
user-coder-analysts, who demand that entry of a single-element not 
require them to surround it with "unnecessary" square-brackets. Despite 
complaining, we realise that this is actually quite a good practice, and 
likely save us (as well as 'them') from interface mistakes.


Such single elements appear in both string and numeric formats, but for 
simplicity (here) let's ignore numerics...


The problem rearing its ugly head, is when the string single-element 
becomes input to a for-loop. If we loop around a list, then each element 
is handled individually (as desired). Whereas if the element is a 
string, then each character is treated as if it were a list-element (not)!



In Code Review, I noticed that two 'solutions' have been coded.

1 using type()s to distinguish:

def format_as_list( parameter:Union[ str, list ] )->list:
if isinstance( parameter, str ):
parameter_list = [ parameter ]
elif isinstance( parameter, list ):
parameter_list = parameter
else:
raise NotImplementedError
return parameter_list

2 using abstract base classes from PSL.collections to distinguish:

import collections.abc as abc
def is_list_not_string( parameter:Union[ str, list ] ) -> bool:
return isinstance( parameter, abc.MutableSequence )

def format_as_list( parameter:str )->list:
if is_list_not_string( parameter ):
return parameter
else:
return [ parameter, ]

(ignoring implicit assumption/error!)
NB I've simplified the code and attempted to harmonise the varNMs 
between snippets.


With our preference for EAFP, I went looking for a way to utilise an 
exception by way of distinguishing between the input-types - but 
couldn't see how, without major artifice (false/purposeless construct 
which would confuse the next reader of the code). That said, I'm 
wondering if using (or appearing to use) tuples and *args might solve 
the problem - but will have to dig back through the code-base...



Meantime, faced with such a challenge, would you recommend utilising one 
of these ideas over the other, or perhaps some other solution?


Are there perhaps circumstances where you would use one solution, and 
others the other?


--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Barry Scott



> On 8 Jan 2020, at 16:02, Christopher Barker  wrote:
> 
> On Wed, Jan 8, 2020 at 1:49 AM Abdur-Rahmaan Janhangeer  > wrote:
> Have a look at this write up about the horror that is zip file name handling.
> 
> https://marcosc.com/2008/12/zip-files-and-encoding-i-hate-you/ 
> 
> 
> This has been a pain point at work.
> 
> I'm pretty sure this is a non-issue for this use-case. If you need to open 
> sip files created by arbitrary other systems, or create zip files that can be 
> opened by arbitrary other systems, then it's a big mess. But that isn't the 
> case here.

One claim is that because its zip you can use any of the existing tools.
But this encoding issue means that its likely that you have to use zipapp aware 
tools.

Also can we stop cross posting to 2 lists please.

Pick one and keep the thread on it please.

Barry

> 
> -CHB
> 
> 
> -- 
> Christopher Barker, PhD
> 
> Python Language Consulting
>   - Teaching
>   - Scientific Software Development
>   - Desktop GUI and Web Development
>   - wxPython, numpy, scipy, Cython

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


[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2020-01-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> commit 995d9b92979768125ced4da3a56f755bcdf80f6e introduced a regression: 
> bpo-37603: parsetok(): Assertion `(intptr_t)(int)(a - line_start) == (a - 
> line_start)' failed, when running get-pip.py.

Fixed in https://bugs.python.org/issue39209

--
nosy: +pablogsal
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



[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2020-01-08 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +17320
pull_request: https://github.com/python/cpython/pull/17582

___
Python tracker 

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



[issue39263] Windows Installer can't select TargetDir in UI?

2020-01-08 Thread Jameson Nash


Jameson Nash  added the comment:

Yes, I thought it was confusing that button is labeled "choose location and 
features", but it only let me change a few features and not location.

--

___
Python tracker 

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



[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Paul Moore


Paul Moore  added the comment:

For me, I headed straight for "Sharing state between processes" and the "Shared 
memory" object. That's probably because I was reviewing someone else's code, 
rather than writing my own, but nevertheless when coding I do tend to dive 
straight for the section that describes what I want to do, and miss "overview" 
type discussions.

The way the shared memory object is described, it reads that it is just that - 
shared. And so I'd assume that if a shared memory object is in multiple 
processes in a pool, it would be the *same* shared memory region, and the value 
would be accessible from all the processes.

>From there, for me at least, it's easy to proceed to the mistake of thinking 
>that the global initialisation of the x and y variables creates the *same* 
>shared memory objects in each process in the pool. Clearly it doesn't, hence 
>this is "not a bug" but for me it's an easy mistake to make.

Maybe it would be enough just to add a comment to the shared memory object 
documentation that said "every shared memory object is independent - there is 
no way to create a reference to the same shared memory object in multiple 
processes, instead you need to create the object in one process and pass it to 
all of the others". That would probably have made me stop and think long enough 
to not make the mistake I did.

--

___
Python tracker 

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



[issue39263] Windows Installer can't select TargetDir in UI?

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

You may have already had a previous install that was being upgraded. In that 
case, you should uninstall the old one and then install it to a new location 
(or else you may end up with some subtle corruption).

--

___
Python tracker 

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



[issue39263] Windows Installer can't select TargetDir in UI?

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

You could have chosen the "Customize installation" button (see the screenshot 
at https://docs.python.org/3.8/using/windows.html#installation-steps). The 
description says "Choose location and features".

--

___
Python tracker 

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



[issue39263] Windows Installer can't select TargetDir in UI?

2020-01-08 Thread Jameson Nash


New submission from Jameson Nash :

When running the installer on Windows, I wanted to put Python in an easily 
accessible path (C:\Python38 in my case), however, the GUI didn't seem to 
provide any way to change the path (from AppData). And additionally, the 
"install for all users" checkbox seemed to be broken (didn't respond to mouse 
events and remained checked). Running the installer with the argument 
TargetDir=C:\Python38 worked, but I wouldn't have expected to need to hack my 
way to just picking the install directory.

--
components: Installation, Windows
messages: 359627
nosy: Jameson Nash, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows Installer can't select TargetDir in UI?
versions: Python 3.8

___
Python tracker 

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



[issue39251] outdated windows store links in WindowsApps folder

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

For reference, I'm going to wait for protobuf, simplejson and Tornado to 
provide Python 3.8 wheels before switching the default version. Ideally I'd 
like markupsafe to have wheels as well, but they have a fallback so it's okay.

Everything else in the top 100 according to 
https://hugovk.github.io/top-pypi-packages/ is either pure or has Windows 3.8 
wheels already.

--

___
Python tracker 

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



Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Rhodri James

On 08/01/2020 18:08, many people wrote lots of stuff...

Folks, could we pick one list and have the discussion there, rather than 
on both python-list and python-ideas?  Getting *four* copies of Andrew's 
emails is a tad distracting :-)


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


[issue39129] Incorrect import of TimeoutError while creating happy eyeballs connection

2020-01-08 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Sorry, I never got around writing a proper test for this so I am moving it to 
test needed if someone wants to volunteer for it. trio has some test cases for 
their happy eyeball implementation if it helps : 
https://github.com/python-trio/trio/blob/c5497c5ac4f6c457e3390c69cb8b5b62eca41979/trio/tests/test_highlevel_open_tcp_stream.py#L326

--
stage: patch review -> test needed

___
Python tracker 

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



[issue39229] library/functions.rst causes translated builds to fail

2020-01-08 Thread Rafael Fontenelle


Rafael Fontenelle  added the comment:

Hey Julien! I already fixed once, now I fixed them again, but the message 
persists:


make[1]: Entering directory 
'/home/rffontenelle/repos/python-docs-pt-br/venv/workdirs/cpython/Doc'
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=/home/rffontenelle/repos/python-docs-pt-br/venv/workdirs/cpython/Doc/venv/bin:$PATH
 sphinx-build -b html -d build/doctrees  -q --keep-going -jauto   \
-D 
locale_dirs=/home/rffontenelle/repos/python-docs-pt-br/venv/workdirs/locale 
   \
-D language=pt_BR \
-D gettext_compact=0\
-D latex_engine=xelatex \
-D latex_elements.inputenc= \
-D latex_elements.fontenc= -W . build/html 
/home/rffontenelle/repos/python-docs-pt-br/venv/workdirs/cpython/Doc/library/functions.rst::
 WARNING: inconsistent term references in translated message. original: [], 
translated: [':ref:`evento de auditoria `']
make[1]: *** [Makefile:51: build] Error 1
make[1]: Leaving directory 
'/home/rffontenelle/repos/python-docs-pt-br/venv/workdirs/cpython/Doc'

--

___
Python tracker 

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



[issue38623] Python documentation should mention how to find site-packages

2020-01-08 Thread Brett Cannon


Brett Cannon  added the comment:

I think "Python learners deserve to know about "site-packages" and (optionally) 
"dist-packages" " is a bit strong of a statement. I don't think the tutorial 
covers how to install third-party package which is what goes into 
site-packages, so I don't know what benefit they will garner from having that 
covered in the tutorial to teach the basics of Python. In an intermediate 
tutorial I can totally understand the explanation along with using e.g. pip, 
but for a tutorial like this I still think it's unnecessary.

--

___
Python tracker 

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



[issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue35292] Make SimpleHTTPRequestHandler load mimetypes lazily

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:


New changeset 5907e61a8d4da6d0f11bf1062d6d17484560a15e by Steve Dower (An Long) 
in branch 'master':
bpo-35292: Avoid calling mimetypes.init when http.server is imported (GH-17822)
https://github.com/python/cpython/commit/5907e61a8d4da6d0f11bf1062d6d17484560a15e


--

___
Python tracker 

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



[issue39262] Unused error message in _sharedexception_bind

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


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

___
Python tracker 

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



[issue39262] Unused error message in _sharedexception_bind

2020-01-08 Thread Alex Henrie


New submission from Alex Henrie :

The function _sharedexception_bind currently has the following bit of code in 
two places:

if (PyErr_ExceptionMatches(PyExc_MemoryError)) {
failure = "out of memory copying exception type name";
}
failure = "unable to encode and copy exception type name";

The "out of memory" message will never appear because it is immediately 
overwritten with a more generic message.

--
messages: 359620
nosy: alex.henrie
priority: normal
severity: normal
status: open
title: Unused error message in _sharedexception_bind
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue39261] Dead assignment in pyinit_config

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


--
type:  -> performance

___
Python tracker 

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



[issue39261] Dead assignment in pyinit_config

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


--
versions: +Python 3.9

___
Python tracker 

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



[issue39261] Dead assignment in pyinit_config

2020-01-08 Thread Alex Henrie


Change by Alex Henrie :


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

___
Python tracker 

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



[issue39261] Dead assignment in pyinit_config

2020-01-08 Thread Alex Henrie


New submission from Alex Henrie :

The function pyinit_config currently contains the following line:

config = >interp->config;

However, the config variable is not used after that point.

Victor Stinner has confirmed that this assignment is unnecessary: 
https://github.com/python/cpython/pull/16267/files#r364216184

--
messages: 359619
nosy: alex.henrie
priority: normal
severity: normal
status: open
title: Dead assignment in pyinit_config

___
Python tracker 

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



Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Andrew Barnert via Python-list
On Jan 8, 2020, at 01:09, Abdur-Rahmaan Janhangeer  wrote:
> 
> Using the wheel-included zip (A), we can generate another zip file (B) with
> the packages installed. That generated zip file is then executed.

But that generated zip B doesn’t have a trustable hash on it, so how can you 
execute it?

If you keep this all hidden inside the zipapp system, where malicious programs 
can’t find and modify the generated zips, then I suppose that’s fine. But at 
that point, why not just install the wheels inside zip A into an auto-generated 
only-for-zip-A venv cache directory or something, and then just run zip A as-is 
against that venv?

> Zip format A solves the problem of cross-platforming.
> Normal solutions upto now like use solution B where you can't share
> your zips across OSes. 

You can still only share zips across OSs if you bundle in a wheel for each 
extension library for every possible platform. For in-house deployments where 
you only care about two platforms (your dev boxes and your deployment cluster 
boxes), that’s fine, but for a publicly released app that’s supposed to work 
“everywhere”, you pretty much have to download and redistribute every wheel on 
PyPI for every dependency, which could make your app pretty big, and require 
pretty frequent updates, and it still only lets you run on systems that have 
wheels for all your dependencies.

If you’re already doing an effective “install” step in building zip B out of 
zip A, why not make that step just use a requirements file and download the 
dependencies from PyPI? You could still run zip B without being online, just 
not zip A.

Maybe you could optionally include wheels and they’d serve as a micro-repo 
sitting in front of PyPI, so when you’re dependencies are small you can 
distribute a version that works for 95% of your potential users without needing 
to do anything fancy but it still works for the other 5% if they can reach PyPI.

(But maybe it would be simpler to just use the zip B as a cache in the first 
place. If I download Spam.zipapp for Win64 3.9, that’s a popular enough 
platform that you probably have a zip B version ready to go and just ship me 
that, so it works immediately. Now, if I copy that file to my Mac instead of 
downloading it fresh, oops, wrong wheels, so it downloads the right ones off 
PyPI and builds a new zipapp for my platform—and it still runs, it just takes a 
bit longer the first time. I’m not sure this is a good idea, but I’m not sure 
trying to include every wheel for every platform is a good idea either…)

But there’s a bigger problem than just distribution. Some extension modules are 
only extension modules for speed, like numpy. But many are there to interface 
with C libraries. If my app depends on PortAudio, distributing the extension 
module as wheels is easy, but it doesn’t do any good unless you have the C 
library installed and configured on your system. Which you probably don’t if 
you’re on Windows or Mac. A package manager like Homebrew or Choco can take 
care of that by just making my app’s package depend on the PortAudio package 
(and maybe even conda can?), but I don’t see how zipapps with wheels in, or 
anything else self-contained, can. And if most such packages eventually migrate 
to binding from Python (using cffi or ctypes) rather than from C (using an 
extension module), that actually makes your problem harder rather than easier, 
because now you can’t even tell from outside the code that there are external 
dependencies; you can distribute a single zipapp that works everywhere, but 
only in the sense that it starts running and quickly fails with an exception 
for most users.


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


[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Eryk Sun


Eryk Sun  added the comment:

> Agreed it's not a bug, but I will say it took me a while to work out 
> *why* it's not a bug (namely, that even though the OP is using shared 
> memory values, the code relies on fork semantics to share the two 
> Value objects that *reference* the shared memory).

The programming guidelines cover this under "explicitly pass resources to child 
processes" and "the spawn and forkserver start methods". Even for scripts that 
will only ever use the fork start method, it explains why inheriting globals 
may be a problem due to garbage collection in the parent. What can be done to 
make the advice there more visible and easily understood?

I'd guess that, even though it took you a while to spot the problem, you 
wouldn't make the same mistake if writing this from scratch -- assuming you've 
read and understood the programming guidelines. There's nothing about an 
arbitrary Value instance that would allow a spawned child process to map it to 
the shared memory of a Value in the parent process. That information has to be 
pickled and sent to the child.

--

___
Python tracker 

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



[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin


Thomas Passin  added the comment:

That's so, and with a bit more complexity might be worth doing.  At least, it 
would be good to have *some* means to find more the the executable files one 
would expect to find.

--

___
Python tracker 

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



[issue39237] Redundant call to round in delta_new

2020-01-08 Thread Alex Henrie


Alex Henrie  added the comment:

Thank you!

--

___
Python tracker 

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



Re: PyInstaller needs Funding by your Company

2020-01-08 Thread songbird
Christian Gollwitzer wrote:
> Am 07.01.20 um 15:09 schrieb Hartmut Goebel:
>> Maintianing PyInstaller at a proper level requires about 4 to 5 days per
>> month. Which means about 4,000 to 5,000 € per month and about 50,000 to
>> 60,000 € per year.
>
> these numbers sound odd to me. 4000€ - 5000€ per month or equivalently 
> 60,000€ per year is the level of academic full-time jobs in Germany, 
> i.e. that would be 4-5 days per week, not per month.

  it is the demand of a volunteer to be paid.

  if people want to pay him that's their business, but
i think a larger company may just instead fork their
own copy or fund an internal developer to track this
project IF it is that important to them.

  he may resign or limit his participation in the future
as with any other volunteer effort.

  it is GPL code.


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


Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Andrew Barnert via Python-list
On Jan 8, 2020, at 01:09, Abdur-Rahmaan Janhangeer  wrote:
> 
> But now, a malicious program might try to modify the info file
> and modify the hash. One way to protect even the metadata is
> to hash the entire content
> 
> folder/
> file.py # we can add those in a folder if needed
> __main__.py
>infofile
> 
> Then after zipping it, we hash the zipfile then append the hash to the zip 
> binary
> 
> [zipfile binary][hash value]

How does this solve the problem? A malicious program that could modify the hash 
inside the info file could even more easily modify the hash at the end of the 
zip.

Existing systems deal with this by recognizing that you can’t prevent anyone 
from hashing anything they want, so you either have to store the hashes in a 
trusted central repo, or (more commonly–there are multiple advantages) sign 
them with a trustable key. If a malicious app modified the program and modified 
the hash, it’s going to be a valid hash; there’s nothing you can do about that. 
But it won’t be the hash in the repo, or it’ll be signed by the untrusted 
author of the malicious program rather than the trusted author of the app, and 
that’s why you don’t let it run. And this works just as well for hashes 
embedded inside an info file inside the zip as for hashes appended to the zip.

And there are advantages to putting the hash inside. For example, if you want 
to allow downstream packagers or automated systems to add distribution info 
(this is important if you want to be able to pass a second code signing 
requirement, e.g., Apple’s, as well as the zipapp one), you just have a list of 
escape patterns that say which files are allowed to be unhashed. Anything that 
appears in the info file must match its hash or the archive is invalid. 
Anything that doesn’t appear in the info file but does match the escape 
patterns is fine, but if it doesn’t match the escape patterns, the archive is 
invalid. So now downstream distributors can add extra files that match the 
escape patterns. (The escape patterns can be configurable—you just need them to 
be specified by something inside the hash. But you definitely want a default 
that works 99% of the time, because if developers and packagers have to think 
it through in every case instead of only in exceptional cases, they’re going to 
get it wrong, and nobody will have any idea who to trust to get it right.)


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


[issue39253] Running the test suite with --junit-xml and -R incorrectly reports refleaks

2020-01-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>  But I suggest to raise an error and tune the buildbot configuration to not 
> use it, rather than silently ignore the option.

I already configured the buildbots to not use --junit when running with =R

--

___
Python tracker 

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



[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Eryk Sun


Eryk Sun  added the comment:

> In that the best tactic would be to look in those top-level 
> directories for a directory with the same name as the executable.

It may be a common pattern, but such a guess is not reliable. The needed 
executable may be in an unrelated directory at an arbitrary depth in the tree. 

There are reliable ways to find an executable in Windows other than searching 
PATH -- assuming the application wants to be found in a reliable way. For 
example, we can use winreg to search the subkey names of 
"[HKCU|HKLM]\Software\Microsoft\Windows\CurrentVersion\App Paths" for the given 
executable name (e.g. "notepad++.exe"). The default value of each subkey is the 
fully-qualified path of the executable.

--
nosy: +eryksun

___
Python tracker 

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



[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Paul Moore


Paul Moore  added the comment:

Agreed it's not a bug, but I will say it took me a while to work out *why* it's 
not a bug (namely, that even though the OP is using shared memory values, the 
code relies on fork semantics to share the two Value objects that *reference* 
the shared memory).

It would be worth adding a note to the documentation on shared memory values at 
https://docs.python.org/3.8/library/multiprocessing.html#sharing-state-between-processes
 to make it clearer that it's the user's responsibility to make sure the Value 
object is passed to every subprocess that wants to interact with it.

--

___
Python tracker 

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



[issue39253] Running the test suite with --junit-xml and -R incorrectly reports refleaks

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

FYI test_io is skipped in Python 2.7 when using -R, because test_io is not 
reliable. Extract of Lib/test/test_io.py:

if huntrleaks:
# FIXME: bpo-31731: test_io hangs with --huntrleaks
print("Warning: bpo-31731: test_io hangs with --huntrleaks: "
  "exclude the test")
nottests.add('test_io')

I'm not shocked by disabling JUnit feature when using -R. But I suggest to 
raise an error and tune the buildbot configuration to not use it, rather than 
silently ignore the option.

--

___
Python tracker 

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



[issue39253] Running the test suite with --junit-xml and -R incorrectly reports refleaks

2020-01-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> We can stop using --junit-xml if we want. GitHub Actions doesn't support 
> displaying test results anyway, so once Azure Pipelines is switched off we'll 
> just be reading the console all the time anyway (unless Buildbot has a way of 
> rendering test results that I haven't noticed?)


We are using --junit-xml on the buildbots to analyze failures and in the future 
we can use it to better display the summary, as is more reliable than parsing 
the longs.

> I guess keeping those objects around looks like a leak?

Yeah, because it seems that we collect those objects in the innermost runner, 
while the refleak runner runs the whole "test suite" (the test file, like 
test_list.py) as one unit.

To be honest, the easiest fix here maybe is just deactivating the --junit and 
make a warning as in bpo-27103

--

___
Python tracker 

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



[issue39253] Running the test suite with --junit-xml and -R incorrectly reports refleaks

2020-01-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> deactivating the --junit

I mean deactivating the --junit *if* is used together with -R

--

___
Python tracker 

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



[issue39255] Windows and Unix run-time differences

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

Agreed it's not a bug.

The best we could do is display a warning that fork is not portable (won't work 
on macOS anymore either, IIRC) and you should at least verify that spawn 
behaves the same.

--

___
Python tracker 

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



[issue39253] Running the test suite with --junit-xml and -R incorrectly reports refleaks

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

My guess would be that the reference tracking needs some kind of awareness for 
logging results. The results are collected as regular Python objects and 
formatted later, as we need to calculate totals before writing the XML file.

I guess keeping those objects around looks like a leak?

--

___
Python tracker 

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



[issue39243] CDLL __init__ no longer supports name being passed as None when the handle is not None

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

> I think it would be cleaner to split out the platform-specific work into a 
> separate _load_library method

SGTM

--

___
Python tracker 

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



[issue39253] Running the test suite with --junit-xml and -R incorrectly reports refleaks

2020-01-08 Thread Steve Dower


Steve Dower  added the comment:

We can stop using --junit-xml if we want. GitHub Actions doesn't support 
displaying test results anyway, so once Azure Pipelines is switched off we'll 
just be reading the console all the time anyway (unless Buildbot has a way of 
rendering test results that I haven't noticed?)

--

___
Python tracker 

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



[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin


Thomas Passin  added the comment:

Well, yes, I realize that I could add the directories.  But random users of 
find_executible may not realize that.

Actually, it's probably a bit more complex than just adding the top-level 
directories %ProgramFiles% and %ProgramFiles(x86)%, because  find_executable 
probably doesn't do a recursive search.  In that the best tactic would be to 
look in those top-level directories for a directory with the same name as the 
executable.  If one is found, then look in it for the actual file.

For example, on my computer, inkscape.exe is at %ProgramFiles%\Inkscape
inkscape.exe, and that pattern is very common.

This tactic would find many of the otherwise unfound executables, and still 
execute quickly.

--

___
Python tracker 

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



[issue28002] ast.unparse can't roundtrip some f-strings

2020-01-08 Thread Batuhan


Change by Batuhan :


--
components: +Library (Lib) -Demos and Tools
title: Some f-strings do not round trip through Tools/parser/test_unparse.py -> 
ast.unparse can't roundtrip some f-strings
versions: +Python 3.9 -Python 3.7, Python 3.8

___
Python tracker 

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



[issue28002] Some f-strings do not round trip through Tools/parser/test_unparse.py

2020-01-08 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya

___
Python tracker 

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



Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Christopher Barker
On Wed, Jan 8, 2020 at 1:24 AM Abdur-Rahmaan Janhangeer <
arj.pyt...@gmail.com> wrote:

> But a thought on that -- you may be able to accomplish something similar
>> with conda, "conda constructor", and "conda run". -- or a new tool built
>> from those. The idea is that the first time you ran your "app", it would
>> install its dependencies, and then use them in an isolated environment. But
>> if the multiple apps had the same dependencies, they would share them, so
>> you wouldn't get major bloat on the host machine.
>>
>
> I guess it's time to dig more into anaconda, been
> putting it off, will do.
>

to be clear -- you want to look at "conda", not "Anaconda" -- conda is a
package manager, Anaconda is a distribution created with the conda package
manager.


> but a wheel is just as big as the installed package (at least a zipped
>> version) -- it's essentially the package compressed into a tarball.
>>
>
> I really hope C extentions would become redundent someday
> in Python, which would make Python development real
> Python dev.
>

That's not going to completely happen. Which does not mean that a solution
that doesn't support them isn't still useful for a lot. But it would be
interesting to see how many commonly used packages on PyPi rely on C
extensions (other than the SciPy Stack).


> But: "Unlike “conventional” zipapps, shiv packs a site-packages style
>> directory of your tool’s dependencies into the resulting binary, and then
>> at bootstrap time extracts it into a ~/.shiv cache directory."
>>
>
> Maybe we can have a PYZ directory where the
> packages for each app are extracted then it's not
> a global dump but more specific
>

I'm not sure how that differs from a .shiv directory, which is not global.
But a way to share packages in the "central place for packages" would be
nice. -- maybe how conda does it with hard links?

-CHB


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-08 Thread Dong-hee Na


Dong-hee Na  added the comment:

Sure, I will submit the PR by tomorrow :)

--

___
Python tracker 

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



Re: [Python-ideas] Re: Enhancing Zipapp

2020-01-08 Thread Christopher Barker
On Wed, Jan 8, 2020 at 1:49 AM Abdur-Rahmaan Janhangeer <
arj.pyt...@gmail.com> wrote:

> Have a look at this write up about the horror that is zip file name
>> handling.
>>
>> https://marcosc.com/2008/12/zip-files-and-encoding-i-hate-you/
>>
>> This has been a pain point at work.
>>
>
I'm pretty sure this is a non-issue for this use-case. If you need to open
sip files created by arbitrary other systems, or create zip files that can
be opened by arbitrary other systems, then it's a big mess. But that isn't
the case here.

-CHB


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue39260] find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

find_executable() rely on the PATH environment variable:

def find_executable(executable, path=None):
"""Tries to find 'executable' in the directories listed in 'path'.

A string listing directories separated by 'os.pathsep'; defaults to
os.environ['PATH'].  Returns the complete filename or None if not found.
"""

You may add manually %ProgramFiles% and %ProgramFiles(x86)% to your PATH if 
they aren't already there.

--
nosy: +vstinner

___
Python tracker 

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



[issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread STINNER Victor


Change by STINNER Victor :


--
title: find_executable() Fails To Find Many Executables on Windows -> 
distutils.spawn: find_executable() Fails To Find Many Executables on Windows

___
Python tracker 

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



[issue39260] find_executable() Fails To Find Many Executables on Windows

2020-01-08 Thread Thomas Passin


New submission from Thomas Passin :

On Windows, find_executable() in distutils.spawn may fail to find executables 
that it ought to.  This is because the PATH environmental variable no longer 
includes %ProgramFiles% and %ProgramFiles(x86)%.  At least, that is the case on 
my brand new Windows 10 Computer running Windows 10 Pro.  In the past, I'm 
fairly sure these directories were always included on the PATH.

Some programs add their install directory to the Windows PATH, but many don't.  
For example, on my new computer, Pandoc added itself to the PATH but EditPlus 
and Notepad++ did not.  So

>>> find_executable('pandoc')
'C:\\Program Files\\Pandoc\\pandoc.exe'
but
>>> find_executable('editplus')   # no result
>>> find_executable('notepad++')  # no result

I suggest that in Windows, find_executable() should check for and add the 
%ProgramFiles% and %ProgramFiles(x86)% directories to the system PATH before 
executing its search.

--
components: Distutils
messages: 359602
nosy: dstufft, eric.araujo, tbpassin
priority: normal
severity: normal
status: open
title: find_executable() Fails To Find Many Executables on Windows
versions: Python 3.8

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread miss-islington


miss-islington  added the comment:


New changeset b24e4fac03409c4f845758d7ed884c5a99368493 by Miss Islington (bot) 
in branch '3.8':
bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903)
https://github.com/python/cpython/commit/b24e4fac03409c4f845758d7ed884c5a99368493


--

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread miss-islington


miss-islington  added the comment:


New changeset 00ac28ac4d06a311fc2386ef921b2603735ffae6 by Miss Islington (bot) 
in branch '3.7':
bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903)
https://github.com/python/cpython/commit/00ac28ac4d06a311fc2386ef921b2603735ffae6


--
nosy: +miss-islington

___
Python tracker 

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



[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

I agree, I was the one who suggest to reject timeout=0 when you added the 
parameter to imaplib :-)

Do you want to work on a PR?

--

___
Python tracker 

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



[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0 (non-blocking mode)

2020-01-08 Thread STINNER Victor


Change by STINNER Victor :


--
title: poplib.POP3/POP3_SSL should reject timeout = 0 -> poplib.POP3/POP3_SSL 
should reject timeout = 0 (non-blocking mode)

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Dong-hee Na for the update. The fix landed in master, backports to 3.7 
and 3.8 will automatically follow once the CI test will pas.

--
components: +Library (Lib), Tests
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2e6a8efa837410327b593dc83c57492253b1201e by Victor Stinner 
(Dong-hee Na) in branch 'master':
bpo-39242: Updated the Gmane domain into news.gmane.io (GH-17903)
https://github.com/python/cpython/commit/2e6a8efa837410327b593dc83c57492253b1201e


--

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17316
pull_request: https://github.com/python/cpython/pull/17904

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17317
pull_request: https://github.com/python/cpython/pull/17905

___
Python tracker 

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



[issue39259] poplib.POP3/POP3_SSL should reject timeout = 0

2020-01-08 Thread Dong-hee Na


New submission from Dong-hee Na :

Since poplib.POP3/POP3_SSL's implementation depends on socket.makefile, the 
client should reject if the timeout is zero.
Because socket.makefile said that 'The socket must be in blocking mode' and if 
we set timeout to zero, the client does not operate as normal.

--
components: Library (Lib)
messages: 359596
nosy: corona10, vstinner
priority: normal
severity: normal
status: open
title: poplib.POP3/POP3_SSL should reject timeout = 0
versions: Python 3.9

___
Python tracker 

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



[issue39242] Update news.gmane.org to news.gmane.io

2020-01-08 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue34033] distutils is not reproducible

2020-01-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

> There is also one aspect where i586 builds end up with different .pyc files 
> than x86_64 builds. And then we randomly chose one of them for our "noarch" 
> python module packages and hope they work everywhere (including on arm and 
> s390 architectures).

They are functionally identical, despite not being bit-by-bit identical.
If they do not work everywhere, it's a very serious bug.

> So is someone working towards a concept that makes it is possible to create 
> the same .pyc files anywhere?

No, it's a known issue no one is working on.

> Can I help something there?

Maybe?
The two main culprits are in the marshal serialization algorithm:  
https://github.com/python/cpython/blob/master/Python/marshal.c
Specifically:
- a heuristic depends on refcount (i.e. state of objects in the entire 
interpreter, rather than just relationships between serialized objects): 
https://github.com/python/cpython/blob/33b671e72450bf4b5a946ce0dde6b7fe21150108/Python/marshal.c#L304
- (frozen)sets are serialized in iteration order, which is unpredictable (and 
determinig a predictable order is not trivial): 
https://github.com/python/cpython/blob/33b671e72450bf4b5a946ce0dde6b7fe21150108/Python/marshal.c#L498

A solution will probably come with an unacceptable performance hit -- it's good 
to keep generating the .pyc files fast. Two options to overcome that come to 
mind:
- make reproducibility optional (which would make the testing more cumbersome)
- make an add-on tool to re-serialize an existing .pyc.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-01-08 Thread Alan Robertson


Alan Robertson  added the comment:

There are a variety of different reasons this can fail, not just on MacOS. You 
could give it a bad IP address of a server, etc. [That was my particular case].

The constructor should create an attribute 'socket' and initialize it to None 
early on. Then, the close function in logging/handlers.py should check for 
None. Or alternatively, it shouldn't register the object with atexit until it's 
been constructed "well-enough".

--
nosy: +alanr

___
Python tracker 

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



[issue24554] GC should happen when a subinterpreter is destroyed

2020-01-08 Thread STINNER Victor


STINNER Victor  added the comment:

Py_EndInterpreter() now calls gc.collect() at least twice: at the end of 
_PyImport_Cleanup() and in finalize_interp_clear(). I now consider the issue as 
fixed and so I close it.

The issue that I described in my previous comment can be enhanced/fixed later.

--
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.5, Python 3.6

___
Python tracker 

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



[issue6531] atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters.

2020-01-08 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed

___
Python tracker 

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



  1   2   >