[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread anthony shaw


Change by anthony shaw :


--
versions: +Python 3.10, Python 3.11

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



[issue46707] Parser hanging on stacked { tokens

2022-02-09 Thread anthony shaw


New submission from anthony shaw :

Providing an (invalid) input to the parser causes an exponentially-slow DoS to 
the Python executable in 3.10.

e.g.

python3.10 -c "{:"

takes ~2 seconds

python3.10 -c ":"

takes ~22 seconds

Tested this all the way up to 
d```{{{ef f():y

which took over an hour

--
components: Parser
keywords: 3.10regression
messages: 412972
nosy: anthonypjshaw, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Parser hanging on stacked { tokens
type: crash

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



[issue46704] Parser API not checking for null-terminator

2022-02-09 Thread anthony shaw


New submission from anthony shaw :

In tokenizer.c, the translate_newlines() function does a `strlen()` on the 
input string, if the string is not null-terminated, e.g. 
'\xbe' this leads to a heap-buffer-overflow. The overflow is not exploitable, 
but if there are further changes to the parser, it might be worth using a 
strlen() alternative, like strnlen().

static char *
translate_newlines(const char *s, int exec_input, struct tok_state *tok) {
int skip_next_lf = 0;
size_t needed_length = strlen(s) + 2, final_length;


This leads to a heap-buffer-overflow detected by ASAN in a simple reproducible 
example, calling PyRun_StringFlags() from the LLVM fuzzer:


fuzz_target(47084,0x11356f600) malloc: nano zone abandoned due to inability to 
preallocate reserved vm space.
Dictionary: 35 entries
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 3034498392
INFO: Loaded 1 modules   (43 inline 8-bit counters): 43 [0x10a2b71e8, 
0x10a2b7213), 
INFO: Loaded 1 PC tables (43 PCs): 43 [0x10a2b7218,0x10a2b74c8), 
INFO:1 files found in ../Tests/fuzzing/corpus
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 
4096 bytes
=
==47084==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x60203131 at pc 0x00010bd1d555 bp 0x7ff7b5da0590 sp 0x7ff7b5d9fd50
READ of size 2 at 0x60203131 thread T0
#0 0x10bd1d554 in wrap_strlen+0x184 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x15554)
#1 0x10b12132b in translate_newlines+0x1b (Python:x86_64+0x5d32b)
#2 0x10b12071c in _PyParser_ASTFromString+0x1ac (Python:x86_64+0x5c71c)
#3 0x10b2f86de in PyRun_StringFlags+0x5e (Python:x86_64+0x2346de)
#4 0x10a25ec6b in CompileCode(char const*) fuzz_target.cpp:54
#5 0x10a25f247 in LLVMFuzzerTestOneInput fuzz_target.cpp:68
#6 0x10a27aff3 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, 
unsigned long) FuzzerLoop.cpp:611
#7 0x10a27c3c4 in 
fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__1::vector >&) FuzzerLoop.cpp:804
#8 0x10a27c859 in fuzzer::Fuzzer::Loop(std::__1::vector >&) FuzzerLoop.cpp:857
#9 0x10a26aa5f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char 
const*, unsigned long)) FuzzerDriver.cpp:906
#10 0x10a298e42 in main FuzzerMain.cpp:20
#11 0x1134f44fd in start+0x1cd (dyld:x86_64+0x54fd)

0x60203131 is located 0 bytes to the right of 1-byte region 
[0x60203130,0x60203131)
allocated by thread T0 here:
#0 0x10bd58a0d in wrap__Znam+0x7d 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x50a0d)
#1 0x10a27af02 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, 
unsigned long) FuzzerLoop.cpp:596
#2 0x10a27c3c4 in 
fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__1::vector >&) FuzzerLoop.cpp:804
#3 0x10a27c859 in fuzzer::Fuzzer::Loop(std::__1::vector >&) FuzzerLoop.cpp:857
#4 0x10a26aa5f in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char 
const*, unsigned long)) FuzzerDriver.cpp:906
#5 0x10a298e42 in main FuzzerMain.cpp:20
#6 0x1134f44fd in start+0x1cd (dyld:x86_64+0x54fd)

SUMMARY: AddressSanitizer: heap-buffer-overflow 
(libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x15554) in wrap_strlen+0x184
Shadow bytes around the buggy address:
  0x1c0405d0: fa fa 02 fa fa fa 02 fa fa fa 02 fa fa fa 02 fa
  0x1c0405e0: fa fa 02 fa fa fa 02 fa fa fa 02 fa fa fa 02 fa
  0x1c0405f0: fa fa 03 fa fa fa 03 fa fa fa 03 fa fa fa 03 fa
  0x1c040600: fa fa 01 fa fa fa 01 fa fa fa 01 fa fa fa 01 fa
  0x1c040610: fa fa 00 00 fa fa 00 fa fa fa 00 fa fa fa 00 00
=>0x1c040620: fa fa 00 fa fa fa[01]fa fa fa fd fa fa fa fd fd
  0x1c040630: fa fa fd fa fa fa fd fa fa fa 00 fa fa fa 04 fa
  0x1c040640: fa fa 00 00 fa fa 01 fa fa fa 01 fa fa fa 01 fa
  0x1c040650: fa fa fd fa fa fa fd fa fa fa fd fd fa fa 01 fa
  0x1c040660: fa fa 00 00 fa fa 01 fa fa fa fd fa fa fa fd fa
  0x1c040670: fa fa 01 fa fa fa 06 fa fa fa 00 00 fa fa 06 fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:   fa
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
  Shadow gap:  cc
==47084==ABORTING
MS: 0 ; base unit: 


artifact_prefix='./'; Test unit written to 
./crash-da39a3ee5e6b4b0d3255bfef95601890afd80709
Base64: 
zsh: abort  ./fuzz_target -dict=../Tests/fuzzing/python.dict -only_ascii=1

---

[issue46147] Support AddressSanitizer in Windows build

2021-12-21 Thread anthony shaw


anthony shaw  added the comment:

After some experimentation, this can be done if you enable ASAN in all projects 
except python3dll.vcxproj

I think it would make sense (if this were supported) to have a flag in 
build.bat like there is for pgo

`build.bat --asan`

--

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



[issue46147] Support AddressSanitizer in Windows build

2021-12-21 Thread anthony shaw


New submission from anthony shaw :

I'd like to compile my C-extensions with ASAN for testing in Windows, but they 
cannot be loaded as the host python.exe process needs to be compiled with ASAN. 

https://docs.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170#ide-msbuild

The EnableASAN flag would be a setting in vcxproj files within the PCBuild 
solution, and a flag in the build.bat to enable it.

--
components: Build, Windows
messages: 409006
nosy: anthonypjshaw, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Support AddressSanitizer in Windows build
type: enhancement

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



[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw


anthony shaw  added the comment:

Thanks! I didn't realise it applied the negative operator instead of loading 
the constant value.

--

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



[issue44692] Const folding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw


Change by anthony shaw :


--
title: Const unfolding in parser with negative numbers doesn't match float/int 
behaviour -> Const folding in parser with negative numbers doesn't match 
float/int behaviour

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



[issue44692] Const unfolding in parser with negative numbers doesn't match float/int behaviour

2021-07-20 Thread anthony shaw


New submission from anthony shaw :

Powers with negative bases do not observe the same rules that 
float_pow/long_pow do when it comes to returning negative results/

Example:

> -2 ** 2
-4

>>> x = -2
>>> y = 2
>>> x ** y
4

>>> -2. ** 2.
-4.0
>>> x = -2.
>>> y = 2.
>>> x ** y
4.0

Tested on 3.8, 3.9 and 3.10, they all have the same bug.

--
components: Parser
messages: 397922
nosy: anthonypjshaw, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Const unfolding in parser with negative numbers doesn't match float/int 
behaviour
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

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



[issue43567] regen.vcxproj cannot regenerate some necessary files

2021-03-31 Thread anthony shaw


anthony shaw  added the comment:

Guido, regen.vcxproj targets 142 as the SDK version, which is most likely a 
mistake.
The other projects are part of the main PCBuild.sln solution, which has a 
variable for the base SDK version.

If you need to change it quickly, you can either open it in VS and right click 
on the project and change the properties to an older SDK, or edit the vcxproj 
file itself.

I can make this change in a patch, but because its a standalone project, it 
doesn't share the base SDK version with the others.

I've reviewed Steve's patch and it would fix this because it changes regen into 
a build target instead of a build project, so it doesn't specify the SDK 
version at all.
Steve's implementation is also much, much cleaner!

--
nosy: +anthony shaw

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread anthony shaw


anthony shaw  added the comment:

Example script attached works perfectly on macOS 

> python3.9 test.py
[('default', 
'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'), 
('vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes')]
[('default', 
'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'), 
('vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes')]

--
nosy: +anthonypjshaw

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



[issue43292] xml.ElementTree iterparse filehandle left open

2021-02-21 Thread anthony shaw


anthony shaw  added the comment:

which version of Python were you doing this on?

The function in question is 
https://github.com/python/cpython/blob/master/Lib/xml/etree/ElementTree.py#L1233-L1278

--
nosy: +anthonypjshaw

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



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread anthony shaw


anthony shaw  added the comment:

thanks, it would be great if this were documented in the --help section like 
the other options which require a debug build (-X showrefcount)

--

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



[issue42521] Debug (-d) mode not working in 3.9

2020-12-01 Thread anthony shaw


New submission from anthony shaw :

I noticed since the new parser implementation, the debug mode in the tokeniser 
is no longer working.

This is the case for 3.9.0 and also 3.9.1rc1. Running python3.9 with a simple 
application like this:

 # Demo application
 def my_function():
   proceed

Does not output anything

> python3.9 -d ~/PycharmProjects/cpython-book-samples/13/test_tokens.py

> 
Produces no output

Whereas python3.10 (the latest alpha) outputs the expected results

--
messages: 382236
nosy: anthony shaw, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Debug (-d) mode not working in 3.9
versions: Python 3.9

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


Change by anthony shaw :


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

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


anthony shaw  added the comment:

No, this is intentional. sorry. closing
https://github.com/python/cpython/blob/34cd3e9f6a87f9c50edac893b0d5ae46c4e48ee3/Doc/library/dis.rst#L1194

--

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


anthony shaw  added the comment:

Or is this some sort of obscure month python reference!?

--

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



[issue41888] Duplicate Opcode value in master and 3.9rc2

2020-09-29 Thread anthony shaw


New submission from anthony shaw :

I noticed that HAVE_ARGUMENT and STORE_NAME have the same value (90) in 
Include/opcode.h in both the source code and in the 2bd31b5f revision 
(3.9.0rc2).

This must be creating some weird bugs.

https://github.com/python/cpython/blob/582aaf19e8b94a70c1f96792197770d604ba0fdf/Include/opcode.h#L70-L71

--
components: Interpreter Core
messages: 377688
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: Duplicate Opcode value in master and 3.9rc2
type: compile error
versions: Python 3.10, Python 3.9

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



[issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks

2020-05-18 Thread anthony shaw


Change by anthony shaw :


--
nosy: +anthonypjshaw
nosy_count: 4.0 -> 5.0
pull_requests: +19480
pull_request: https://github.com/python/cpython/pull/17753

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



[issue40490] peg_generator module has unused imports

2020-05-03 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +19202
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19891

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



[issue40490] peg_generator module has unused imports

2020-05-03 Thread anthony shaw


New submission from anthony shaw :

the tools/peg_generator package contains a number of unused imports

--
components: Interpreter Core
messages: 368005
nosy: anthonypjshaw, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: peg_generator module has unused imports
type: enhancement
versions: Python 3.9

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



[issue40432] Pegen regenerate project for Windows not working

2020-04-28 Thread anthony shaw


Change by anthony shaw :


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

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



[issue40432] Pegen regenerate project for Windows not working

2020-04-28 Thread anthony shaw


New submission from anthony shaw :

The additional tasks in the MSBuild project for pegen regeneration are not 
functional:

- Setting PYTHONPATH= inline cannot be done in Windows using that method
- The task does not inherit environment variables that way
- The path to the peg_generator module is in Unix path format

PR to follow

--
assignee: anthonypjshaw
components: Build
messages: 367613
nosy: anthonypjshaw, pablogsal
priority: normal
severity: normal
status: open
title: Pegen regenerate project for Windows not working
versions: Python 3.9

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



[issue39498] Signpost security considerations in library

2020-01-29 Thread anthony shaw


Change by anthony shaw :


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

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



[issue39498] Signpost security considerations in library

2020-01-29 Thread anthony shaw


New submission from anthony shaw :

Within the documentation, there are some really important security 
considerations for standard library modules. e.g. subprocess, ssl, pickle, xml.

There is currently no "index" of these, so you have to go hunting for them. 
They're easter eggs within the docs. There isn't a unique admonition type 
either, so you have to search across many criteria.

In particular for security researchers, it would be useful to consolidate and 
signpost these security best-practices in one index.

PR to follow,

--
assignee: docs@python
components: Documentation
messages: 361009
nosy: anthonypjshaw, docs@python
priority: normal
severity: normal
status: open
title: Signpost security considerations in library
type: enhancement

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



[issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used

2020-01-03 Thread anthony shaw


anthony shaw  added the comment:

Resolved by another bpo

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

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



[issue39186] Windows installer instructions refer to mercurial

2020-01-01 Thread anthony shaw


New submission from anthony shaw :

Very minor, but the instructions in Tools/msi/readme.txt tell the user to 
ensure hg.exe is in PATH, but the scripts use Git.

--
components: Windows
messages: 359179
nosy: anthonypjshaw, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows installer instructions refer to mercurial

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



[issue39186] Windows installer instructions refer to mercurial

2020-01-01 Thread anthony shaw


Change by anthony shaw :


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

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



[issue39185] Add quiet and detailed verbosity levels to build.bat

2020-01-01 Thread anthony shaw


Change by anthony shaw :


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

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



[issue39185] Add quiet and detailed verbosity levels to build.bat

2020-01-01 Thread anthony shaw


New submission from anthony shaw :

The build.bat script (windows build) has a flag for verbose, which sets the 
msbuild verbosity level to normal.
The default level is minimal.

The quiet and detailed levels would also be useful for development.

--
components: Windows
messages: 359178
nosy: anthonypjshaw, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add quiet and detailed verbosity levels to build.bat
type: enhancement

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



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


anthony shaw  added the comment:

This comes down to a logic bug in detect_tkinter_darwin(), shown in 
https://github.com/python/cpython/pull/17753/files#r361956102

--

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



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


Change by anthony shaw :


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

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



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


anthony shaw  added the comment:

I also can't see how this condition would ever match, since macosx_sdk_root() 
is not in the list being iterated upon,
https://github.com/python/cpython/blob/master/setup.py#L1774

--

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



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


Change by anthony shaw :


--
nosy: +ned.deily

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



[issue39162] setup.py not picking up tkinter headers

2019-12-30 Thread anthony shaw


New submission from anthony shaw :

./configure && make -j4 is returning:

Failed to build these modules:
_tkinter   

I'm running macOS 10.15.2, with the SDK installed using `xcode-select 
--install` (no funny business)

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/

xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

If I debug setup.py, I can see it's eagerly returning the wrong path (/System)

On a REPL, if I do:
>>> import setup
>>> setup.macosx_sdk_root()
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

So the path is correct, but I can see in setup.py that detect_tkinter_darwin() 
will break inside the loop if 
/System/Library/Frameworks/Tk.framework/Versions/Current  exists (which it 
does), but it doesn't contain the headers, it contains 3 directories:

Resources  Tk _CodeSignature

I think detect_tkinter_darwin should be updated so that framework_dirs scans 
macosx_sdk_root first, but I don't know what other scenarios this might break.

I'd be happy to submit a patch for my scenario but it looks like this whole 
function needs tests so each platform change and scenario as they come up. 
There's loads of other issues on BPO related.

--
components: Build
messages: 359026
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: setup.py not picking up tkinter headers
type: compile error

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



[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw


Change by anthony shaw :


--
nosy: +twouters

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



[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw


Change by anthony shaw :


--
nosy: +anthonypjshaw

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



[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw


Change by anthony shaw :


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

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



[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw


anthony shaw  added the comment:

Updated version based on principles:

- Should not specify --with(out) in help string
- Sentences should start with lowercase (as autoconf generates the builtin 
string with lower case)
- --with-xyx=VALUE will be described as "overriding"
- --with-xyz will be described as "enabling" said feature
- Mac flags should have the same descriptions as what is in Mac/README.rst
- default value should be in brackets (if known)
- Enumerated options should be shown as =VAL1|VAL2 or [=VAL1|VAL2] if optional

 Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE   do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-universalsdk[=SDKDIR]
  create a universal binary build. SDKDIR specifies
  which macOS SDK should be used to perform the build,
  see Mac/README.rst. (default is no)
  --enable-framework[=INSTALLDIR]
  create a Python.framework rather than a traditional
  Unix install. optional INSTALLDIR specifies the
  installation path. see Mac/README.rst (default is
  no)
  --enable-shared enable building a shared Python library (default is
  no)
  --enable-profiling  enable C-level code profiling with gprof (default is
  no)
  --enable-optimizations  enable expensive, stable optimizations (PGO, etc.)
  (default is no)
  --enable-loadable-sqlite-extensions
  support loadable extensions in _sqlite module, see
  Doc/library/sqlite3.rst (default is no)
  --enable-ipv6   enable ipv6 (with ipv4) support, see
  Doc/library/socket.rst (default is yes if supported)
  --enable-big-digits[=15|30]
  use big digits (30 or 15 bits) for Python longs
  (default is no)]

 Optional Packages:
  --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
  --without-PACKAGE   do not use PACKAGE (same as --with-PACKAGE=no)
  --with-universal-archs=ARCH
  specify the kind of universal binary that should be
  created. this option is only valid when
  --enable-universalsdk is set; options are:
  ("32-bit", "64-bit", "3-way", "intel", "intel-32",
  "intel-64", or "all") see Mac/README.rst
  --with-framework-name=FRAMEWORK
  specify the name for the python framework on macOS
  only valid when --enable-framework is set. see
  Mac/README.rst (default is 'Python')
  --with-cxx-main[=COMPILER]
  compile main() and link Python executable with C++
  compiler specified in COMPILER (default is $CXX)
  --with-suffix=SUFFIXset executable suffix to SUFFIX (default is '.exe')
  --with-pydebug  build with Py_DEBUG defined (default is no)
  --with-trace-refs   enable tracing references for debugging purpose
  (default is no)
  --with-assertions   build with C assertions enabled (default is no)
  --with-lto  enable Link-Time-Optimization in any build (default
  is no)
  --with-hash-algorithm=[fnv|siphash24]
  select hash algorithm for use in Python/pyhash.c
  (default is SipHash24)
  --with-address-sanitizer
  enable AddressSanitizer memory allocation
  controller, 'asan' (default is no)
  --with-memory-sanitizer enable MemorySanitizer memory allocation controller,
  'msan' (default is no)
  --with-undefined-behavior-sanitizer
  enable UndefinedBehaviorSanitizer memory allocation
  controller, 'ubsan' (default is no)
  --with-libs='lib1 ...'  link against additional libs (default is no)
  --with-system-expat build pyexpat module using an installed system expat
  library, see Doc/library/pyexpat.rst (default is no)
  --with-system-ffi   build _ctypes module using an installed ffi library,
  see Doc/library/ctypes.rst (default is system
  dependant)
  --with-system-libmpdec  build _decimal module using an installed libmpdec
  library, see Doc/library/decimal.rst (default is no)
  --with-tcltk-includes='-I...'
  override search for Tcl and Tk include files
  --with-tcltk-libs='-L...'
  override search for Tcl and Tk 

[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw


anthony shaw  added the comment:

Current 

 Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE   do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-universalsdk[=SDKDIR]
  Build fat binary against Mac OS X SDK
  --enable-framework[=INSTALLDIR]
  Build (MacOSX|Darwin) framework
  --enable-shared disable/enable building shared python library
  --enable-profiling  enable C-level code profiling
  --enable-optimizations  Enable expensive, stable optimizations (PGO, etc).
  Disabled by default.
  --enable-loadable-sqlite-extensions
  support loadable extensions in _sqlite module
  --enable-ipv6   Enable ipv6 (with ipv4) support
  --disable-ipv6  Disable ipv6 support
  --enable-big-digits[=BITS]
  use big digits for Python longs [[BITS=30]]

 Optional Packages:
  --with-PACKAGE[=ARG]use PACKAGE [ARG=yes]
  --without-PACKAGE   do not use PACKAGE (same as --with-PACKAGE=no)
  --with-universal-archs=ARCH
  select architectures for universal build ("32-bit",
  "64-bit", "3-way", "intel", "intel-32", "intel-64",
  or "all")
  --with-framework-name=FRAMEWORK
  specify an alternate name of the framework built
  with --enable-framework
  --with-cxx-main=
  compile main() and link python executable with C++
  compiler
  --with-suffix=.exe  set executable suffix
  --with-pydebug  build with Py_DEBUG defined
  --with-trace-refs   enable tracing references for debugging purpose
  --with-assertions   build with C assertions enabled
  --with-lto  Enable Link Time Optimization in any build. Disabled
  by default.
  --with-hash-algorithm=[fnv|siphash24]
  select hash algorithm
  --with-address-sanitizer
  enable AddressSanitizer (asan)
  --with-memory-sanitizer enable MemorySanitizer (msan)
  --with-undefined-behavior-sanitizer
  enable UndefinedBehaviorSanitizer (ubsan)
  --with-libs='lib1 ...'  link against additional libs
  --with-system-expat build pyexpat module using an installed expat
  library
  --with-system-ffi   build _ctypes module using an installed ffi library
  --with-system-libmpdec  build _decimal module using an installed libmpdec
  library
  --with-tcltk-includes='-I...'
  override search for Tcl and Tk include files
  --with-tcltk-libs='-L...'
  override search for Tcl and Tk libs
  --with-dbmliborder=db1:db2:...
  order to check db backends for dbm. Valid value is a
  colon separated string with the backend names
  `ndbm', `gdbm' and `bdb'.
  --with(out)-doc-strings disable/enable documentation strings
  --with(out)-pymallocdisable/enable specialized mallocs
  --with(out)-c-locale-coercion
  disable/enable C locale coercion to a UTF-8 based
  locale
  --with-valgrind Enable Valgrind support
  --with(out)-dtrace  disable/enable DTrace support
  --with-libm=STRING  math library
  --with-libc=STRING  C library
  --with(out)-computed-gotos
  Use computed gotos in evaluation loop (enabled by
  default on supported compilers)
  --with(out)-ensurepip=[=upgrade]
  "install" or "upgrade" using bundled pip
  --with-openssl=DIR  root of the OpenSSL directory
  --with-ssl-default-suites=[python|openssl|STRING]
  Override default cipher suites string, python: use
  Python's preferred selection (default), openssl:
  leave OpenSSL's defaults untouched, STRING: use a
  custom string, PROTOCOL_SSLv2 ignores the setting

--

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



[issue39160] ./configure --help has inconsistencies in style

2019-12-29 Thread anthony shaw


New submission from anthony shaw :

I've noticed that ./configure --help is inconsistent.

- The way default values are shared
- The way enumerated 
- The verbs used (e.g. enable, set)
- Some --with-xyx and some --with(out-xyz)
- Some start with capitals, others don't

Also, many of the flags could use additional explanation as to their purpose, 
or reference the rST file in the doc that explains what they do.

PR to follow

--
components: Build
messages: 359014
nosy: anthony shaw
priority: normal
severity: normal
status: open
title: ./configure --help has inconsistencies in style

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



[issue39144] Align ctags and etags targets and include Python stdlib

2019-12-27 Thread anthony shaw


Change by anthony shaw :


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

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



[issue39144] Align ctags and etags targets and include Python stdlib

2019-12-27 Thread anthony shaw


anthony shaw  added the comment:

Also, make tags will reset the "tags" file, whereas, make TAGS will not.
If you ran "make tags" then "make TAGS" you will have a corrupt etags file

--

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



[issue39144] Align ctags and etags targets and include Python stdlib

2019-12-27 Thread anthony shaw


New submission from anthony shaw :

make tags will include

- Modules/_ctypes/

where as make TAGS will not.

Also, neither include the Python source files for the standard library, which 
both etags and ctags are capable of handling.

PR to follow

--
components: Build
messages: 358917
nosy: anthony shaw
priority: normal
severity: normal
status: open
title: Align ctags and etags targets and include Python stdlib
type: enhancement

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-13 Thread anthony shaw


anthony shaw  added the comment:

If you can write a test similar to the AnotherLeak.test_callback test case, and 
commit that first.

It will show in the CI/CD log as failed and verify the issue (incase it comes 
up in PR review)

Then add another commit with the patch itself and we should see the CI/CD pass.

Please follow the PR guide if this is your first PR to CPython 
https://devguide.python.org/pullrequest/

--

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw


anthony shaw  added the comment:

Thanks Eryk that saved a lot of debugging. 

dgelessus - if you want to write a patch for CPython am happy to take you 
through this and get it over the line. 

Else: am Happy to write a test against the gc counter and a patch for this

--

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw


anthony shaw  added the comment:

In the stack it's calling none_dealloc() which should never happen.

Assume this is being triggered by ctypes PyCFuncPtr_call.

The stacktrace I'm getting comes after the double decref so it's not showing 
the root cause. Someone who knows ctypes better might be able to help

--

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw


anthony shaw  added the comment:

Full trace for reference:

(lldb) bt all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x7fff5984f2c6 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x7fff59904bf1 libsystem_pthread.dylib`pthread_kill + 284
frame #2: 0x7fff597b96a6 libsystem_c.dylib`abort + 127
frame #3: 0x000100236c14 
python.exe`fatal_error(prefix=0x, msg="_PyObject_AssertFailed", 
status=-1) at pylifecycle.c:2128:9
frame #4: 0x000100236a5e 
python.exe`Py_FatalError(msg="_PyObject_AssertFailed") at pylifecycle.c:2138:5
frame #5: 0x0001000b49f4 
python.exe`_PyObject_AssertFailed(obj=0x00010038a2c0, 
expr=0x, msg="object has negative ref count", 
file="Objects/typeobject.c", line=3187, function="_Py_NegativeRefcount") at 
object.c:2163:5
frame #6: 0x0001000b4a44 
python.exe`_Py_NegativeRefcount(filename="Objects/typeobject.c", lineno=3187, 
op=0x00010038a2c0) at object.c:208:5
frame #7: 0x0001000d2bad 
python.exe`_Py_DECREF(filename="Objects/typeobject.c", lineno=3187, 
op=0x00010038a2c0) at object.h:468:13
frame #8: 0x0001000d5889 
python.exe`_PyType_Lookup(type=0x0001003e4ad0, name=0x00010064bba0) at 
typeobject.c:3187:9
frame #9: 0x0001000b731f 
python.exe`_PyObject_GenericGetAttrWithDict(obj=0x000100645dd0, 
name=0x00010064bba0, dict=0x, suppress=0) at 
object.c:1221:13
frame #10: 0x0001000b7243 
python.exe`PyObject_GenericGetAttr(obj=0x000100645dd0, 
name=0x00010064bba0) at object.c:1309:12
frame #11: 0x0001000b69a8 
python.exe`PyObject_GetAttr(v=0x000100645dd0, name=0x00010064bba0) at 
object.c:916:16
frame #12: 0x000100301599 
python.exe`textiowrapper_closed_get(self=0x0001006aba50, 
context=0x) at textio.c:3015:12
frame #13: 0x00010004eedf 
python.exe`getset_get(descr=0x00010122f210, obj=0x0001006aba50, 
type=0x0001003e7280) at descrobject.c:158:16
frame #14: 0x0001000b738c 
python.exe`_PyObject_GenericGetAttrWithDict(obj=0x0001006aba50, 
name=0x0001016f00a8, dict=0x, suppress=0) at 
object.c:1228:19
frame #15: 0x0001000b7243 
python.exe`PyObject_GenericGetAttr(obj=0x0001006aba50, 
name=0x0001016f00a8) at object.c:1309:12
frame #16: 0x0001000b69a8 
python.exe`PyObject_GetAttr(v=0x0001006aba50, name=0x0001016f00a8) at 
object.c:916:16
frame #17: 0x0001000b68e4 
python.exe`PyObject_GetAttrString(v=0x0001006aba50, name="closed") at 
object.c:821:11
frame #18: 0x0001002399cc 
python.exe`file_is_closed(fobj=0x0001006aba50) at pylifecycle.c:1074:21
frame #19: 0x000100235f64 python.exe`flush_std_files at 
pylifecycle.c:1094:45
frame #20: 0x000100236bfd 
python.exe`fatal_error(prefix=0x, msg="deallocating None", 
status=-1) at pylifecycle.c:2116:9
frame #21: 0x000100236a5e python.exe`Py_FatalError(msg="deallocating 
None") at pylifecycle.c:2138:5
frame #22: 0x0001000b8318 
python.exe`none_dealloc(ignore=0x00010038a2c0) at object.c:1551:5
frame #23: 0x0001000ba6ba python.exe`_Py_Dealloc(op=0x00010038a2c0) 
at object.c:2178:5
frame #24: 0x0001001dec2b 
python.exe`_Py_DECREF(filename="Python/ceval.c", lineno=1200, 
op=0x00010038a2c0) at object.h:473:9
frame #25: 0x0001001cd444 
python.exe`_PyEval_EvalFrameDefault(f=0x00010130b860, throwflag=0) at 
ceval.c:1200:13
frame #26: 0x0001001cc277 
python.exe`PyEval_EvalFrameEx(f=0x00010130b860, throwflag=0) at 
ceval.c:625:12
frame #27: 0x0001001e3347 
python.exe`_PyEval_EvalCodeWithName(_co=0x00010146b880, 
globals=0x000101246e50, locals=0x000101246e50, args=0x, 
argcount=0, kwnames=0x, kwargs=0x, kwcount=0, 
kwstep=2, defs=0x, defcount=0, kwdefs=0x, 
closure=0x, name=0x, 
qualname=0x) at ceval.c:4036:14
frame #28: 0x0001001cc1f0 
python.exe`PyEval_EvalCodeEx(_co=0x00010146b880, 
globals=0x000101246e50, locals=0x000101246e50, args=0x, 
argcount=0, kws=0x, kwcount=0, defs=0x, 
defcount=0, kwdefs=0x, closure=0x) at 
ceval.c:4065:12
frame #29: 0x0001001cc04e 
python.exe`PyEval_EvalCode(co=0x00010146b880, globals=0x000101246e50, 
locals=0x000101246e50) at ceval.c:602:12
frame #30: 0x000100249f55 
python.exe`run_eval_code_obj(co=0x00010146b880, globals=0x000101246e50, 
locals=0x000101246e50) at pythonrun.c:1047:9
frame #31: 0x0001002483f7 python.exe`run_mod(mod=0x000102017438, 
filename=0x000101495d

[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw


anthony shaw  added the comment:

>From lldb 
(lldb) run ~/cpython/test_gc_ctypes.py
Process 20059 launched: '/Users/anthonyshaw/CLionProjects/cpython/python.exe' 
(x86_64)
Fatal Python error: deallocating None

Current thread 0x0001005c85c0 (most recent call first):
  File "/Users/anthonyshaw/cpython/test_gc_ctypes.py", line 7 in 
Objects/typeobject.c:3187: _Py_NegativeRefcount: Assertion failed: object has 
negative ref count
Enable tracemalloc to get the memory block allocation traceback

object  : 
type: NoneType
refcount: -1
address : 0x10038a2c0
Process 20059 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x7fff5984f2c6 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff5984f2c6 <+10>: jae0x7fff5984f2d0; <+20>
0x7fff5984f2c8 <+12>: movq   %rax, %rdi
0x7fff5984f2cb <+15>: jmp0x7fff59849457; cerror_nocancel
0x7fff5984f2d0 <+20>: retq   
Target 0: (python.exe) stopped.

--
Added file: https://bugs.python.org/file48326/test_gc_ctypes.py

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-11 Thread anthony shaw

anthony shaw  added the comment:

The documentation says:

>>
Note Make sure you keep references to CFUNCTYPE() objects as long as they are 
used from C code. ctypes doesn’t, and if you don’t, they may be garbage 
collected, crashing your program when a callback is made.
Also, note that if the callback function is called in a thread created outside 
of Python’s control (e.g. by the foreign code that calls the callback), ctypes 
creates a new dummy Python thread on every invocation. This behavior is correct 
for most purposes, but it means that values stored with threading.local will 
not survive across different callbacks, even when those calls are made from the 
same C thread.

But that doesn't describe the situation you've shared. I'll continue to look 
into the ctypes module

--

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-10 Thread anthony shaw


anthony shaw  added the comment:

Thanks, I'll check this out

--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

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



[issue36882] 在ctypes里调用C库返回c_char_p类型时的问题

2019-05-10 Thread anthony shaw


anthony shaw  added the comment:

"When the C library is called in ctypes to return the c_char_p type, the 
problem that only the string before \0 can be obtained when the string contains 
\\0"

This function is specifically for null-terminated strings (\0), please could 
you be more specific about the expected behaviour and why this is a bug?

https://docs.python.org/2/library/ctypes.html#ctypes.c_char_p

--
nosy: +anthonypjshaw

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



[issue36883] 在ctypes里调用C库返回c_char_p类型时的问题

2019-05-10 Thread anthony shaw


anthony shaw  added the comment:

Closing as duplicate of 36882

--
nosy: +anthonypjshaw

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



[issue36883] 在ctypes里调用C库返回c_char_p类型时的问题

2019-05-10 Thread anthony shaw


Change by anthony shaw :


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

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



[issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets

2019-05-09 Thread anthony shaw


anthony shaw  added the comment:

The existing tests in place add the null-termination bytes in the test string:

def testLinuxAbstractNamespace(self):
address = b"\x00python-test-hello\x00\xff"
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s1:
s1.bind(address)
s1.listen()
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s2:
s2.connect(s1.getsockname())
with s1.accept()[0] as s3:
self.assertEqual(s1.getsockname(), address)
self.assertEqual(s2.getpeername(), address)

So that answers your initial question, it does work, but you have to add the 
null termination bytes in the address string.

This isn't documented, so the documentation needs fixing.

--

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



[issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets

2019-05-09 Thread anthony shaw


Change by anthony shaw :


--
versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.7

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



[issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets

2019-05-09 Thread anthony shaw

anthony shaw  added the comment:

thanks, your code example zero-pads the socket address, and looking at the 
socketmodule.c code it does some padding under certain circumstances.

https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1318-L1330

The Unix man page specify the same requirement you've noticed:

 When binding a socket to a pathname, a few rules should be observed
   for maximum portability and ease of coding:

   *  The pathname in sun_path should be null-terminated.

   *  The length of the pathname, including the terminating null byte,
  should not exceed the size of sun_path.

   *  The addrlen argument that describes the enclosing sockaddr_un
  structure should have a value of at least:

  offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1

  or, more simply, addrlen can be specified as sizeof(struct sock‐
  addr_un).

--

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



[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-05-09 Thread anthony shaw


Change by anthony shaw :


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

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



[issue35668] Improve test coverage for idlelib

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
nosy: +anthonypjshaw

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



[issue36500] Add "regen-*" equivalent projects for Windows builds

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

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



[issue36551] Optimize list comprehensions with preallocate size and protect against overflow

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

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



[issue36552] Replace OverflowError with ValueError when calculating length of range objects > PY_SIZE_MAX

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
assignee:  -> anthonypjshaw
nosy: +anthonypjshaw

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



[issue36862] Add Visual Studio 2019 support to PCBuild/env.bat

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
nosy: +steve.dower
stage: patch review -> 

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



[issue36862] Add Visual Studio 2019 support to PCBuild/env.bat

2019-05-08 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +13126
stage:  -> patch review

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



[issue36862] Add Visual Studio 2019 support to PCBuild/env.bat

2019-05-08 Thread anthony shaw


New submission from anthony shaw :

The PCBuild tool should support VS2019 but default to 2017 as per documentation.
PR to follow.

--
assignee: anthonypjshaw
components: Build
messages: 341963
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: Add Visual Studio 2019 support to PCBuild/env.bat
type: enhancement
versions: Python 3.8

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



[issue24263] unittest cannot load module whose name starts with Unicode

2019-05-08 Thread anthony shaw


anthony shaw  added the comment:

thanks, will wait for a review from Serhiy, Rbcollins or ezio

--

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



[issue12188] PEP 7 (or guide) add C style policies and explanation

2019-05-08 Thread anthony shaw


anthony shaw  added the comment:

Hi,

This discussion came to a stop, but it doesn't seem conclusive.

PEP discussions are now in GitHub on https://github.com/python/peps/issues so 
I'm going to close this BPO issue.

There is no additional section in PEP 7 for this level of detail, there is also 
no tooling in place (afaik) to retroactively apply or inspect these types of 
issues, so this would need to be discussed in the PEP issue,

--
nosy: +anthonypjshaw
stage:  -> resolved
status: open -> closed

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



[issue36814] posix_spawn explicit file_actions=None throws error

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

After patch:

Python 3.8.0a3+ (heads/31968-dirty:c664b342a4, May  6 2019, 18:06:21) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None)
17300
>>> anthonyshaw

--

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



[issue36814] posix_spawn explicit file_actions=None throws error

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Issue is in parse_file_actions

parse_file_actions(PyObject *file_actions,
   posix_spawn_file_actions_t *file_actionsp,
   PyObject *temp_buffer)
{
PyObject *seq;
PyObject *file_action = NULL;
PyObject *tag_obj;

seq = v(file_actions,
  "file_actions must be a sequence or None");
if (seq == NULL) {
return -1;
}

PySequence_Fast will raise a TypeError if PyObject_GetIter fails.

--
assignee:  -> anthonypjshaw

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



[issue36814] posix_spawn explicit file_actions=None throws error

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Raised a fix in GH-13144

--
stage: patch review -> 

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



[issue36814] posix_spawn explicit file_actions=None throws error

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +13057
stage:  -> patch review

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



[issue36814] posix_spawn explicit file_actions=None throws error

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Verified on master
Python 3.8.0a3+ (heads/bpo-28367:373c7aa098, May  6 2019, 17:34:39) 
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'os' is not defined
>>> import os
>>> os.posix_spawnp('whoami', ['whoami'], os.environ, file_actions=None)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: file_actions must be a sequence or None

--
nosy: +anthonypjshaw

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



[issue36819] Crash during encoding using UTF-16/32 and custom error handler

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Easily reproduced on master, thanks

(lldb) run encode_crash.py
Process 14743 launched: '/Users/anthonyshaw/repo/cpython/python.exe' (x86_64)
Objects/unicodeobject.c:448: _PyUnicode_CheckConsistency: Assertion 
"((PyObject*)(op))->ob_type))->tp_flags & ((1UL << 28))) != 0)" failed
Enable tracemalloc to get the memory block allocation traceback

object  : Process 14743 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS 
(code=EXC_I386_GPFLT)
frame #0: 0x0001000b5c15 python.exe`PyObject_Repr(v=0x000101376f90) 
at object.c:535:11
   532 infinitely. */
   533  if (Py_EnterRecursiveCall(" while getting the repr of an object"))
   534  return NULL;
-> 535  res = (*v->ob_type->tp_repr)(v);
   536  Py_LeaveRecursiveCall();
   537  if (res == NULL)
   538  return NULL;

--
nosy: +anthonypjshaw

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



[issue36821] Termios module largely untested

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

This could be a good issue for the PyCon sprints, otherwise I'm happy to 
implement it

--

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



[issue36821] Termios module largely untested

2019-05-06 Thread anthony shaw


New submission from anthony shaw :

I noticed that the termios.c module is largely untested.

There is some coverage via test_pty, test_ioctl and test_getpass, but there is 
nothing to cover regression and the behaviours in the module functions.

Tests are required for:
- termios.tcgetattr()
- termios.tcsetattr()
- termios.tcsendbreak()
- termios.tcdrain()
- termios.tcflush()
- termios.tcflow()

--
assignee: anthonypjshaw
components: Tests
messages: 341656
nosy: anthonypjshaw
priority: normal
severity: normal
status: open
title: Termios module largely untested
type: enhancement
versions: Python 3.8

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



[issue28367] Add more standard baud rate constants to "termios"

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Converted the original patch as a PR GH-13142 this seems like a good idea and 
an easy change

--
nosy: +anthonypjshaw

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



[issue28367] Add more standard baud rate constants to "termios"

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
pull_requests: +13055

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



[issue27534] IDLE: Reduce number and time for user process imports

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

It would be great for this issue to be revisited, there has been some further 
interest from users.

--
nosy: +anthonypjshaw

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



[issue25251] Unknown MS Compiler version 1900

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Closing as 3rd party feature for setuptools

--
nosy: +anthonypjshaw
resolution:  -> third party
stage:  -> resolved
status: open -> closed

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



[issue28775] Option to set startup directory in IDLE

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Hi Nofar are you still interested on working on this request?

--
nosy: +anthonypjshaw

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Added a PR for the documentation clarification.

--
nosy: +anthonypjshaw

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
pull_requests: +13053

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



[issue24939] Remove unicode_format.h from stringlib

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

The code is mostly:

FieldNameIterator * related functions
FormatterIterator * related functions
MarkupIterator * related functions

There are a few other utility methods in there as well

--

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



[issue34368] ftplib __init__ function can't handle 120 or 4xy reply when connect to the server

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
nosy: +giampaolo.rodola

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



[issue32971] Docs on unittest.TestCase.assertRaises() should clarify context manager details

2019-05-06 Thread anthony shaw


Change by anthony shaw :


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

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



[issue32971] Docs on unittest.TestCase.assertRaises() should clarify context manager details

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
pull_requests:  -9605

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



[issue25541] Wrong usage of sockaddr_un struct for abstract namespace unix sockets

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

hi, which version of Python were you using to do this? Please could you provide 
the full code snippet to reproduce the issue.

The following example binds to the correct namespace

  from socket import *

  sock = socket(AF_UNIX, SOCK_STREAM)

  sock.bind("\0/var/tmp/sock.tmp")

--
nosy: +anthonypjshaw, scoder

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



[issue33971] os.mknod is subject to "umask"

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

NB: This issue would be good for PyCon sprints

--
nosy: +anthonypjshaw

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



[issue33971] os.mknod is subject to "umask"

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
assignee: docs@python -> Mariatta
nosy: +Mariatta

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



[issue24939] Remove unicode_format.h from stringlib

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

> The things that are in this file but are unrelated to unicodeobject.c 
 are the support routines for implementing string.Formatter.

I'm not sure which functions that relates to, if you could let me know I'd be 
happy to add those to the PR.

--

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



[issue24939] Remove unicode_format.h from stringlib

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +13050
stage:  -> patch review

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



[issue24939] Remove unicode_format.h from stringlib

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Eric, there have been further changes to Objects/stringlib/unicode_format.h 
since this original note, I've raised a PR with the intent of your note from 
2015.

There also hasn't been any change to the situation, unicode_format.h is only 
used in unicodeobject.c stil.

--
nosy: +anthonypjshaw
stage: patch review -> 

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



[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

The assertions in the attached test still fail on master (3.8a3), so this still 
applies. 

Michael, are you able to look at this, the code hasn't changed since the 
original PEP417 implementation, which doesn't specify if this behaviour should 
be supported.

The documentation does not specify that this is supported also, so i suspect 
this is an enhancement request.

elif result is None:
wraps = None
if self._mock_wraps is not None:
#  should we get the attribute without triggering code
# execution?
wraps = getattr(self._mock_wraps, name)

result = self._get_child_mock(
parent=self, name=name, wraps=wraps, _new_name=name,
_new_parent=self
)

--
nosy: +anthonypjshaw

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



[issue13582] IDLE and pythonw.exe stderr problem

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Revisiting this issue as it's still open. The original patch was for 3.3a0, 
there have been many changes to both IDLE and the Windows build since, 
including the recent IDLE entry point in the new Windows installer.

Steve, Terry, please could you review to check if this issue is still relevant 
or can be closed off.

--
nosy: +anthonypjshaw, cheryl.sabella, steve.dower

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



[issue26278] BaseTransport.close() does not trigger connection_lost()

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

This issue was never responded to, are you still having this issue? Which 
version of CPython are you using and can you please provide steps to reproduce 
the problem.

--
nosy: +anthonypjshaw

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



[issue28742] argparse.ArgumentDefaultsHelpFormatter sometimes provides inaccurate documentation of defaults, so they should be overrideable

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Hi Peter, this proposal would be easier to review as a GitHub Pull Request.

--
nosy: +anthonypjshaw

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



[issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Submitted PR to add the deprecation warning, since this initial discussion, 
some other functions also raise DeprecationWarning's in code.

--
nosy: +anthonypjshaw

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



[issue34946] inspect.getcallargs is marked as deprecated in documentation, but doesn't issue a DeprecationWarning when used

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
keywords: +patch
pull_requests: +13040
stage:  -> patch review

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



[issue31603] Please add argument to override stdin/out/err in the input builtin

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

The discussion on python-ideas has some unresolved questions. Wren, did you get 
a definitive answer on this idea?

--
nosy: +anthonypjshaw

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



[issue5243] Missing dependency in distutils build

2019-05-06 Thread anthony shaw


Change by anthony shaw :


--
nosy: +dstufft, ncoghlan

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



[issue28540] math.degrees(sys.float_info.max) should throw an OverflowError exception

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Francisco, I recommend converting the patch into a GitHub pull request to make 
it easier to code review.

Mark, Raymond, please could you re-review this patch.

--
nosy: +anthonypjshaw, rhettinger

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



  1   2   >