[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

fwiw, no need to remove that message.  We'll want to make the docs clear that 
this does not apply to Windows.  :)

--

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-01-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Is the lack of this documentation causing some confusion somewhere? This isn't 
rhetorical, I'm genuinely curious what problem you're trying to solve.

Is there any mainstream programming language where the basics of what you've 
laid out aren't true? It all seems pretty obvious to me. For example, I can't 
see anyone looking at this and saying "Ah, base 10. That's why it's producing 
the output I'm seeing."

--
nosy: +eric.smith

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thank you to all who participated in this discussion and review :)

--

___
Python tracker 

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



[issue18842] Add float.is_finite is_nan is_infinite to match Decimal methods

2020-01-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

rm-finite.patch was applied by bpo-39415.

> Once that's merged, let's close this issue as rejected.

I close this issue to a rejected state as discussed above.
Thank you to all who participated in this discussion.

--
nosy: +corona10
resolution:  -> rejected
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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread miss-islington


miss-islington  added the comment:


New changeset a755410e054e1e2390de5830befc08fe80706c66 by Miss Islington (bot) 
in branch '3.8':
closes bpo-39415: Remove unused codes from longobject.c complexobject.c 
floatobject.c. (GH-18105)
https://github.com/python/cpython/commit/a755410e054e1e2390de5830befc08fe80706c66


--
nosy: +miss-islington

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Eryk Sun


Eryk Sun  added the comment:

> Python can safely removes the string to _putenv() just after the call? 

Windows ucrt copies the buffer that's passed to _[w]putenv. This makes it 
non-compliant with POSIX but easier to use in this case. Here's an example 
using ctypes:

>>> ucrt = ctypes.CDLL('ucrtbase')
>>> buf = ctypes.create_unicode_buffer('spam=eggs')
>>> ucrt._wputenv(buf)
0

Directly modifying the buffer has no effect on the _wgetenv result:

>>> buf[5] = 'a'
>>> ucrt._wgetenv.restype = ctypes.POINTER(ctypes.c_wchar)
>>> ucrt._wgetenv('spam')[:4]
'eggs'

Linux putenv complies with POSIX, so changing "eggs" to "aggs" in the buffer 
does affect the getenv result in Linux. 

On the other hand, ucrt's [_w]getenv does not copy the environment string. For 
example:

>>> p1 = ucrt._wgetenv('spam')
>>> p1[0] = 'o'

>>> p2 = ucrt._wgetenv('spam')
>>> p2[:4]
'oggs'

[_w]getenv is not thread safe. Even though all calls that access the ucrt 
environment are internally synchronized on a common lock, accessing the 
*result* from [_w]getenv still needs to be synchronized with concurrent 
_[w]putenv calls in a multithreaded process. Better still, use [_w]getenv_s or 
_[w]dupenv_s, which returns a copy.

> There is also _wputenv_s which affects _spawn, _exec and system.

The documentation is perhaps misleading. When a variable is set with 
_[w]putenv[_s], it also sets the variable in the process environment block to 
stay in sync. This indirectly affects _spawn*, _exec* and system(). 
common_spawnv (in ucrt\exec\spawnv.cpp), which implements the latter functions, 
calls CreateProcess with lpEnvironment as NULL (i.e.  inherit the current 
process environment), unless the caller passes a new environment (e.g. envp of 
spawnve).

--

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17500
pull_request: https://github.com/python/cpython/pull/18113

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 0d5eac8c327251f8edde5261cee43975d81311f6 by Benjamin Peterson 
(Dong-hee Na) in branch 'master':
closes bpo-39415: Remove unused codes from longobject.c complexobject.c 
floatobject.c. (GH-18105)
https://github.com/python/cpython/commit/0d5eac8c327251f8edde5261cee43975d81311f6


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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17499
pull_request: https://github.com/python/cpython/pull/18112

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-01-21 Thread Karl O. Pinc


Change by Karl O. Pinc :


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

___
Python tracker 

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



[issue39408] Add support for SQLCipher

2020-01-21 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

It might help if you show the change you actually propose.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue39416] Document default numeric string formats

2020-01-21 Thread Karl O. Pinc


New submission from Karl O. Pinc :

Seems sane to put _some_ restrictions on the string representations of the 
Numeric classes.  This would be a change to the Python language
specification.

Suggestions made in a pull request.

See the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-...@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/

--
assignee: docs@python
components: Documentation
messages: 360442
nosy: docs@python, kop
priority: normal
severity: normal
status: open
title: Document default numeric string formats

___
Python tracker 

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



[issue18819] tarfile fills devmajor and devminor fields even for non-devices

2020-01-21 Thread Ethan Furman


Ethan Furman  added the comment:

Thanks for moving this issue forward, William!

--
assignee:  -> ethan.furman
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



[issue39411] pyclbr rewrite using AST

2020-01-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Nice.  A few notes.

Docs: The initial doc paragraph now has 'module browser' rather than 'class 
browser'.  The change is needed 2 other places.  Could be part of this PR or 
another one.
* Chapter title: "Python class browser support".  The only instance of 'class 
browser' in the chapter.
* Module index: "Supports information extraction for a Python class browser."

Possible API changes based on IDLE module browser experience:

1. IDLE filters out the import nodes.  It would be nicer to not have to delete 
them by passing something like 'imports=False' (with True being the default for 
back compatibility).

2. With nested classes and functions added, the returned object is almost a 
tree of nodes, except that what should be the top 'Module' node is instead what 
should be its children dict.  This un-uniformity gets in the way of recursively 
processing the tree.

3. If there were a function that returned a Module node with its path and name, 
the same could be removed from all children except for new ImpClass nodes 
representing imported classes when imports=True.  Since users know the module 
passed to pyclbr, this might be true even without Module nodes.

4. If a user immediately inserts nodes into a tree widget, then the user may 
only need a iterator of minimal nodes (name, parent, startline).  This is 
enough when using tkinter.ttk.Treeview.   I have thought of doing this for IDLE 
by either simplifying a copy of the pyclbr code or traversing the AST, as the 
PR here does.  This would let top-level items appear in the widget as they are 
scanned instead of waiting until scanning is complete.

--
nosy: +terry.reedy
title: pyclbr rewrite on AST -> pyclbr rewrite using AST

___
Python tracker 

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



[issue39375] Document os.environ[x] = y and os.putenv() as thread unsafe

2020-01-21 Thread Eryk Sun


Change by Eryk Sun :


--
Removed message: https://bugs.python.org/msg360245

___
Python tracker 

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



[issue31405] shutil.which doesn't find files without PATHEXT extension on Windows

2020-01-21 Thread Anthony Sottile


Anthony Sottile  added the comment:

should I open a new issue for this, or is this an appropriate task to add to 
this discussion

shutil.which also doesn't apply `PATHEXT` when the path contains a directory 
separator

C:\Users\IEUser\astpretty>venv\Scripts\python --version
Python 3.7.5

C:\Users\IEUser\astpretty>venv\Scripts\python -c "import shutil; 
print(repr(shutil.which(r'venv\Scripts\python')))"
None

C:\Users\IEUser\astpretty>venv\Scripts\python -c "import shutil; 
print(repr(shutil.which(r'venv\Scripts\python.exe')))"
'venv\\Scripts\\python.exe'

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue39408] Add support for SQLCipher

2020-01-21 Thread Sebastian Noack


Sebastian Noack  added the comment:

Yes, I could use LD_LIBRARY_PATH (after copying /usr/lib/libsqlcipher.so.0 to 
/some/folder/libsqlite3.so), or alternatively LD_PRELOAD, and the sqlite3 
stdlib module will just work as-is with SQLCipher. The latter is in fact what 
I'm doing at the moment, but this is quite a hack, and it's not portable to 
macOS or Windows.

Alternatively, I could fork the sqlite3 stdlib module, have it built against 
SQLCipher, and redistribute it. But I'd rather not go there.

That's why I'd love to see built-in support for SQLCipher in upstream Python, 
and as it is a drop-in replacement for SQLite3 which the stdlib already comes 
with bindings for, it seems to be a fairly small change on your end.

--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +vstinner

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

Yes, thanks. Whoever got bit by this is either getting an exception or not the 
intended behavior (due to failed string comparison). I doubt anybody is relying 
on the new type checking since it's not documented. If they are, they are 
probably just doing:

def callback(name, names):
if not isinstance(name, str):  # bugfix 3.8
name = name.name
...

--

___
Python tracker 

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2020-01-21 Thread Peter Donis


Peter Donis  added the comment:

Pinging as a reminder that there is a pull request for this issue awaiting 
review.

--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Manuel Barkhau


Manuel Barkhau  added the comment:

Unless somebody else wants to, I could have a go at an PR to update shutil.py

--

___
Python tracker 

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



[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2020-01-21 Thread Miro Hrončok

Miro Hrončok  added the comment:

I know that raising a DeprecationWarning here is most likely not possible or 
too black-magical to do. My intention was not to be harsh, sorry about that. I 
just wanted to point out that a backwards incompatible behavior like this 
without a (possible) deprecation warning might not counterweigh the gain of 
raising the logical exception type. As a compromise, I proposed to raise a 
hybrid that inherits from both.

--

___
Python tracker 

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



[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2020-01-21 Thread Brett Cannon


Brett Cannon  added the comment:

There's no deprecation warning because how do you warn about that? You raise 
DeprecationWarning about an exception you have yet to raise?

And I personally think calling this unfair is a bit harsh.

--

___
Python tracker 

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



[issue39408] Add support for SQLCipher

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

If SQLCipher is a drop-in replacement, perhaps the simplest way is to use 
LD_LIBRARY_PATH to replace libsqlite3.

You can also insert a path to your build of the _sqlite module in sys.path 
before standard paths.

--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

> Should not copytree convert arguments of the ignore callback to str and list 
> correspondingly?

It should. I think it makes sense to just do this for Python 3.8.2 instead of 
updating the doc.

--

___
Python tracker 

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



[issue39408] Add support for SQLCipher

2020-01-21 Thread Sebastian Noack


Sebastian Noack  added the comment:

Well, the stdlib already depends on a third-party library here, i.e. SQLite3. 
SQLCipher is a drop-in replacement for SQLite3 that adds support for encrypted 
databases. In order to use SQLCipher, I'd have to build the sqlite3 module 
against SQLCipher (instead of SQLite3). As it's a drop-in replacement, no 
further changes are required (unless rather than having SQLCipher bindings 
exposed as a separate module, we want enable it through an argument in 
sqlite3.connect).

--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue39353] Deprecate the binhex module, binhex4 and hexbin4 standards

2020-01-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I agree with deprecating binhex.

--

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue37909] Thread pool return ref hold memory

2020-01-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The latest example releases allocated python objects.
The memory is returned to allocator which, in turn, can hold it for a while. 
The allocator is not controlled by Python API.

Anyway, if an explicit executor solves your needs -- please just use it.

--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-21 Thread Manuel Barkhau


Manuel Barkhau  added the comment:

Is there anything I can do to help move this forward?

--

___
Python tracker 

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



[issue39409] AIX: FAIL: test_specific_values (test.test_cmath.CMathTests)

2020-01-21 Thread Mark Dickinson


Mark Dickinson  added the comment:

Similar previous issues on macOS: #18513, #15477.

--

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

A patch was proposed in issue18842.

--
nosy: +martin.panter, serhiy.storchaka

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why posix_putenv_garbage was renamed to putenv_dict?

--

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17497
pull_request: https://github.com/python/cpython/pull/18108

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

PR 18107 still fix this issue (add os.unsetenv() to Python 3.9 on Windows), but 
fix the implementation (use _wputenv() rather than SetEnvironmentVariableW(), 
to update the CRT).

--

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17496
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/18107

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There is also _wputenv_s which affects _spawn, _exec and system.

--

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 623ed6171eae35af7fd2e804dfd9c832c05c5d48 by Victor Stinner in 
branch 'master':
bpo-39406: Add PY_PUTENV_DICT macro to posixmodule.c (GH-18106)
https://github.com/python/cpython/commit/623ed6171eae35af7fd2e804dfd9c832c05c5d48


--

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

I checked the doc: _putenv("VAR=") removes the environment variable "VAR". It's 
well documented:

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv-wputenv?view=vs-2019

"You can remove a variable from the environment by specifying an empty 
value_string, or in other words, by specifying only varname=."

So Python 3.8 os._unsetenv() is correct, but this function was not exposed, and 
so this issue remains relevant: Python 3.8 documents that os.unsetenv() is 
available on Windows, but it's not.

--

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-39413 "Implement os.unsetenv() on Windows" to prepare work on 
this issue. But Eryk raised the same concern about CRT: 
https://bugs.python.org/issue39413#msg360404

I wasn't aware of that :-/

> `_wputenv` keeps Python's copy of the environment block in sync with CRT's 
> copy, which in turn calls `SetEnvironmentVariableW` to sync with process 
> environment block. The CRT's copy of the environment excludes and disallows 
> variable names that start with "=". Because the interpreter initializes 
> `os.environ` from the CRT environment, Python has never included or allowed 
> 'hidden' variables such as "=C:". 

My main motivation to use SetEnvironmentVariableW() on Windows is to avoid 
bpo-39395. Do you mean that Windows _putenv() is not affected by bpo-39395: 
Python can safely removes the string to _putenv() just after the call?

--

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> This bypasses the CRT's copy of the environment. If any C code calls 
> [_w]getenv, it will still see the variable defined. The only way it won't is 
> if setting the value also bypassed the CRT environment by directly calling 
> SetEnvironmentVariableW.

Oh. That's a valid concern. I reopen the issue.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17495
pull_request: https://github.com/python/cpython/pull/18106

___
Python tracker 

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



[issue38076] Make struct module PEP-384 compatible

2020-01-21 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

> I'm concerned by release blocker because 3.9.0a3 version is supposed to be 
> released soon, and usually release blocker do block a release :-)

Ah! That makes sense!

In any case, feel free to ping me if you need help on my side to get this PR 
through (or to remove the release blocker).

--

___
Python tracker 

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



[issue38076] Make struct module PEP-384 compatible

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> That should close this issue, no need to work around the bug priority.

I'm concerned by release blocker because 3.9.0a3 version is supposed to be 
released soon, and usually release blocker do block a release :-)

--

___
Python tracker 

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



[issue38076] Make struct module PEP-384 compatible

2020-01-21 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

The PR that I sent out already fixes the issue. @vstinner, @pablogsal, please 
take a look again https://github.com/python/cpython/pull/18039

That should close this issue, no need to work around the bug priority.

--

___
Python tracker 

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



[issue38076] Make struct module PEP-384 compatible

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> The error can still happened in other modules and under similar conditions, 
> no?

The question was if the next 3.9 *alpha* release must be blocked by this issue. 
I don't think so. I reduce the priority to normal (not set). If someone 
disagrees, feel free to raise it again to release blocker ;-)

--
priority: release blocker -> 

___
Python tracker 

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



[issue38076] Make struct module PEP-384 compatible

2020-01-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Is it enough to reduce the issue priority from release blocker to normal?

The error can still happened in other modules and under similar conditions, no?

--

___
Python tracker 

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



[issue38076] Make struct module PEP-384 compatible

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> https://github.com/python/cpython/pull/18038 is a partial fix for this

Is it enough to reduce the issue priority from release blocker to normal?

--

___
Python tracker 

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



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Windows, asyncio
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue38856] asyncio ProactorEventLoop: wait_closed() can raise ConnectionResetError

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
title: wait_closed() can raise ConnectionResetError -> asyncio 
ProactorEventLoop: wait_closed() can raise ConnectionResetError

___
Python tracker 

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



[issue39414] Multiprocessing resolving object as None

2020-01-21 Thread Reece Dunham


Reece Dunham  added the comment:

Not sure exactly where its being thrown, but I know it happened in 
https://cirrus-ci.com/task/4875001270632448?command=test_pyside2#L3974

--

___
Python tracker 

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



[issue38856] wait_closed() can raise ConnectionResetError

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

Why is this issue marked as a release blocker? Is it a Python 3.8 regression, 
or just a regular bug?

--
nosy: +vstinner

___
Python tracker 

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



[issue39145] Innocuous parent class changes multiple inheritance MRO

2020-01-21 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests:  -17493

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Dong-hee Na


Change by Dong-hee Na :


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

___
Python tracker 

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



[issue39145] Innocuous parent class changes multiple inheritance MRO

2020-01-21 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +17493
pull_request: https://github.com/python/cpython/pull/18105

___
Python tracker 

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



[issue39414] Multiprocessing resolving object as None

2020-01-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

If you don't mind, Would you like to attach the reproducible script for this?

--
nosy: +corona10

___
Python tracker 

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



[issue39415] Remove unused code from longobject.c complexobject.c floatobject.c

2020-01-21 Thread Dong-hee Na


New submission from Dong-hee Na :

For example, long_is_finite has not been used for 12 years.

--
assignee: corona10
messages: 360408
nosy: corona10
priority: normal
severity: normal
status: open
title: Remove unused code from longobject.c complexobject.c floatobject.c

___
Python tracker 

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



[issue39414] Multiprocessing resolving object as None

2020-01-21 Thread Reece Dunham


Change by Reece Dunham :


--
type:  -> behavior

___
Python tracker 

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



[issue39414] Multiprocessing resolving object as None

2020-01-21 Thread Reece Dunham


New submission from Reece Dunham :

Exception ignored in: 
Traceback (most recent call last):
  File "/root/conda/lib/python3.8/multiprocessing/pool.py", line 268, in __del__
  File "/root/conda/lib/python3.8/multiprocessing/queues.py", line 362, in put
AttributeError: 'NoneType' object has no attribute 'dumps'

Pretty sure that shouldn't be None.

--
components: Library (Lib)
messages: 360407
nosy: rdil
priority: normal
severity: normal
status: open
title: Multiprocessing resolving object as None
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



[issue39410] CentOS 6.10 SQLite 3.30.1 - _sqlite3 builds successfully but is removed because it cannot be imported.

2020-01-21 Thread SilentGhost


Change by SilentGhost :


--
components: +Library (Lib)
nosy: +ghaering
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



[issue39407] Bitfield Union does not work for bit widths greater than 8 bits

2020-01-21 Thread SilentGhost


Change by SilentGhost :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
versions:  -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



[issue37909] Thread pool return ref hold memory

2020-01-21 Thread Anders


Anders  added the comment:

Note: due to a change in Python 3.8 this example would be a lot less noticeable 
if tested. The problem remains the same though.

If you run this snippet with Python 3.7, which is before the thread reuse was 
introduced into the ThreadPoolExecutor, each thread will keep around 600mb of 
memory in use.

This can be solved by shutting down the ThreadPoolExecutor which this example 
does.

Now, the big problem is that asyncio uses a long-running ThreadPoolExecutor, 
per default, for run_in_executor. Those threads will stay around forever and 
consume memory until the application is shut down.

If you have a job that consumes a lot of memory for a short period of time and 
use any long-running ThreadPoolExecutor then the memory will just keep growing 
as the job hits various threads that are never cleaned up.

--
import asyncio
import concurrent
import threading


def prepare_a_giant_list():
d = {}
for i in range(1000):
d[i] = {}
for j in range(1000):
d[i][j] = {}
for k in range(30):
d[i][j][k] = 'a' * 1000
del d

th_num = threading.active_count()
print("Thread number is {}".format(th_num))


async def main():
loop = asyncio.get_running_loop()
with concurrent.futures.ThreadPoolExecutor(max_workers=20) as 
async_executor:
await loop.run_in_executor(async_executor, prepare_a_giant_list)
await asyncio.sleep(5)
await loop.run_in_executor(async_executor, prepare_a_giant_list)
await asyncio.sleep(5)
await loop.run_in_executor(async_executor, prepare_a_giant_list)
await asyncio.sleep(5)
await loop.run_in_executor(async_executor, prepare_a_giant_list)
await asyncio.sleep(5)
print('Done!')
await asyncio.sleep(15)


if __name__ == "__main__":
asyncio.run(main())
--

--
nosy: +johndoee
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue39412] Install launcher for all users

2020-01-21 Thread Eryk Sun


Eryk Sun  added the comment:

The py launcher is separate from individual installations of Python. However 
many versions of Python are installed at the system level and for however many 
users, the system needs only one installation of the launcher. That's why it's 
recommended to install for all users. 

If the current user can't elevate to administrator access, it's possible to 
choose to install the py launcher for just the current user. In this case it 
installs to the user's "%LocalAppData%\Programs\Python\Launcher" directory, and 
this directory is added to PATH.

--
nosy: +eryksun

___
Python tracker 

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



[issue39412] Install launcher for all users

2020-01-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread Eryk Sun


Eryk Sun  added the comment:

This bypasses the CRT's copy of the environment. If any C code calls 
[_w]getenv, it will still see the variable defined. The only way it won't is if 
setting the value also bypassed the CRT environment by directly calling 
SetEnvironmentVariableW.

--
nosy: +eryksun

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8 by Victor Stinner in 
branch 'master':
bpo-39413: Implement os.unsetenv() on Windows (GH-18104)
https://github.com/python/cpython/commit/56cd3710a1ea3ba872d345ea1bebc86ed08bc8b8


--

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue39411] pyclbr rewrite on AST

2020-01-21 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
type:  -> enhancement

___
Python tracker 

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-21 Thread STINNER Victor


New submission from STINNER Victor :

os.unsetenv() is documented to be available on Windows, but it's not.

In Python 3.8, "del os.environ[key]" is implemented as:

   os.putenv(key.upper(), "")

Attached PR implements it using SetEnvironmentVariableW(name, NULL).

--
components: Library (Lib), Windows
messages: 360402
nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Implement os.unsetenv() on Windows
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



[issue39412] Install launcher for all users

2020-01-21 Thread ccetsii


New submission from ccetsii :

In Python 3.8.1 (32 bits) Windows Installer, the first page show a checkbox for 
"install launcher for all users (recommended)", but software install in user 
directory (see screenchot attachment).
Casually, in "customize installation" option, exist other "Install for all 
users" options, and that option works correctly.

--
files: python_installer.png
messages: 360401
nosy: ccetsii
priority: normal
severity: normal
status: open
title: Install launcher for all users
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48857/python_installer.png

___
Python tracker 

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



[issue39410] CentOS 6.10 SQLite 3.30.1 - _sqlite3 builds successfully but is removed because it cannot be imported.

2020-01-21 Thread Igor Ceh


Igor Ceh  added the comment:

I've changed ./Modules/_sqlite/util.h

//#if SQLITE_VERSION_NUMBER >= 3007014
#if SQLITE_VERSION_NUMBER >= 3107014 // Change
#define SQLITE3_CLOSE sqlite3_close_v2
#else
#define SQLITE3_CLOSE sqlite3_close
#endif

#endif

And tried to recompile with a new error:
*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-x86_64-3.8/_sqlite3.cpython-38-x86_64-linux-gnu.so: undefined 
symbol: sqlite3_errstr  



The following modules found by detect_modules() in setup.py, 
have been   

built by the Makefile instead, as configured by the Setup 
files:  

   _abc  atexitpwd
time


Failed to build these modules:
_uuid


Following modules built successfully but were removed because they could not be 
imported:
_sqlite3

Went into ./Modules/_sqlite/connection.c and also changed:
//#if SQLITE_VERSION_NUMBER > 3007015
#if SQLITE_VERSION_NUMBER > 3107015 // Change   


   PyErr_SetString(pysqlite_OperationalError, 
sqlite3_errstr(rc));

With these changes the build was successful and I can import sqlite3. But I 
have no idea if this has any unforeseen consequences.

--

___
Python tracker 

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



[issue35943] PyImport_GetModule() can return partially-initialized module

2020-01-21 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

> Do you mean that there is a risk that the backport introduces a regression in 
> another part of the code? If yes, I would suggest to not backport the change 
> to *stable* branches.

My worry are the many changes that are required to ceval to make this back port 
work. Not that I think we can not successfully backport things. we can.

--

___
Python tracker 

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



[issue39402] Consistent use of terms

2020-01-21 Thread Raymond Leiter


Raymond Leiter  added the comment:

Ray;
Thanks for the reply.
I understand very well, your remarks -- and, in fact, agree with them.
I think my aversion to chaotic terminology stems from my study of BNF and
the joy of reading RFCs.
I'll send in suggestions if I find actual errors or really confusing
explanations of concepts.
Thanks again.
Ray

On Tue, Jan 21, 2020 at 2:19 AM Raymond Hettinger 
wrote:

>
> Raymond Hettinger  added the comment:
>
> I don't think we would ever consider replacing "parentheses" with "round
> brackets".  Also, we have long talked about "curly braces" though the
> braces/brackets choice is a little loose.  Also note that greater-than or
> less-than have established usage (see the html entities or unicode code
> point name for example).
>
> > I'm well aware of the difficulty in garnering support for
> > this kind of an 'improvement', but I felt it needed said.
>
> I appreciate that.  Thanks for the suggestion, but we'll decline a
> wholesale search and replace mission.  If an individual case of known
> confusion arises, we can take a look at it, but for now we have no evidence
> that the current docs are causing confusion for end users.
>
> --
> nosy: +rhettinger
> resolution:  -> rejected
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue39409] AIX: FAIL: test_specific_values (test.test_cmath.CMathTests)

2020-01-21 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue39411] pyclbr rewrite on AST

2020-01-21 Thread Batuhan


Change by Batuhan :


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

___
Python tracker 

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



[issue39411] pyclbr rewrite on AST

2020-01-21 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

pyclbr currently uses token streams to analyze but it can be alot simpler with 
usage of AST. There are already many flaws, including some comments about 
limitations of this token stream processing. 

I have a draft about this. Initial PR wont change any behavior, it will just 
make code much simpler with the usage of AST (just an addition to Function 
about handling of async functions, is_async field). If agreed I can propose a 
second PR (or append the inital one) that will enhance Function/Class objects 
with various identifiers (like keywords, metaclasses, end position information 
etc.). The second PR will be alot easier to do thanks to AST.

--
components: Library (Lib)
messages: 360397
nosy: Batuhan Taskaya, pablogsal
priority: normal
severity: normal
status: open
title: pyclbr rewrite on AST
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



[issue39408] Add support for SQLCipher

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What exactly do you need to add and change in the sqlite module? The stdlib 
cannot depend on a third-party module. Ideally, you just create a subclass of 
some standard class and overrides a constructor and few methods.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue39410] CentOS 6.10 SQLite 3.30.1 - _sqlite3 builds successfully but is removed because it cannot be imported.

2020-01-21 Thread Igor Ceh


New submission from Igor Ceh :

While trying to build Python 3.8.1 from source with Sqlite 3.30.1 on a CentOS 
6.10 I get the following warning:

*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-x86_64-3.8/_sqlite3.cpython-38-x86_64-linux-gnu.so: undefined 
symbol: sqlite3_close_v2

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  atexitpwd
time


Failed to build these modules:
_uuid


Following modules built successfully but were removed because they could not be 
imported:
_sqlite3

If I try to import sqlite in python:
[vagrant@centos6 Python-3.8.1]$ ./python
Python 3.8.1 (default, Jan 21 2020, 04:22:59)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/src/Python-3.8.1/Lib/sqlite3/__init__.py", line 23, in 

from sqlite3.dbapi2 import *
  File "/usr/local/src/Python-3.8.1/Lib/sqlite3/dbapi2.py", line 27, in 
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
>>>

Also tried building with SQLite version 3.7.9 from atomic repository with same 
error.

--
messages: 360395
nosy: cehovski
priority: normal
severity: normal
status: open
title: CentOS 6.10 SQLite 3.30.1 - _sqlite3 builds successfully but is removed 
because it cannot be imported.
type: compile error
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



[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2020-01-21 Thread Miro Hrončok

Miro Hrončok  added the comment:

While raising ImportError certainly makes much more sense in this case, this 
change is backwards incompatible and there was no DeprecationWarning. I don't 
consider that fair.

As a certain compromise, we could maybe raise a custom ImportError+ValueError 
offspring (e.g. BeyondToplevelImportError)?

If feeling fancy, we could rise a DeprecationWarning when 
issublcass(BeyondToplevelImportError, ValueError) is used?

--
nosy: +hroncok

___
Python tracker 

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



[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 629023c05be24fa2f01c914c739aaa5a61a0304c by Victor Stinner in 
branch 'master':
bpo-33387: Fix compiler warning in frame_block_unwind() (GH-18099)
https://github.com/python/cpython/commit/629023c05be24fa2f01c914c739aaa5a61a0304c


--

___
Python tracker 

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



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread miss-islington


miss-islington  added the comment:


New changeset ab0d8e356ecd351d55f89519a6a97a1e69c0dfab by Miss Islington (bot) 
in branch '3.8':
bpo-39389: gzip: fix compression level metadata (GH-18077)
https://github.com/python/cpython/commit/ab0d8e356ecd351d55f89519a6a97a1e69c0dfab


--
nosy: +miss-islington

___
Python tracker 

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



[issue39408] Add support for SQLCipher

2020-01-21 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +berker.peksag, ghaering

___
Python tracker 

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



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your contribution William!

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



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17489
pull_request: https://github.com/python/cpython/pull/18100

___
Python tracker 

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



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset eab3b3f1c60afecfb4db3c3619109684cb04bd60 by Serhiy Storchaka 
(William Chargin) in branch 'master':
bpo-39389: gzip: fix compression level metadata (GH-18077)
https://github.com/python/cpython/commit/eab3b3f1c60afecfb4db3c3619109684cb04bd60


--

___
Python tracker 

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



[issue39389] gzip metadata fails to reflect compresslevel

2020-01-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17490
pull_request: https://github.com/python/cpython/pull/18101

___
Python tracker 

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



[issue39409] AIX: FAIL: test_specific_values (test.test_cmath.CMathTests)

2020-01-21 Thread Michael Felt


New submission from Michael Felt :

Per message: https://bugs.python.org/issue39396#msg360362

opening new issue. Research (as requested) to follow.

--
components: Tests
messages: 360389
nosy: Michael.Felt, vstinner
priority: normal
severity: normal
status: open
title: AIX: FAIL: test_specific_values (test.test_cmath.CMathTests)
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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This indeed a good argument to continue to use _wputenv. Thank you Eryk, you 
have saved us from making a mistake.

--

___
Python tracker 

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



[issue39397] Mac : fail to launch Python 3.8

2020-01-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The other locale related settings are off as well, the default system locale 
ends with ".UTF-8".

--

___
Python tracker 

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



[issue39406] Implement os.putenv() with setenv() if available

2020-01-21 Thread Eryk Sun


Eryk Sun  added the comment:

> Maybe use SetEnvironmentVariable() on Windows? 

`_wputenv` keeps Python's copy of the environment block in sync with CRT's 
copy, which in turn calls `SetEnvironmentVariableW` to sync with process 
environment block. The CRT's copy of the environment excludes and disallows 
variable names that start with "=". Because the interpreter initializes 
`os.environ` from the CRT environment, Python has never included or allowed 
'hidden' variables such as "=C:". 

Switching to calling `SetEnvironmentVariableW` directly won't affect 
`os.system` and `os.spawnv[e]`, since the CRT calls `CreateProcessW` without 
overriding the process environment. However, have you considered the 
consequences for extension modules and embedding applications that use the CRT 
environment (e.g. `getenv`, `_wgetenv`) if the interpreter stops syncing with 
it? 

The concern that `[_w]putenv` doesn't copy the string does not apply to Windows.

--
nosy: +eryksun

___
Python tracker 

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



[issue32989] IDLE: Fix pyparse.find_good_parse_start

2020-01-21 Thread miss-islington


miss-islington  added the comment:


New changeset 060ad2fc1535adc76f96be8269b4af0f14429161 by Miss Islington (bot) 
in branch '3.8':
bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)
https://github.com/python/cpython/commit/060ad2fc1535adc76f96be8269b4af0f14429161


--

___
Python tracker 

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



[issue32989] IDLE: Fix pyparse.find_good_parse_start

2020-01-21 Thread miss-islington


miss-islington  added the comment:


New changeset f3d3a3cc114ed30829544c3613b73e4fa6dd5599 by Miss Islington (bot) 
in branch '3.7':
bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)
https://github.com/python/cpython/commit/f3d3a3cc114ed30829544c3613b73e4fa6dd5599


--
nosy: +miss-islington

___
Python tracker 

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



[issue33387] Simplify bytecodes for try-finally, try-except and with blocks.

2020-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17488
pull_request: https://github.com/python/cpython/pull/18099

___
Python tracker 

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



[issue39396] AIX: self.assertEqualSign(math.nextafter(-0.0, +0.0), +0.0) test fails on AIX

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

My change should fix nextafter test failure on AIX.

Again, please open a separated issue for "FAIL: test_specific_values 
(test.test_cmath.CMathTests)".

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



[issue39396] AIX: self.assertEqualSign(math.nextafter(-0.0, +0.0), +0.0) test fails on AIX

2020-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 85ead4fc62829cb7ef2eb0af1a2933282f58c629 by Victor Stinner in 
branch 'master':
bpo-39396: Fix math.nextafter(-0.0, +0.0) on AIX 7.1 (GH-18094)
https://github.com/python/cpython/commit/85ead4fc62829cb7ef2eb0af1a2933282f58c629


--

___
Python tracker 

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



[issue39283] Add ability to inherit unittest arguement parser

2020-01-21 Thread Ajay Tripathi


Ajay Tripathi  added the comment:

Hi pual,

> The issue of testing a script that uses argparse has come up on StackOverFlow 
> a number of times.

Sorry for the confusing but this is not a support ticket,
I am not stuck with a problem and I am aware of the variaous solutions on 
Stackoverflow to use arguements with unittest module.

Instead, I am proposing a change in the module so that the user of unittest can 
get the `parent_parser` and add their arguements in the unitest argparser 
instance itself.


I propose this change because it seems like a more intuitive way to use 
argparser with unittest to me and I hope to hear your thoughts on the change 
and if it is desired.



Best,
Ajay Tripathi

--

___
Python tracker 

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



[issue32989] IDLE: Fix pyparse.find_good_parse_start

2020-01-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17487
pull_request: https://github.com/python/cpython/pull/18097

___
Python tracker 

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



[issue32989] IDLE: Fix pyparse.find_good_parse_start

2020-01-21 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset ec64640a2c5236d7a5d5470d759172a3d93eab0b by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-32989: IDLE - fix bad editor call of pyparse method (GH-5968)
https://github.com/python/cpython/commit/ec64640a2c5236d7a5d5470d759172a3d93eab0b


--

___
Python tracker 

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



  1   2   >