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 Enabl
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
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
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
Change by anthony shaw :
--
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.org/issue46707>
___
___
Python-bugs-list mailin
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
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
>>&
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:/
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/is
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
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
<h
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/issu
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
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
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-x
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/issu
Change by anthony shaw :
--
nosy: +anthonypjshaw
___
Python tracker
<https://bugs.python.org/issue39160>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by anthony shaw :
--
nosy: +twouters
___
Python tracker
<https://bugs.python.org/issue39160>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by anthony shaw :
--
nosy: +ned.deily
___
Python tracker
<https://bugs.python.org/issue39162>
___
___
Python-bugs-list mailing list
Unsubscribe:
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)
/Libr
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
&
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/issu
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/issue39
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
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/issu
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
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/issu
anthony shaw added the comment:
Resolved by another bpo
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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/issu
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
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/issu
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
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/issu
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/issu
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
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/issue42
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
<ht
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/officeDocu
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
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/issue41
anthony shaw added the comment:
Or is this some sort of obscure month python reference!?
--
___
Python tracker
<https://bugs.python.org/issue41888>
___
___
Pytho
Change by anthony shaw :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41888>
___
___
Python-bugs-list
New submission from anthony shaw :
The documentation for pathlib PurePath.match(needle) says it accepts
"glob-style pattern.".
For an absolute path with a recursive pattern (**) it doesn't match correct for
more than 1 directory level.
All of the assertions in the attached f
Change by anthony shaw :
--
keywords: +patch
pull_requests: +10410
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35488>
___
___
Py
anthony shaw added the comment:
Raised a PR for the test. Will look into doc PR
--
___
Python tracker
<https://bugs.python.org/issue35488>
___
___
Python-bug
anthony shaw added the comment:
Yes, this is similar to https://bugs.python.org/issue29249
In that issue, it suggests this feature is not supported, but that is neither
documented, nor tested.
--
nosy: -serhiy.storchaka
___
Python tracker
<ht
New submission from anthony shaw :
idlelib is one of the lesser-tested libraries in cpython:
https://codecov.io/gh/python/cpython/tree/master/Lib/idlelib
Raising this issue and also volunteering to extend the test module to get
coverage across major behaviours and functions that are missing
anthony shaw added the comment:
thanks terry,
Some great pointers there, I'll review the exiting work and the README doc.
With regards to my experience, I have quite extensive experience with python
testing. Most of which would be open-source on my Github profile
https://githu
anthony shaw added the comment:
I was looking at the debugger.py module as being a good place the start,
writing test cases for the Idb, Debugger, StackViewer and NamespaceViewer by
patching out the dependant components (bdb, Idb, etc.
I might start there, raise a PR against it and do a
anthony shaw added the comment:
thanks Cheryl,
here's my branch https://github.com/tonybaloney/cpython/tree/idlelib_tests
I've already seen some code which is 17 years old!
--
___
Python tracker
<https://bugs.python.o
Change by anthony shaw :
--
keywords: +patch
pull_requests: +10913
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35668>
___
___
Py
Change by anthony shaw :
--
keywords: +patch, patch
pull_requests: +10913, 10914
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by anthony shaw :
--
keywords: +patch, patch, patch, patch
pull_requests: +10913, 10914, 10915, 10916
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by anthony shaw :
--
keywords: +patch, patch, patch
pull_requests: +10913, 10914, 10916
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by anthony shaw :
--
keywords: +patch
pull_requests: +10971
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by anthony shaw :
--
pull_requests: +10972
___
Python tracker
<https://bugs.python.org/issue35668>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by anthony shaw :
--
pull_requests: +10972, 10973
___
Python tracker
<https://bugs.python.org/issue35668>
___
___
Python-bugs-list mailing list
Unsub
New submission from anthony shaw:
This is related to issue26188,
Using await in a simple statement (outside of an async def method) raises
SyntaxError with the unhelpful message "invalid syntax".
It seems obvious once you've read PEP492 in detail, but I think that as more
and
anthony shaw added the comment:
yey! I figured it out!!
--
___
Python tracker
<http://bugs.python.org/issue30029>
___
___
Python-bugs-list mailing list
Unsub
Changes by anthony shaw :
--
pull_requests: +1215
___
Python tracker
<http://bugs.python.org/issue30029>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by anthony shaw :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue30029>
___
___
Python-bugs-list
New submission from anthony shaw :
If for whatever reason, Py_Initialize() has not been run or failed to run, any
call to Py_CompileStringFlags will call PyUnicode_DecodeFSDefault and the
reference to interp will be NULL.
There is currently no null reference check in
anthony shaw added the comment:
This applies to PyUnicode_EncodeFSDefault as well, it has the same issue
--
___
Python tracker
<https://bugs.python.org/issue36
anthony shaw added the comment:
I'm expecting a "this is not a bug, why would the interpreter not be
initialized", but it would be nice to get a friendly error message since this
is a public API.
IF so, am also happy to submit
anthony shaw added the comment:
This is because PyUnicode_DecodeFSDefaultAndSize calls
_PyInterpreterState_GET_UNSAFE(), which already documents the potential NULL
return value.
/* Get the current interpreter state.
The macro is unsafe: it does not check for error and it can return
New submission from anthony shaw :
The f_trace_opcodes flag for sys.settrace in 3.7 are proving tricky.
I must be missing something but it's not clear how it helps in tracing the
opcode about to be executed because it runs before opcode and oparg variables
are set by NEXTOPARG(), s
Change by anthony shaw :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36420>
___
___
anthony shaw added the comment:
Took a while, but I worked out a solution:
import sys
import dis
import traceback
import io
def t(frame, event, args):
frame.f_trace_opcodes=True
stack = traceback.extract_stack(frame)
pad = " "*len(stack) + "|"
if event ==
New submission from anthony shaw :
Now that pgen is written in Python, it'd be useful for Windows users to be able
to rebuild grammar and tokens into the parser table.
The current hook (make regen-grammar) is built into the Makefile.
Add support for VS2017+ vcxproj files to call the s
Change by anthony shaw :
--
keywords: +patch
pull_requests: +12583
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36500>
___
___
Py
Change by anthony shaw :
--
nosy: +brett.cannon, steve.dower
___
Python tracker
<https://bugs.python.org/issue36500>
___
___
Python-bugs-list mailing list
Unsub
anthony shaw added the comment:
Project now also does:
regen-symbol (regenerate Lib/symbol.py)
and regen-keyword (regenerate Lib/keyword.py)
--
___
Python tracker
<https://bugs.python.org/issue36
Change by anthony shaw :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue36500>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from anthony shaw :
List comprehensions currently create a series of opcodes inside a code object,
the first of which is BUILD_LIST with an oparg of 0, effectively creating a
zero-length list with a preallocated size of 0.
If you're doing a simple list comprehension
Change by anthony shaw :
--
keywords: +patch
pull_requests: +12644
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36551>
___
___
Py
New submission from anthony shaw :
When calculating length of range() objects that have an r->length >
PY_SIZE_MAX, the underlying PyLong_AsSsize_t() function will raise an
OverflowError:
>>> a = list(range(2**256))
Traceback (most recent call last):
File "",
Change by anthony shaw :
--
keywords: +patch
pull_requests: +12646
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36552>
___
___
Py
Change by anthony shaw :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue36551>
___
___
Python-bugs-list mailing list
Unsubscrib
anthony shaw added the comment:
The opcode would not solely apply to this specific use case.
I could seek another way of implementing the same behaviour without an
additional opcode?
--
___
Python tracker
<https://bugs.python.org/issue36
Change by anthony shaw :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
anthony shaw added the comment:
> How about converting `[x for x in it]` to `[*it]` in AST?
I should have been more explicit, this patch improves the performance of all
list comprehensions that don’t have an if clause.
Not just
[x for x in y]
but:
d = {} # some sort of dictionary
[f
anthony shaw added the comment:
> This might cause a MemoryError when the __length_hint__ of the source returns
> a too large value, even when the actual size of the comprehension is smaller,
> e.g.:
The current implementation of list comprehensions raise neither a memoryerror
or
anthony shaw added the comment:
> This patch makes it slow for small iterators
That is a one-off cost for the __length_hint__ of the range object specifically.
Objects with a known length (lists, sets, tuples) would not have that overhead.
I can run a more useful set of benchmarks agai
anthony shaw added the comment:
> In such case, current behavior works. And your patch will raise
> OverflowError.
Try
[x for x in range(2**1000)]
in a REPL. It doesn’t raise anything, it tries to create a list that will
eventually exceed PY_SIZE_MAX, but it only crashes once it r
anthony shaw added the comment:
> If your patch uses __length_hint__, it is bug.
iterator will return 2**1000 for __length_hint__, but produce no item
on iteration.
It raises an OverflowError because of the goto
https://github.com/python/cpython/pull/12718/files#d
anthony shaw added the comment:
> If your patch uses __length_hint__, it is bug.
I’m not sure I understand this comment,
PEP424 says “This is useful for presizing containers when building from an
iterable.“
This patch uses __length_hint__ to presize the list container for a l
anthony shaw added the comment:
Have just optimized some of the code and pushed another change as 69dce1c552.
ran both master and 69dce1c552 using pyperformance with PGO:
➜ ~ python3.8 -m perf compare_to master.json 69dce1c552.json --table
anthony shaw added the comment:
>I am -1 for this optimization because it affects only one particular case
>(neither other kinds of comprehensions, nor generator expressions, nor list
>comprehensions with
conditions) and even in this case it is small. It is possible to add a lot
anthony shaw added the comment:
Reserving this issue (in mentored sprint)
--
nosy: +anthony shaw
___
Python tracker
<https://bugs.python.org/issue36782>
___
___
Change by anthony shaw :
--
nosy: +edison.abahurire
___
Python tracker
<https://bugs.python.org/issue36782>
___
___
Python-bugs-list mailing list
Unsubscribe:
anthony shaw added the comment:
stackdepth_walk no longer exists in Python 3, this is a 2.7 specific issue.
opcode_stack_effect in compile.c will have the expected stack effect. If there
is a mismatch between the Opcodes compiled with the distribution and the ones
in the compile.c
anthony shaw added the comment:
I agree with Jerome, that handling recursion errors is a part of a 3rd party
package and not a bug with CPython.
--
nosy: +anthony shaw
___
Python tracker
<https://bugs.python.org/issue34
anthony shaw added the comment:
Please review the PR again, some of the code no longer applies as it targets
master and the PR is quite old.
--
nosy: +anthony shaw
___
Python tracker
<https://bugs.python.org/issue31
anthony shaw added the comment:
PR GH-5062 is still open in GitHub, is this PR still required?
--
nosy: +anthony shaw
___
Python tracker
<https://bugs.python.org/issue32
anthony shaw added the comment:
This issue has been open for some time and the PR references an upstream branch
that no longer exists.
Can this request be closed, or has the conversation yet to be resolved?
--
nosy: +anthony shaw
___
Python
anthony shaw added the comment:
This discussion is inconclusive and targets an old version of CPython, can this
issue be closed?
--
nosy: +anthony shaw
___
Python tracker
<https://bugs.python.org/issue15
anthony shaw added the comment:
Closing issue, PR branch has since been removed and targets Python 3.4
--
nosy: +anthonypjshaw
resolution: -> out of date
stage: test needed -> resolved
status: open -> closed
___
Python tracke
anthony shaw added the comment:
The original PR refers to a branch that no longer exists, but the behaviour
documented still applies to master. There were some changes to the test loader,
but none that fixed this issue.
--
nosy: +anthonypjshaw
anthony shaw added the comment:
There is not enough information to triage this issue and since the last request
there has been no reply. Closing issue.
--
nosy: +anthonypjshaw
stage: -> resolved
status: open -> closed
___
Python tracker
1 - 100 of 162 matches
Mail list logo