[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Ammar Askar


Ammar Askar  added the comment:

Actually nevermind, disregard that, I was just testing it wrong. I think the 
simplest fix here is to add '#' to the list of characters here so we don't 
double insert newlines for comments: 
https://github.com/python/cpython/blob/b83d917fafd87e4130f9c7d5209ad2debc7219cd/Lib/tokenize.py#L659

And a test for round tripping a file ending with a comment but no newline will 
allow that particular branch to be tested.

I'll make a PR this week if no one else gets to it.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-10-29 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for doing the additional work to finish this up.

--

___
Python tracker 

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



[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Interesting!  I have a 3.6.2 sitting around and cannot reproduce that "x=1" 
behavior.

I don't know what the behavior _should_ be.  It just feels natural that 
untokenize should be able to round trip anything tokenize or generate_tokens 
emits without raising an exception.

I'm filing this as the "#" case came up within some existing code we had that 
happened to effectively test that particular round trip.

--

___
Python tracker 

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



[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Ammar Askar


Ammar Askar  added the comment:

fwiw I think there's more at play here than the newline change. This is the 
behavior I get on 3.6.5 (before the newline change is applied). # works as 
expected but check out this input:

>>> t.untokenize(tokenize.generate_tokens(io.StringIO('#').readline))
'#'
>>> t.untokenize(tokenize.generate_tokens(io.StringIO('x=1').readline))
Traceback (most recent call last):
  File "", line 1, in 
  File "D:\Python365\lib\tokenize.py", line 272, in untokenize
self.add_whitespace(start)
  File "D:\Python365\lib\tokenize.py", line 234, in add_whitespace
.format(row, col, self.prev_row, self.prev_col))
ValueError: start (1,0) precedes previous end (2,0)

--

___
Python tracker 

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



[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Ammar Askar


Ammar Askar  added the comment:

Looks like this is caused by this line here: 

https://github.com/python/cpython/blob/b83d917fafd87e4130f9c7d5209ad2debc7219cd/Lib/tokenize.py#L551-L558

which adds a newline token implicitly after comments. Since the input didn't 
terminate with a '\n', the code to add a newline at the end of input kicks in.

--

___
Python tracker 

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



[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-29 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://bugs.python.org/issue35107 filed to track further fallout from this API 
change.

--

___
Python tracker 

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



[issue35107] untokenize() fails on tokenize output when a newline is missing

2018-10-29 Thread Gregory P. Smith


New submission from Gregory P. Smith :

The behavior change introduced in 3.6.7 and 3.7.1 via 
https://bugs.python.org/issue33899 has further consequences:

```python
>>> tokenize.untokenize(tokenize.generate_tokens(io.StringIO('#').readline))
Traceback (most recent call last):
  File "", line 1, in 
  File ".../cpython/cpython-upstream/Lib/tokenize.py", line 332, in untokenize
out = ut.untokenize(iterable)
  File ".../cpython/cpython-upstream/Lib/tokenize.py", line 266, in untokenize
self.add_whitespace(start)
  File ".../cpython/cpython-upstream/Lib/tokenize.py", line 227, in 
add_whitespace
raise ValueError("start ({},{}) precedes previous end ({},{})"
ValueError: start (1,1) precedes previous end (2,0)
```

The same goes for using the documented tokenize API (`generate_tokens` is not 
documented):

```
tokenize.untokenize(tokenize.tokenize(io.BytesIO(b'#').readline))
...
ValueError: start (1,1) precedes previous end (2,0)

```

`untokenize()` is no longer able to work on output of `generate_tokens()` if 
the input to generate_tokens() did not end in a newline.

Today's workaround: Always append a newline if one is missing to the line that 
the readline callable passed to tokenize or generate_tokens returns.  Very 
annoying to implement.

--
messages: 328876
nosy: ammar2, gregory.p.smith, meador.inge, taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: untokenize() fails on tokenize output when a newline is missing
versions: Python 3.6, 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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

3.6 and 3.7 are backported!

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 7b689c68ab3236455f7d58954435d029e2bb2c8a by Miss Islington (bot) 
in branch '3.6':
bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)
https://github.com/python/cpython/commit/7b689c68ab3236455f7d58954435d029e2bb2c8a


--

___
Python tracker 

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 58f7bf3a892031616a6b06ef4b8d36e2ebec172b by Miss Islington (bot) 
in branch '3.7':
bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)
https://github.com/python/cpython/commit/58f7bf3a892031616a6b06ef4b8d36e2ebec172b


--
nosy: +miss-islington

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Eryk Sun


Eryk Sun  added the comment:

>  Windows getcwd() returns a path without resolved symbolic links

This provides consistency. If the working directory were resolved, then 
accessing "../file.ext" after chdir("C:/Temp/link") could be inconsistent with 
accessing "C:/Temp/link/../file.ext". This is a consequence of the way DOS 
paths are translated to native NT paths, which is implemented strictly as a 
string operation. Since "." and ".." are regular names in NT and not 
necessarily reserved (e.g. FAT32 allows creating a file named ".."), resolving 
a path POSIX style would require resolving it up to each ".." component. This 
would entail potentially making many system calls just to normalize a path 
before even getting to the intended operation.

> Use os.path.realpath() is you want to resolve symbolic links

In Windows, os.path.realpath is an alias for os.path.abspath, so it doesn't 
resolve links. Use os.path._getfinalpathname to resolve a file-system path. 
This returns a \\?\ local-device path, which I'd encourage retaining rather 
than automatically converting to a regular DOS path. The resulting path may be 
too long for a regular DOS path (if long paths aren't supported), or the final 
component of the path may conflict with DOS quirks such as reserved device 
names (e.g. "nul.txt") and ignoring trailing dots and spaces.

--
nosy: +eryksun

___
Python tracker 

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset f6a47f3e316cede2a07a1f74a509f6d80ab8fef0 by Pablo Galindo in 
branch 'master':
bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011)
https://github.com/python/cpython/commit/f6a47f3e316cede2a07a1f74a509f6d80ab8fef0


--

___
Python tracker 

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9542

___
Python tracker 

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9541
stage: resolved -> patch review

___
Python tracker 

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



[issue35098] Deleting __new__ does not restore previous behavior

2018-10-29 Thread ppperry


ppperry  added the comment:

This is a duplicate of issue25731

--
nosy: +ppperry

___
Python tracker 

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



[issue34765] Update install-sh

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ed271b2350486b1fa031fa70e1e99d0d9b2b2133 by Victor Stinner in 
branch 'master':
bpo-34765: install-sh is executable (GH-10225)
https://github.com/python/cpython/commit/ed271b2350486b1fa031fa70e1e99d0d9b2b2133


--

___
Python tracker 

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

At least Python 3.6 and 3.7 branches are affected as well, so I reopen the 
issue.

--
status: closed -> open
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



[issue34765] Update install-sh

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

I made install-sh executable again.

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



[issue28655] Tests altered the execution environment in isolated mode

2018-10-29 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 4687bc993a275eaeb27a8b2068b128ce1f464818 by Victor Stinner (Maite 
Giménez) in branch '3.6':
bpo-28655: Fix test bdb for isolate mode (GH-10220)
https://github.com/python/cpython/commit/4687bc993a275eaeb27a8b2068b128ce1f464818


--

___
Python tracker 

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



[issue3243] Support iterable bodies in httplib

2018-10-29 Thread tzickel


Change by tzickel :


--
pull_requests: +9540

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2018-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is a documentation issue.

--
stage: patch review -> needs patch
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This should be fixed (it works now with and without -v). :)

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 02277482ea765335e497ecd9661d4bde9b5ddc67 by Pablo Galindo in 
branch 'master':
bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)
https://github.com/python/cpython/commit/02277482ea765335e497ecd9661d4bde9b5ddc67


--
nosy: +pablogsal

___
Python tracker 

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



[issue34765] Update install-sh

2018-10-29 Thread Michael Felt


Michael Felt  added the comment:

FYI: On my manual build server I have coreutils "install" installed, and it 
seems install-sh is not called in that case (which is why I never saw with 
manual builds)

FYI: There is also an issue (I hope side-effect) that pyexpat is not building 
while install-sh is not executing.

I see the new PR - thx for the quick response!

--

___
Python tracker 

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



[issue35084] binascii.Error: Incorrect padding

2018-10-29 Thread TestUser


TestUser  added the comment:

In the new version of Ubuntu this generates a system crash report. Normally
I delete them.

Give me a day or to to get you one.

Funny, since it is the crash reports use of base64 encoding that led me to
the Python base64 module.

On Sun, Oct 28, 2018 at 8:42 PM Karthikeyan Singaravelan <
rep...@bugs.python.org> wrote:

>
> Karthikeyan Singaravelan  added the comment:
>
> Can you please add your definition of a crash? Crash in bug report context
> is used in C language context like causing a segfault, buffer overflow etc.
> Proper Exceptions are not considered as a crash and this is an exception
> raised since the contents are invalid. If it crashes as I mentioned above
> can you please add the crash log?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue22021] shutil.make_archive() root_dir do not work

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

FYI.

Joannah Nanjekye converted Issue22021.patch into a PR: PR 10191.

Serhiy Storchaka closed the PR: "The current behavior looks correct to me. It 
is consistent with the behavior of the tar command. This change breaks tests 
and I think it will break user code. Read the discussion on bpo-22021."
https://github.com/python/cpython/pull/10191#issuecomment-434040367

--
nosy: +vstinner

___
Python tracker 

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



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks @pitrou for the feedback!

As you think this will not be that useful, I will close the issue and the 
proposal PR.

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



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2018-10-29 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

First, it is quite uncommon to open a file in append mode.  Second, when you 
open in append mode, often you will gradually append (such as for a logfile), 
so a single method call isn't effective.

So I think this does not solve an important use case.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 541497e6197268517b0d492856027774c43e0949 by Victor Stinner in 
branch 'master':
bpo-35059: Convert Py_XINCREF() to static inline function (GH-10224)
https://github.com/python/cpython/commit/541497e6197268517b0d492856027774c43e0949


--

___
Python tracker 

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



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2018-10-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pitrou

___
Python tracker 

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



[issue23220] IDLE: Document how Shell displays user code output

2018-10-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

While editing 'IDLE-console differences' (added in the patch above) for #35099, 
I decided that it should be renamed (to, say, 'Executing user code') and 
limited to the effect of executing user code in IDLE's execution process 
instead of a standard python process. Except for a intentional change to make 
developing tkinter code easier, such effects are unintended and possibly bad 
for developers using IDLE.

This issue is about one aspect of how IDLE's Shell, in the GUI process, 
displays strings and bytes sent from the execution process via sys.stdout and 
sys.stderr.  My previous revision of the title was wrong and my previous patch 
not directly relevant.

I will make a new patch to add a new section ('Displaying user code output'?) 
describing various aspects of how Shell displays std text output, starting with 
this one.  Most of the differences from various consoles and terminal are 
intentional and considered to be net positives.

While the handling of control characters is inherited from tk, Serhiy and I 
have claimed on other issues that displaying one glyph per character has 
advantages for development as well as disadvantages.  (Being about to display 
all but only the BMP subset of unicode is also inherited from tcl/tk.)

One of my unposted ideas is to add an option to the run menu to run edited code 
in the system console/terminal, detached from IDLE, the same as if the file 
were run from a command line or directory listing.  This would bypass both 
IDLE's execution and display effects.

--
title: Documents input/output effects of how IDLE runs user code -> IDLE: 
Document how Shell displays user code output
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue34765] Update install-sh

2018-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9539
stage: resolved -> patch review

___
Python tracker 

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



[issue34765] Update install-sh

2018-10-29 Thread STINNER Victor


Change by STINNER Victor :


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



[issue35081] Rename Include/internals/ to Include/pycore/

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

Discussion on python-dev:
https://mail.python.org/pipermail/python-dev/2018-October/155587.html

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

TODO: Convert _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() macros to static 
inline functions, but there are inter-dependencies issues: see bpo-35081 and
https://mail.python.org/pipermail/python-dev/2018-October/155592.html

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9538

___
Python tracker 

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



[issue32696] Fix pickling exceptions with multiple arguments

2018-10-29 Thread Benoit Pierre


Change by Benoit Pierre :


--
nosy: +benoit-pierre

___
Python tracker 

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



[issue34765] Update install-sh

2018-10-29 Thread Michael Felt


Michael Felt  added the comment:

This is closed, however, since this was merged the AIX buildbots have failed. 
This is because the file mode bits lack the -x

root@x066:[/data/prj/python/git/cpython-master]find . -name install-sh -ls
148833829   16 -rw-r--r--  1 root  felt 15368 Oct 29 17:34 
./install-sh

Can this be fixed as part of this issue, or do I need to open a new one?

Currently both AIX build-bots fail in the build phase with:

renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8
./install-sh -c -m 644 ./Tools/gdb/libpython.py python-gdb.py
./install-sh: not found

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9537

___
Python tracker 

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



[issue34850] Emit a syntax warning for "is" with a literal

2018-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Gregory, do you still have objections against adding these warnings?

--

___
Python tracker 

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



[issue34966] Pydoc: better support of method aliases

2018-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue34897] distutils test errors when CXX is not set

2018-10-29 Thread Michael Felt

Michael Felt  added the comment:

> On 10/26/2018 5:36 PM, Tal Einat wrote:
> Tal Einat  added the comment:
> 
> I'm not sure that the resolution currently suggested, changing 
> compiler.set_executables(), is the right way to go.
> 
> This change to distutils is a break of backwards compatibility. Though it is 
> a minor change, it could still break existing code.
> 
> Fixing test.support seems just as good to me in terms of code design, and 
> better in that it is only used internally for our tests.
> 
> (BTW, instead of `elif cmd is None or (not cmd):`, you can just use `elif not 
> cmd:`.)
Thx. One of the python bits I need to embrace.

Although - during my testing I saw that the null string "" was not being
accepted as None, but was accepted as "not cmd".

My reading error was taking None to mean a value was not initialized
while it seems to be None is a 'value' that is assigned, while ´not xxx'
can be either - never assigned or a null-length string.

This is the "ambiguity", at least for myself, that I feel I tracked down.

It is "unfortunate" if this breaks backward compatibility - IF the
backward compatibility has been based on an ambiguity. Or I again, miss
a fine-point of Python coding. Won´'t be the last time I expect.

Comments requested.

> 
> --
> nosy: +taleinat
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue35106] Add documentation for `type.__subclasses__` to docs.python.org

2018-10-29 Thread Joy Diamond


Joy Diamond  added the comment:

Documented here: 
https://docs.python.org/3/library/stdtypes.html#class.__subclasses__

(Though does not appear in google searches)

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



[issue33074] dbm corrupts index on macOS (_dbm module)

2018-10-29 Thread Robert Xiao


Robert Xiao  added the comment:

I just started a new project, thoughtlessly decided to use `shelve` to store 
data, and lost it all again thanks to this bug.

To reiterate: Although `gdbm` might fix this issue, it's not installed by 
default. But the issue is with `dbm`: Python is allowing me to insert elements 
into the database which exceed internal limits, causing the database to become 
silently corrupt upon retrieval. This is an unacceptable situation - a very 
normal, non-complex use of the standard library is causing data loss without 
any indication that the loss is occurring.

At the very least there should be a warning or error that the data inserted 
exceeds dbm's limits, and in an ideal world dbm would not fall over from 
inserting a few KB of data in a single row (but I understand that's a third 
party problem at that point).

Can't we just ship a dbm that is backed with a more robust engine, like a 
SQLite key-value table?

--
type:  -> behavior

___
Python tracker 

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



[issue35106] Add documentation for `type.__subclasses__` to docs.python.org

2018-10-29 Thread Joy Diamond


New submission from Joy Diamond :

Add documentation for `type.__subclasses__` to docs.python.org

Python ideas discussion:

https://mail.python.org/pipermail/python-ideas/2018-October/054361.html

--
assignee: docs@python
components: Documentation
messages: 328848
nosy: docs@python, joydiamond
priority: normal
severity: normal
status: open
title: Add documentation for `type.__subclasses__` to docs.python.org
versions: Python 2.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



[issue33331] Clean modules in the reversed order

2018-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement
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



[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-29 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I've now updated my personal machine to Mojave and cannot reproduce the 
failure.  I'm going to chalk this one up to some weird corporate active 
directory or whatnot weirdness.  I'd still love to know why the code in Python 
works differently that the standalone C version, but I don't plan on spending 
much time on this issue unless new data comes in.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-10-29 Thread Diego Rojas


Diego Rojas  added the comment:

Serhiy Storchaka, Raymond. I already made the 10219 PR. Preserves order in html 
Element attributes and minidom.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3b05ad7be09af1d4510eb698b0a70d36387f296e by Serhiy Storchaka in 
branch 'master':
bpo-34160: Preserve user specified order of Element attributes in html. 
(GH-10190)
https://github.com/python/cpython/commit/3b05ad7be09af1d4510eb698b0a70d36387f296e


--

___
Python tracker 

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



[issue33331] Clean modules in the reversed order

2018-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c93c58b5d560cfe44d9884ff02c9b18e0660 by Serhiy Storchaka in 
branch 'master':
bpo-1: Clean modules in the reversed order in PyImport_Cleanup(). (GH-6565)
https://github.com/python/cpython/commit/c93c58b5d560cfe44d9884ff02c9b18e0660


--

___
Python tracker 

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



[issue28655] Tests altered the execution environment in isolated mode

2018-10-29 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +9536

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-10-29 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
superseder:  -> %Z in strptime doesn't match EST and others

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-10-29 Thread Alexander Belopolsky


Change by Alexander Belopolsky :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-10-29 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

Since the Python datetime only supports dates within 0001-01-01 through 
-12-31 range, it is not clear how we can meaningfully support the AD/BC era 
designation.

Looking at man strftime page on my Mac, I see that they use every upper an 
lower case letter as a valid format specifier, but they still not have a letter 
code for AD/BC.  In the "BUGS" section they humorousely complain that "There is 
no conversion specification for the phase of the moon" which makes me think 
that the moon phase designations are higher on some people agenda than the era 
designations.

--

___
Python tracker 

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



[issue22377] %Z in strptime doesn't match EST and others

2018-10-29 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

I think strptime should only accept %Z when it comes together with %z and not 
do any validation.

This is close to the current behavior.  %Z by itself is useless because even 
when it is accepted, the value is discarded:

>>> print(datetime.strptime('UTC', '%Z'))
1900-01-01 00:00:00

You have to use %z to get an aware datetime instance: 

>>> print(datetime.strptime('UTC+', '%Z%z'))
1900-01-01 00:00:00+00:00


The validation is already fairly lax:

>>> print(datetime.strptime('UTC+1234', '%Z%z'))
1900-01-01 00:00:00+12:34

I don't think this issue has anything to do with the availability of zoneinfo 
database.  Timezone abbreviations are often ambiguous and should only serve as 
a human-readable supplement to the UTC offset and cannot by itself be used as a 
TZ specification.

--

___
Python tracker 

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



[issue34672] '%Z' strftime specifier never works with musl

2018-10-29 Thread Alexander Belopolsky


Alexander Belopolsky  added the comment:

It looks like this issue has been fixed by GH-9288.  Can this be closed?  
Should we backport?

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-10-29 Thread Diego Rojas


Change by Diego Rojas :


--
pull_requests: +9535

___
Python tracker 

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



[issue28806] Improve the netrc library

2018-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -9533

___
Python tracker 

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



[issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..."

2018-10-29 Thread Ned Deily


Ned Deily  added the comment:

AFAICT, the problem here is that there is a duplicate command accelerator 
assignment: IDLE assigns CMD-M to its Open Module command 
(https://github.com/python/cpython/blob/master/Lib/idlelib/config-keys.def#L205)
 but either Tk or the underlying macOS services it uses already use CMD-M to 
mean "minimize the front window to the Dock" 
(https://support.apple.com/en-us/HT201236).  You can see in the IDLE menu bar 
where CMD-M shows up in the Window menu stack (with Minimize) but not in the 
the File stack (where Open Module is).  Since CMD-M has a commonly used 
system-wide meaning, it would probably be best to change IDLE's Open Module to 
use something else.

--

___
Python tracker 

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> note: Roundup sent me comments as email notifications in the backward order, 
> that's funny to see Pablo's answer before my question :-)

Maybe I just answered faster than the speed of light ;)

--

___
Python tracker 

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



[issue33015] Fix function cast warning in thread_pthread.h

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

I closed my PR 10057: "Control Flow Integrity killed my PR :-)
https://bugs.python.org/issue33015#msg328325 "

--

___
Python tracker 

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

note: Roundup sent me comments as email notifications in the backward order, 
that's funny to see Pablo's answer before my question :-)

--

___
Python tracker 

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



[issue35062] io.IncrementalNewlineDecoder assign out-of-range value to bitwise struct field

2018-10-29 Thread Xiang Zhang


Change by Xiang Zhang :


--
keywords: +patch
pull_requests: +9534
stage: needs patch -> patch review

___
Python tracker 

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



[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2018-10-29 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

See 
https://bugs.python.org/issue33826?@ok_message=msg%20328824%20created%0Aissue%2033826%20message_count%2C%20messages%20edited%20ok&@template=item#msg319692
 how IPython stores source from interactive input and why it's not appropriate 
for vanilla REPL IMO.

--
nosy: +Ivan.Pozdeev

___
Python tracker 

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2018-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Someone needs to review PR10011

--

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-29 Thread coyot linden


coyot linden  added the comment:

Sure, this can wait to the next release. I don't see it as groundshatteringly 
;) urgent.

--

___
Python tracker 

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



[issue35031] test_asyncio test_start_tls_server_1 fails in AMD64 FreeBSD CURRENT buildbots

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

Any progress on this issue? It's still failing:
https://buildbot.python.org/all/#/builders/168/builds/143

--
nosy: +vstinner

___
Python tracker 

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



[issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..."

2018-10-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

What I see in the .gif is that Open Module is open on top of Shell (not 
minimized, traffic lights gray) and that clicking Cancel closes Open Module and 
temporarily minimizes Shell, before it pops back up with traffic lights.  It is 
hard to imagine that how one opens Open Module changes its close behavior.

With 3.7.1rc1, with unreleased tk patches, Command-M immediately after opening 
IDLE (Shell) closes IDLE.  A window pops up offering to send a report to Apple, 
or to re-open.  'Re-open' does not work.  After opening another window, I see 
Shell minimize and pop back with the traffic lights gray.  Both Cancel and 
Escape have the effect in the gif.  Clicking OK with a valid module name does 
the same and opens the module.

In summary, using Command-M either crashes IDLE or causes the change in traffic 
lights to be accompanied by minimizing and restoring.

Kevin, another weird tkinter/tk Mac behavior.

--
nosy: +ned.deily, wordtech

___
Python tracker 

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



[issue28806] Improve the netrc library

2018-10-29 Thread bbayles


Change by bbayles :


--
pull_requests: +9533

___
Python tracker 

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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Sorry about that I thought to redirect the discussion to the linked issue since 
it had a lot of people who might provide a better discussion about it. Feel 
free to reopen this if needed.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-35059: Remove Py_STATIC_INLINE() macro (GH-10216)

Here you have Benjamin, it's gone :-)

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 542497aa9f71c664768c3d5b7398c03679d3a7e1 by Victor Stinner in 
branch 'master':
bpo-35059: Remove Py_STATIC_INLINE() macro (GH-10216)
https://github.com/python/cpython/commit/542497aa9f71c664768c3d5b7398c03679d3a7e1


--

___
Python tracker 

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



[issue34864] In Idle, Mac tabs make editor status line disappear.

2018-10-29 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As part of revising the IDLE Docs, I want to add a section for running on MacOS 
(issue in preparation, section title undecided).  I already planned on 
mentioning this setting.  It seems it should be dis-recommended, at least at 
present.

--

___
Python tracker 

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



[issue34945] regression with ./python -m test and pdb

2018-10-29 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Pablo,

I have tested your PR and I get the prompt of pdb only if I use -v on the 
command line.

For the print() function, I understand but for the pdb.set_trace() function, 
normally we should have the prompt even we don't specify the --verbose flat.

Do you confirm?

--

___
Python tracker 

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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

The issue has been fixed in Python 3.7 and master.

If someone is volunteer to backport it to older version, please go ahead :-) 
But according to serge-sans-paille, it's non trivial and I'm not sure that it's 
worth it. Sorry, usually we focus on the master branch for "new features".
https://github.com/python/cpython/pull/9908#issuecomment-433896161

So I close the issue.

Thanks serge-sans-paille for this nice enhancement!

--
versions: +Python 3.7, Python 3.8 -Python 2.7, 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



[issue28015] configure --with-lto builds fail when CC=clang on Linux, requires gold linker

2018-10-29 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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Thomas Viehmann


Change by Thomas Viehmann :


--
nosy:  -t-vi

___
Python tracker 

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



[issue34969] Add --fast, --best to the gzip CLI

2018-10-29 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi @Serhiy

I would like to add them on lzma, bz2, zipfile and tarfile.

--

___
Python tracker 

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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

> which, as I explained, is already possible without the patch

Sorry, I myself explained in https://bugs.python.org/msg319692 that it's not 
possible. The rest still stands though.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9532

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2aaf0c12041bcaadd7f2cc5a54450eefd7a6ff12 by Victor Stinner in 
branch 'master':
bpo-35059: Convert Py_INCREF() to static inline function (GH-10079)
https://github.com/python/cpython/commit/2aaf0c12041bcaadd7f2cc5a54450eefd7a6ff12


--

___
Python tracker 

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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

@Thomas Viehmann , as it's currently formulated, this is a duplicate because it 
strives to allow getting class source from past interactive input -- which, as 
I explained, is already possible without the patch and seems to be 
inappropriate for vanilla console anyway.

Your patch is rather a new class feature that provides a more robust link to 
its source, wherever it's located. If you reformulate your ticket to propose 
that instead, it will no longer be a duplicate. I'm not sure if the UI allows 
that, it may be better to create a new ticket.

--

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Michael Hoffman


Michael Hoffman  added the comment:

`getcwd()` in many ways serves the purpose that a `lget_current_dir_name()` 
might.

--

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34931] os.path.splitext with more dots

2018-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Related issues: issue536120, issue1115886, issue1462106, issue1681842, 
issue19191.

Python-Dev discussions:

https://mail.python.org/pipermail/python-dev/2007-March/071557.html
https://mail.python.org/pipermail/python-dev/2007-March/071935.html

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

os.stat() has a following_symlinks parameter because there is lstat(). There is 
no lgetcwd(), only getcwd(). I dislike the parameter choice. Use 
os.path.realpath() is you want to resolve symbolic links.

--

___
Python tracker 

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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Thomas Viehmann


Change by Thomas Viehmann :


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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Nicholas Colclasure for the bug report and Gus Goulart for the fix.

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



[issue25205] setattr accepts invalid identifiers

2018-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-35105 to propose to document the behavior.

--

___
Python tracker 

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



[issue35105] Document that CPython accepts "invalid" identifiers

2018-10-29 Thread STINNER Victor


New submission from STINNER Victor :

The Python 3 language has a strict definition for an identifier:
https://docs.python.org/dev/reference/lexical_analysis.html#identifiers

... but in practice, it's possible to create "invalid" identifiers using 
setattr().

Example with PyPy:

$ pypy
Python 2.7.13 (0e7ea4fe15e82d5124e805e2e4a37cae1a402d4b, Apr 12 2018, 14:50:12)
 class A: pass
 
 a=A()
 setattr(a, "1", 2)
 getattr(a, "1")
2

 vars(a)
{'1': 2}
 a.__dict__
{'1': 2}

 a.1
  File "", line 1
a.1
^
SyntaxError: invalid syntax


The exact definition of "identifiers" is a common question. Recent examples:

* bpo-25205
* [Python-Dev] Arbitrary non-identifier string keys when using **kwargs
  https://mail.python.org/pipermail/python-dev/2018-October/155435.html

It would be nice to document the answer. Maybe in the Langage Specification, 
maybe in the setattr() documentation, maybe in a FAQ, maybe everywhere?

--
assignee: docs@python
components: Documentation
messages: 328816
nosy: docs@python, serhiy.storchaka, steven.daprano, vstinner
priority: normal
severity: normal
status: open
title: Document that CPython accepts "invalid" identifiers
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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Thomas Viehmann


Thomas Viehmann  added the comment:

Yeah, it's a shame no-one looked at the patch that seems to fix the underlying 
cause and now it's just a duplicate of a bug to improve error  messages.
On the up side, closing this bug will stop me from getting reminders about it.

--
resolution:  -> duplicate

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Michael Hoffman


Michael Hoffman  added the comment:

> * For some libc functions we add options to existing functions rather of 
> duplicating the number of names in the os module. For example the dir_fd  
> option instead of *at() functions. Wouldn't be better to add a buulean 
> parameter (with platform-depending default) to getcwd()?

I agree, adding an option to `getcwd()` would probably be a better approach and 
reduce some of the other potential confusion.

--

___
Python tracker 

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



[issue33826] enable discovery of class source code in IPython interactively defined classes

2018-10-29 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This seems to be a duplicate of issue12920. issue24491 was also a related issue 
closed as a duplicate of issue12920. So I propose closing this to continue the 
discussion in issue12920. Feel free to add in if I am missing something.

--
nosy: +xtreak

___
Python tracker 

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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 4ec427b005036dab0a380de20f31774394ca4dd6 by Miss Islington (bot) 
in branch '2.7':
bpo-27741: Better wording for datetime.strptime() (GH-9994)
https://github.com/python/cpython/commit/4ec427b005036dab0a380de20f31774394ca4dd6


--

___
Python tracker 

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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset a02bc719ebc496bc527e9e46de2f2e83f68bfd77 by Miss Islington (bot) 
in branch '3.7':
bpo-27741: Better wording for datetime.strptime() (GH-9994)
https://github.com/python/cpython/commit/a02bc719ebc496bc527e9e46de2f2e83f68bfd77


--

___
Python tracker 

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



[issue34931] os.path.splitext with more dots

2018-10-29 Thread Jan Novak


Jan Novak  added the comment:

Yes, dot behaviour is well documented.

But splitext() is a function to split name and extension, not take care about 
hidden files.

Hidden files starting with dot is Unix like system feature.
https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory

Hidden files could have also extension.
Try for example create/rename .somename.jpg file in Ubuntu.
It is normal image with .jpg extension. You could open it etc.

You can't use standard python splitext() function to detect extension.

I know that change this standard python function is probably imposible due to 
backward compatibility. Bud extend it with new parameter could be possible. The 
change in 2007 was unfortunate/incomplete.

--

___
Python tracker 

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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 0a53a067dc4eb86ecf94c50582b3e22359c601a9 by Miss Islington (bot) 
in branch '3.6':
bpo-27741: Better wording for datetime.strptime() (GH-9994)
https://github.com/python/cpython/commit/0a53a067dc4eb86ecf94c50582b3e22359c601a9


--
nosy: +miss-islington

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

We provide Python implementations for fnmatch, glob, realpath even if there are 
corresponding libc functions. This makes them available even on platforms that 
doesn't have native implementations in libc, avoids C limitations, and allow to 
add new options. I think it is not wrong to provide a Python implementation for 
get_current_dir_name().

My concerns are that while it can be useful for people that search for 
get_current_dir_name() in Python, it can be confused for other people.

* getcwd() and get_current_dir_name() are very similar, but have very different 
names. In what cases the one or other is preferable?

* On Windows getcwd() returns a path without resolved symbolic links, the same 
as get_current_dir_name(). Shouldn't we provide an option for getting current 
working directory with resolved symbolic links on all platforms? This will give 
us three options: resolved symlinks, unresolved symlinks, and platform-depended 
default.

* get_current_dir_name() works as desired only when current working directory 
was not changed since the start of the program. Any call of chdir() will make 
it an alias to getcwd().

* For some libc functions we add options to existing functions rather of 
duplicating the number of names in the os module. For example the dir_fd  
option instead of *at() functions. Wouldn't be better to add a buulean 
parameter (with platform-depending default) to getcwd()?

* What about pathlib? Does it need corresponding feature?

--

___
Python tracker 

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



[issue19376] document that strptime() does not support the Feb 29 if the format does not contain the year

2018-10-29 Thread Tal Einat


Tal Einat  added the comment:

This is a great, easy, doc-only issue for a new contributor to handle.

--
keywords: +easy
nosy: +taleinat
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.2, Python 3.3

___
Python tracker 

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



  1   2   >