[issue32352] `inspect.getfullargspec` doesn't work fine for some builtin callable objects

2017-12-17 Thread Meador Inge

Meador Inge <mead...@gmail.com> added the comment:

This is a documented limitation for CPython:

https://docs.python.org/3.7/library/inspect.html#inspect.signature

--
nosy: +meador.inge

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



[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-12-17 Thread Meador Inge

Meador Inge <mead...@gmail.com> added the comment:

FWIW, I see a win on OS X 10.12.6:

λ:[master !?](~/Code/src/python/cpython)=> cc --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
λ:[master !?](~/Code/src/python/cpython)=> uname -a
Darwin ripley.attlocal.net 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct  4 
00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64

- Before:
λ:[master ?](~/Code/src/python/cpython)=> ./python.exe -m timeit -s "from 
binascii import unhexlify; b = b'aa'*2**20" "unhexlify(b)"
20 loops, best of 5: 11.3 msec per loop

- After:
λ:[master !?](~/Code/src/python/cpython)=> ./python.exe -m timeit -s "from 
binascii import unhexlify; b = b'aa'*2**20" "unhexlify(b)"
50 loops, best of 5: 4.15 msec per loop

--
nosy: +meador.inge

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



[issue28377] struct.unpack of Bool

2016-10-07 Thread Meador Inge

Meador Inge added the comment:

Looks like a dup to me.

--
nosy: +meador.inge

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



[issue15352] importlib.h should be regenerated when the marshaling code changes

2016-09-08 Thread Meador Inge

Meador Inge added the comment:

Hmmm, not sure why I forgot to apply this myself.  Thanks for committing it 
Eric.

--

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



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2016-09-08 Thread Meador Inge

Meador Inge added the comment:

Nothing.  I didn't have a Windows box handy to investigate at the time.  I do 
now and can look into this in the next day or so.

--

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



[issue26549] co_stacksize is calculated from unoptimized code

2016-05-16 Thread Meador Inge

Meador Inge added the comment:

See also issue24340

--

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



[issue24194] tokenize yield an ERRORTOKEN if an identifier uses Other_ID_Start or Other_ID_Continue

2016-05-10 Thread Meador Inge

Meador Inge added the comment:

Attached is a first cut patch for this.  (CC'd haypo as a unicode expert).

--
assignee:  -> meador.inge
keywords: +patch
nosy: +haypo, meador.inge
stage: needs patch -> patch review
Added file: http://bugs.python.org/file42808/issue24194-v0.patch

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



[issue26549] co_stacksize is calculated from unoptimized code

2016-05-09 Thread Meador Inge

Meador Inge added the comment:

Strictly speaking, the stack size is calculated *after* the peephole optimizer 
is run, but the code that computes the stack depth operates on the basic block 
graph instead of the assembled and optimized byte code.

Anyway, the conclusion is the same as Brett noted -- the stack depth analysis 
would need to be re-written to operate on the optimized bytecode array.

--
nosy: +meador.inge

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



[issue26746] struct.pack(): trailing padding bytes on x64

2016-05-09 Thread Meador Inge

Meador Inge added the comment:

I'm not to crazy about the trailing padding syntax either.  The behavior is 
documented all the way back to Python 2.6.  So, I would be hesitant to change 
it now.

If the new 'T{...}' struct syntax from issue3132 ever gets added, then maybe we 
could address this there?

FWIW, internal and trailing padding is implementation defined by the C 
standard.  That being said, most compilers I have worked with add the trailing 
padding.

--
nosy: +meador.inge

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



[issue6338] Error message displayed on stderr when no C compiler is present with ctypes

2016-05-09 Thread Meador Inge

Changes by Meador Inge <mead...@gmail.com>:


--
nosy: +meador.inge

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



[issue26870] Unexpected call to readline's add_history in call_readline

2016-05-09 Thread Meador Inge

Meador Inge added the comment:

Works fine on Darwin (OS X Yosemite 10.10.5):

drago:cpython meadori$ uname -a
Darwin drago 14.5.0 Darwin Kernel Version 14.5.0: Mon Jan 11 18:48:35 PST 2016; 
root:xnu-2782.50.2~1/RELEASE_X86_64 x86_64

--
nosy: +meador.inge

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



[issue26765] Factor out common bytes and bytearray implementation

2016-05-04 Thread Meador Inge

Meador Inge added the comment:

LGTM.

--

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



[issue26881] modulefinder should reuse the dis module

2016-05-04 Thread Meador Inge

Meador Inge added the comment:

Overall, this patch LGTM.  Some new tests would be nice.  Especially since the 
NEWS entry claims that we now support extended args.

As for for the compatibility concerns, I don't know.

--
nosy: +meador.inge

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



[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-01 Thread Meador Inge

Meador Inge added the comment:

LGTM.  I agree that the extra braces are a little gross, but nothing 
immediately comes to mind as how to make that better.

--
nosy: +meador.inge

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



[issue24114] ctypes.utils uninitialized variable 'paths'

2016-04-30 Thread Meador Inge

Meador Inge added the comment:

Fixed.

Thank y'all for the patch and help with testing.

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

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



[issue24114] ctypes.utils uninitialized variable 'paths'

2016-04-28 Thread Meador Inge

Meador Inge added the comment:

Xiang's patch LGTM.  Given that Kees has verified it, I will apply today.

--
assignee:  -> meador.inge
stage: needs patch -> commit review

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



[issue26765] Factor out common bytes and bytearray implementation

2016-04-17 Thread Meador Inge

Meador Inge added the comment:

If I follow this correctly, then it seems like there are two
main pieces to this patch:

  1. Consolidating the following methods into `bytes_methods.c`:

 a. {bytes, bytearray}_find_internal

 b. {bytes, bytearray}_find

 c. {bytes, bytearray}_count

 d. {bytes, bytearray}_index

 e. {bytes, bytearray}_rfind

 f. {bytes, bytearray}_rindex

 g. {bytes, bytearray}_contains

 h. (_bytes, _bytearray}_tailmatch

 i. {bytes, bytearray}_startswith

 j. {bytes, bytearray}_endswith

  2. Consolidating the redundant implementations of the following functions
 into the stringlib:

 a. return_self

 b. countchar

 c. replace_interleave

 d. replace_delete_single_character

 e. replace_delete_substring

 f. replace_single_character_in_place

 g. replace_substring_in_place

 h. replace_single_character

 i. replace_substring

 j. replace

If so, then that seems reasonable to me and a nice cleanup.

A few comments:

  1. The diffs are fairly large.  It might be easier to follow if you stage
 the two steps above as separate commits (if possible).

  2. Why are some of the namings in stringlib inconsistent?  For example,
 `stringlib_method_find` and `stringlib_index`.  In other words, why
 do some names have the *_method_* part?

--
nosy: +meador.inge
stage:  -> patch review

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



[issue25083] Python can sometimes create incorrect .pyc files

2015-11-01 Thread Meador Inge

Meador Inge added the comment:

I started poking at the patch a little and have a few comments.

My understanding of the issue comments is that the read error actually happens 
when reading in the *source* file and *not* the bytecode file.  This happens 
because 'ferror' is not checked after receiving an EOF and thus we think we 
just have an empty source file.  I can understand how creating a reproducible 
test case for this error path would be very difficult.

So, checking for errors with 'ferror' definitely seems reasonable, but why do 
it in the tokenizer code?  I already see several places in 'fileobject.c' that 
do similar checks.  For example, in 'get_line' I see:

   while ( buf != end && (c = GETC(fp)) != EOF ) {
  ...
   }
   if (c == EOF) {
  if (ferror(fp) && errno == EINTR) {
 ...
  }
   }

As such, wouldn't handling this error case directly in 
'Py_UniversalNewlineFgets' similar to the above code be more appropriate?

--

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



[issue24485] Function source inspection fails on closures

2015-07-23 Thread Meador Inge

Meador Inge added the comment:

Thanks Yury!  I have committed my patches to 3.5 and default.

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

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



[issue24485] Function source inspection fails on closures

2015-07-21 Thread Meador Inge

Meador Inge added the comment:

Will do.  Thanks for the review.

--

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



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2015-07-13 Thread Meador Inge

Meador Inge added the comment:

On Mon, Jul 13, 2015 at 12:04 PM, Stefan Krah rep...@bugs.python.org wrote:

 I think with the ASYNC/AWAIT changes any code using tokenize.py
 will have to be updated anyway in 3.5 and in 3.7 (when ASYNC/AWAIT
 will finally be real keywords).

Agreed.

 So this is probably an ideal time for the change.  I'll add tests.

Thanks.

--

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



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2015-07-13 Thread Meador Inge

Meador Inge added the comment:

This looks good to me.  A few questions.

The patch is fixing an obvious bug, but there could be code that
depends on the current broken behavior (the table has been incorrect
since Python 3.3).  How do we feel about such breaking changes?
I am OK with this one.

Will you add tests?

--
stage:  - patch review
type:  - behavior

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



[issue23319] Missing SWAP_INT in I_set_sw

2015-07-09 Thread Meador Inge

Meador Inge added the comment:

I will review this today.

--
assignee:  - meador.inge
stage:  - patch review

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-06-28 Thread Meador Inge

Meador Inge added the comment:

FYI, I posted a patch to handle this case and the regression
noted in issue24485 on issue24485.

--

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



[issue24485] Function source inspection fails on closures

2015-06-28 Thread Meador Inge

Meador Inge added the comment:

Here is a first cut patch that moves things back to using a syntax-level
analysis instead of a bytecode-level one.  I extended `BlockFinder`
to skip decorators.

--
keywords: +patch
nosy: +meador.inge
stage: test needed - patch review
Added file: http://bugs.python.org/file39825/issue24485-v0.patch

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2015-06-26 Thread Meador Inge

Meador Inge added the comment:

 I think that the only way we can solve this is to revert the patch for this 
 issue.

I agree with this.  It seems like doing this analysis at the bytecode level is 
the
wrong approach.  Perhaps the syntactical analysis being used before should be 
beefed
up to handle things like the lambda case.

--
nosy: +meador.inge

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-25 Thread Meador Inge

Meador Inge added the comment:

I did some regression testing and reviewed the code; LGTM.

As for the code structure issues, I agree that the duplication is undesirable 
(the readability argument is not that convincing), but Serhiy's patch is 
consistent with the existing design.  As such, I think the structure issue is a 
separate one and definitely should not hold this patch up.

--
nosy: +meador.inge

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



[issue24506] make fails with gcc 4.9 due to fatal warning of unused variable and empty macro in Parser/pgen.c

2015-06-24 Thread Meador Inge

Meador Inge added the comment:

What is the exact GCC revision and what are the error messages?  I just tried 
GCC 4.9.3 and GCC 4.10.0 and don't see the errors.

Also, what configure and make parameters did you use to trigger the error?
I did './configure --with-pydebug' and './configure' with 'make -j4'.

--
nosy: +meador.inge

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



[issue22125] Cure signedness warnings introduced by #22003

2014-08-02 Thread Meador Inge

Meador Inge added the comment:

H, maybe I am missing some context, but why not avoid the casting and do?

diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -47,7 +47,7 @@ typedef struct {
  * exception and returns -1 on failure. Existing state is preserved on failure.
  */
 static int
-unshare(bytesio *self, size_t preferred_size, int truncate)
+unshare(bytesio *self, Py_ssize_t preferred_size, int truncate)
 {
 if (self-initvalue) {
 Py_ssize_t copy_size;

--
nosy: +meador.inge
stage:  - patch review

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



[issue13096] ctypes: segfault with large POINTER type names

2014-04-28 Thread Meador Inge

Meador Inge added the comment:

Thanks for the review and reminder about this issue, jesstess.  I will apply 
the patch later today.

--

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



[issue21242] Generalize configure check for working Python executable

2014-04-15 Thread Meador Inge

Meador Inge added the comment:

I am not sure I follow.  In configure.ac I see one check for Python:

  AC_SUBST(ASDLGEN)
  AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found)
  if test $PYTHON = not-found; then
  ASDLGEN=@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #
  else
  ASDLGEN=$PYTHON
  fi

and a couple of uses for it in Makefile.pre.in:

  $(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
  $(MKDIR_P) $(AST_H_DIR)
  $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)

  $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES)
  $(MKDIR_P) $(AST_C_DIR)
  $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)

Are you suggesting that the variable name 'ASDLGEN be renamed to something 
more general so that any scripts that need to be run *before* building the 
interpreter can use it?

I don't see any other AC_CHECK_PROGS checks for Python in configure.ac.

Apologies if I am being dense today :-)

--
nosy: +meador.inge

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



[issue21242] Generalize configure check for working Python executable

2014-04-15 Thread Meador Inge

Meador Inge added the comment:

Ah, okay, this looks in reference to the opcode generation stuff in issue17861.

--

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



[issue16047] Tools/freeze no longer works in Python 3

2014-03-31 Thread Meador Inge

Meador Inge added the comment:

Apologies for not getting around to applying this myself.  I had an extremely 
busy week with the day job last week.  Thanks for applying Martin.

--

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



[issue16047] Tools/freeze no longer works in Python 3

2014-03-25 Thread Meador Inge

Meador Inge added the comment:

Apologies for not replying over the weekend.  I am still looking into this one.

--

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



[issue16047] Tools/freeze no longer works in Python 3

2014-03-21 Thread Meador Inge

Meador Inge added the comment:

Sure.  I will refresh it tonight or sometime tomorrow.

--

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



[issue16612] Integrate Argument Clinic into CPython trunk

2014-01-14 Thread Meador Inge

Meador Inge added the comment:

Will do, but in this case I didn't think a one character diff was worth
it.

--
nosy: +meador.inge

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



[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-14 Thread Meador Inge

Meador Inge added the comment:

Attached is a first cut for sqlite3.  It is generally OK, but I have the 
following
nits:

* As is probably expected, __init__ and __call__ procs can't be converted.

* sqlite3.Connection.{execute, executemany, executescript} don't use
  PyArg_Parse*.

* The clinic version of 'sqlite3.adapt' has an argument string of O|OO.
  The first optional parameter defaults to 'pysqlite_PrepareProtocolType'
  in C and 'sqlite3.ProtocolType' in Python.  However, I don't know how to
  represent the Python value because Python default values are 'eval'd by
  clinic *and* the 'sqlite3' module is not imported for the eval.

* The clinic version of 'sqlite3.Cursor.fetchmany' has an arguments string
  of |i.  The first parameter defaults to
  '((pysqlite_Cursor *)self)-arraysize' in C and 'self.arraysize' in
  Python.  I don't know how to express the Python initialization.

* 'sqlite3.complete' uses 'as module_complete' because 'sqlite3_complete'
  is a public SQLite API function: 
http://www.sqlite.org/c3ref/complete.html.
  I used 'as' on all the other functions in 'module.c' as well.  Mainly
  for local consistency.

* '_pysqlite_query_execute' required a little refactoring due to the fact
  that it is a utility function used to implement 'sqlite3.Cursor.execute'
  and 'sqlite3.Cursor.executemany'.  'PyArg_ParseTuple' was being called in
  different way depending on a control parameter.

* I didn't convert 'sqlite3.Cursor.setinputsizes' and
  'sqlite3.Cursor.setoutputsize' because they share a docstring and
  simple no-op method def.

* I didn't convert 'sqlite.connect' because it would have required packaing
  the arguments back up to pass to 'PyObject_Call'.

--
Added file: http://bugs.python.org/file33470/issue20178-sqlite-01.patch

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



[issue20264] Update patchcheck to looks for files with clinic comments

2014-01-14 Thread Meador Inge

New submission from Meador Inge:

It has been noted a few times that someone might forget to re-run
clinic.py after updating the argument clinic comments.  The attached
patch adds a new check to patchcheck.py to note when files containing
argument clinic comments have been changed.  You could take it a step
further and deduce if the lines ranges within the comments were actually
changed, but let's start out simple.

--
assignee: meador.inge
components: Build
files: patchcheck-clinic.patch
keywords: patch
messages: 208132
nosy: larry, meador.inge
priority: normal
severity: normal
stage: patch review
status: open
title: Update patchcheck to looks for files with clinic comments
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file33471/patchcheck-clinic.patch

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



[issue20262] Convert some debugging prints in zipfile to warnings

2014-01-14 Thread Meador Inge

Meador Inge added the comment:

LGTM.

I audited the other 'ZipFile.debug' uses and agree that the others are
mainly useful in debugging the zipfile implementation itself.

Since it isn't that critical of a change, the default branch should be
sufficient.

--
nosy: +meador.inge
type:  - behavior

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



[issue20226] Argument Clinic: support for simple expressions?

2014-01-14 Thread Meador Inge

Meador Inge added the comment:

Larry, nice.  I am verified that your latest patch fixes my third sqlite3
nit from issue20178.

--
nosy: +meador.inge

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



[issue20230] structseq types should expose _fields

2014-01-12 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-12 Thread Meador Inge

Meador Inge added the comment:

Larry, the attached patch converts what is convertible of
Modules/_ctypes/_ctypes.  Although, I ran into an odd case
with this conversion: the converted functions are each used
in *multiple* PyMethodDef tables.  So while clinic can generate
equivalent code, the builtins are not all pinned to one type.
The type I pinned it to is the same type that the methods
are documented against:
http://docs.python.org/2/library/ctypes.html#ctypes._CData

Since clinic makes you explicitly specify the fully qualified method
name, I assume sharing like this is not allowed.

Thoughts?

--
keywords: +patch
Added file: http://bugs.python.org/file33438/issue20178-cyptes-01.patch

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



[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-12 Thread Meador Inge

Meador Inge added the comment:

None of the sites in Modules/_curses_panel.c look convertible.

--

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



[issue20178] Derby #9: Convert 52 sites to Argument Clinic across 11 files

2014-01-09 Thread Meador Inge

Meador Inge added the comment:

I will pick this one up.

--
assignee:  - meador.inge
nosy: +meador.inge

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



[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-08 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs)

2014-01-08 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-08 Thread Meador Inge

Meador Inge added the comment:

 Larry, I don't want to scatter patches for these related modules and merge 
 them with patches for totally unrelated modules. And I think it would be 
 cumbersome to Nadeem Vawda to make reviews in such circumstances.

Maybe so, but it will more productive if we can all agree on a method to 
organize
the work so that we don't duplicate effort and it is clear which issues to 
contribute
to.  Larry seems to have organized that by sending out multiple mails and 
opening
issues.  Opening other issues because you don't agree with the way the 
organizer has
chosen to cut up the work is counterproductive.

--
nosy: +meador.inge

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



[issue20075] help(open) eats first line

2013-12-26 Thread Meador Inge

Meador Inge added the comment:

Looks like the changes from 78ec18f5cb45 attempt to skip the signature,
but can't handle multi-line signatures.

--
nosy: +meador.inge

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



[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2013-12-09 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue19904] Add 128-bit integer support to struct

2013-12-08 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue19905] Add 128-bit integer support to ctypes

2013-12-08 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue19511] lib2to3 Grammar file is no longer a Python 3 superset

2013-11-06 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue17823] 2to3 fixers for missing codecs

2013-11-06 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-09-05 Thread Meador Inge

Meador Inge added the comment:

I was experimenting with something similar to what Jakub has.  Rebinding the 
call the the wrapper seems like a simple and clean way to do it.  Although, I 
wasn't absolutely sure whether this approach covers all cases.

--

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



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-09-05 Thread Meador Inge

Meador Inge added the comment:

The monkey-patched version breaks the auto-close on __del__ feature:

[meadori@li589-207 cpython]$ ./python 
Python 3.4.0a1+ (default:c41c68a18bb6, Sep  5 2013, 17:51:03) 
[GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux
Type help, copyright, credits or license for more information.
 import tempfile
 tempfile.NamedTemporaryFile(dir=.,delete=False).write(bhello)
__main__:1: ResourceWarning: unclosed file _io.BufferedRandom name=4
5

Also run the test suite with '-R :' and you will see tons of resource warnings.

Breaking auto-close is because now unlinking *and* closing are being guarded by 
'delete'.  Even if that is fixed you still run into resource leak problems.  
Looks like the monkey-patching introduces a reference cycle.

The wrapper binding approach works fine in all the tests I did.

--

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



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-09-04 Thread Meador Inge

Meador Inge added the comment:

Reopening to rework test cases.

--
resolution: fixed - 
stage: committed/rejected - needs patch
status: closed - open

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



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-09-03 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-09-03 Thread Meador Inge

Meador Inge added the comment:

My last commit caused some buildbot failures 
(http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1069).
  I am investigating.

--

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



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-09-01 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
assignee:  - meador.inge
stage: patch review - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16826
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2013-08-30 Thread Meador Inge

Meador Inge added the comment:

I see some regressions when reference leak hunting with -j './python -j8 -R :'

test test_ast crashed -- Traceback (most recent call last):
  File /home/meadori/src/cpython/Lib/test/regrtest.py, line 1265, in 
runtest_inne
r
huntrleaks)  File /home/meadori/src/cpython/Lib/test/regrtest.py, line 
1381, in dash_R
indirect_test()
  File /home/meadori/src/cpython/Lib/test/regrtest.py, line 1261, in lambda 
   test_runner = lambda: support.run_unittest(tests)
  File /home/meadori/src/cpython/Lib/test/support/__init__.py, line 1683, in 
run_
unittest
_run_suite(suite)
  File /home/meadori/src/cpython/Lib/test/support/__init__.py, line 1649, in 
_run
_suite
result = runner.run(suite)
  File /home/meadori/src/cpython/Lib/test/support/__init__.py, line 1548, in 
run
test(result)
  File /home/meadori/src/cpython/Lib/unittest/suite.py, line 76, in __call__
return self.run(*args, **kwds)
  File /home/meadori/src/cpython/Lib/unittest/suite.py, line 114, in run
test(result)
  File /home/meadori/src/cpython/Lib/unittest/suite.py, line 76, in __call__
return self.run(*args, **kwds)
  File /home/meadori/src/cpython/Lib/unittest/suite.py, line 114, in run
test(result)
TypeError: 'NoneType' object is not callable

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11798
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-08-29 Thread Meador Inge

Meador Inge added the comment:

Confirmed in trunk:

 tempfile.NamedTemporaryFile(dir=.,delete=False).write(bhello)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: write to closed file

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18879
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-08-29 Thread Meador Inge

Meador Inge added the comment:

'tempfile.NamedTemporaryFile' returns an instance of '_TemporaryFileWrapper' 
that wraps the created file object.  The wrapper object implements 
'__getattr__' and we end up with a situation like the following simplified 
example where the wrapper gets destroyed before the looked up method is called:

$ cat test.py 
class S(object):
   def __init__(self):
  print(S.__init__)   def __del__(self):  print(S.__del__)
   def foo(self):
  print(S.foo)

class T(object):
   def __init__(self, s):
  self.s = s
  print(T.__init__)
   def __getattr__(self, name):
s = self.__dict__['s']
a = getattr(s, name)
print(__getattr__('%s') % name)
if not isinstance(a, int):
setattr(self, name, a)
return a
   def __del__(self):
  print(T.__del__)
T(S()).foo()
$ ./python test.py 
S.__init__
T.__init__
__getattr__('foo')
T.__del__
S.foo
S.__del__

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18879
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-22 Thread Meador Inge

Meador Inge added the comment:

Using 'ctypes.wintypes' on non-Windows systems is most likely a bad idea.  Most 
of the types are defined in terms of the types for the target that the 
interpreter is built for.  Comparing serializations thereof in a cross platform 
manner doesn't make sense for a lot of cases.  

I really think it is only useful for Windows platforms and allowing it to 
silently import is misleading.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16396
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-19 Thread Meador Inge

Meador Inge added the comment:

On Mon, Aug 12, 2013 at 7:11 AM, Ezio Melotti rep...@bugs.python.orgwrote:

 Even if the patch is applied only on 3.4, I would still like to see the
 ValueError turned into ImportError for 2.7/3.3.


Why not raise an ImportError for all versions?  I don't see how
'ctypes.wintypes' is ever actually useful on anything but Windows.
 Allowing it to successfully import on non-Windows systems seems misleading.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16396
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18502] CDLL does not use same paths as util.find_library

2013-07-22 Thread Meador Inge

Meador Inge added the comment:

On Linux gcc and ld are used to implement 'find_library' and 'dlopen' is used 
to implement 'CDLL'.  ld searches /usr/local/lib.  'dlopen' might not if the 
LD_LIBRARY_PATH isn't set up to do so.  For example:


[meadori@li589-207 cpython]$ ls /usr/local/lib
libfoo.so  libfoo.so.1  libfoo.so.1.0  linode
[meadori@li589-207 cpython]$ ./python 
Python 3.4.0a0 (default:d6213012d87b, Jul 23 2013, 01:00:24) 
[GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux
Type help, copyright, credits or license for more information.
 from ctypes import *
 import ctypes.util
 ctypes.util.find_library('foo')
'libfoo.so.1'
 CDLL(_)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/meadori/src/cpython/Lib/ctypes/__init__.py, line 351, in __init__
self._handle = _dlopen(self._name, mode)OSError: libfoo.so.1: cannot open 
shared object file: No such file or directory
 quit()
[meadori@li589-207 cpython]$ echo $LD_LIBRARY_PATH

[meadori@li589-207 cpython]$ export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
[meadori@li589-207 cpython]$ ./python 
Python 3.4.0a0 (default:d6213012d87b, Jul 23 2013, 01:00:24) 
[GCC 4.7.2 20120921 (Red Hat 4.7.2-2)] on linux
Type help, copyright, credits or license for more information.
 from ctypes import *
 import ctypes.util
 ctypes.util.find_library('foo')
'libfoo.so.1'
 CDLL(_)
CDLL 'libfoo.so.1', handle 28e4b50 at 7f31e062b608


I am OK with this behavior in ctypes since it matches the system behavior with 
'gcc' and 'dlopen'.  So, I would fixup LD_LIBRARY_PATH or /etc/ld.so.conf if 
you want /usr/local/lib to be searched at load time.

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18502
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14596] struct.unpack memory leak

2013-05-14 Thread Meador Inge

Meador Inge added the comment:

 I don't think Serhiy's patch should be blocked by a larger issue.
 I suppose you could rebase easily over his changes.

Where rebase=undo, sure.  The changes for issue3132 are pretty
extensive (the basic data structures are changed).  And as mentioned
in msg165892, msg188840, and msg125617 I have already proposed and
implemented this optimization many months back.

If we feel that this optimization is really critical, then I agree
let's not hold it up and I will just work around it with my patch for
issue3132.  I don't see it as that critical, but I understand that the
PEP 3118 changes are dragging on and this optimization might be important
for some now.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14596
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14596] struct.unpack memory leak

2013-05-14 Thread Meador Inge

Meador Inge added the comment:

 Are you sure the PEP 3118 changes will land in 3.4? It would be a pity
 to lose a simple improvement because it was deferred to a bigger
 change.

No, I am not sure.  That is why I said that I understand if others felt
this bug was critical to fix now since the PEP 3118 changes were dragging
on.  In that case I will just rework my patch.

I am not trying to stand in the way of this patch.  I just wanted folks
to be aware that this approach was implemented in the PEP 3118 work.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14596
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14596] struct.unpack memory leak

2013-05-10 Thread Meador Inge

Meador Inge added the comment:


 Serhiy Storchaka added the comment:

 So what about more compact Struct object?

I already implemented the count optimization as a part of my patch for
implementing
PEP 3188 in issue3132.  I need to rebaseline the patch.  It has gotten
stale.  Hopefully
there is still interest in the PEP 3188 work and I can get that patch
pushed through.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14596
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17449] dev guide appears not to cover the benchmarking suite

2013-05-01 Thread Meador Inge

Meador Inge added the comment:

I think this will be useful information.  I tend to doing benchmarks
rather infrequently.  Whenever I do them I forgot how I setup the suite
the previous time around.

In fact, I found this issue just now while googling for how to setup and
run the official benchmark suite :-)

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17449
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17804] streaming struct unpacking

2013-04-22 Thread Meador Inge

Meador Inge added the comment:

This seems reasonable to me to.  So +1.

Small bikeshed on the name: I think 'unpack_iter' would be more
consistent with what is already there, e.g. 'unpack' and 'unpack_from'.
In fact, when experimenting with this patch I found myself typing
'unpack_iter' several times.

--
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17804
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-04-14 Thread Meador Inge

Meador Inge added the comment:

Here is a version which implements the subprocess method for testing
suggested by Éric.

--
Added file: http://bugs.python.org/file29858/issue16826-1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16826
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16804] python3 -S -m site fails

2013-04-13 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16804
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16804] python3 -S -m site fails

2013-04-09 Thread Meador Inge

Meador Inge added the comment:

I will go ahead and commit the patch as is.  Thanks for the review y'all.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16804
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17345] Portable and extended type specifiers for array module

2013-03-11 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17345
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17061] tokenize unconditionally emits NL after comment lines blank lines

2013-02-02 Thread Meador Inge

Meador Inge added the comment:

The current behavior seems consistent with the lexical definition for
blank lines [1]:


A logical line that contains only spaces, tabs, formfeeds and possibly a
comment, is ignored (i.e., no NEWLINE token is generated).


NL and COMMENT are used for items that the CPython tokenizer
ignores (and are not really tokens).  Also, the test suite explicitly
tests for this case.

Perhaps the tokenize documentation should be updated
to say something like:


NL tokens are generated when a logical line of code is continued over
multiple physical lines and for blank lines.


[1] http://docs.python.org/3.4/reference/lexical_analysis.html#blank-lines

--
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17061
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12691] tokenize.untokenize is broken

2013-02-02 Thread Meador Inge

Meador Inge added the comment:

I will take a look.  As it stands the current patch fixes way too many
issues.  Patches should fix *one* issue at a time.  I will look at fixing
the original assert problem and at opening new issues for the others
(assuming there aren't already issues for them).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12691
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2013-01-14 Thread Meador Inge

Meador Inge added the comment:

I agree that it is better to cover both cases in one test irrespective of the 
interpreter command line options.  I will take a look at creating a subprocess. 
 Thanks for the review.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16826
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16899] Add support for C99 complex type (_Complex) as ctypes.c_complex

2013-01-14 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16899
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10544] yield expression inside generator expression does nothing

2013-01-14 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16894] Function attribute access doesn't invoke methods in dict subclasses

2013-01-14 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16894
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16853] add a Selector to the select module

2013-01-05 Thread Meador Inge

Meador Inge added the comment:

The EpollSelector and PollSelector implementations are basically identical.  
You might want to refactor these to share more code.

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16853
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16868] Python Developer Guide: Include a reminder to ping bug report if not reviewed in timely manner

2013-01-05 Thread Meador Inge

Meador Inge added the comment:

This seems like a reasonable addition to me.  Although, I don't like the 
substantial amount of time part (yes I know it was already there).  That 
should probably be replaced with something more concrete, e.g. one week.

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16868
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9685] tuples should remember their hash value

2013-01-05 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9685
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16868] Python Developer Guide: Include a reminder to ping bug report if not reviewed in timely manner

2013-01-05 Thread Meador Inge

Meador Inge added the comment:

On Sat, Jan 5, 2013 at 5:55 PM, Ezio Melotti rep...@bugs.python.org wrote:

 That really depends on the situation.  I think the point of that sentence is 
 to make clear that some time might
 pass before someone can look at the issue, and I'm not sure it's necessary to 
 quantify this.

It currently says:


 If your patch has not received any notice from reviewers (i.e., no
comment made) after a substantial amount of time then you may email
python-...@python.org asking for someone to take a look at your patch.


That doesn't seem very useful to me because a newcomer is going to
wonder how much time is substantial.  If you quantify it, then they
don't really have to think about it as much which makes contributing
easier.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16868
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16865] ctypes arrays =2GB in length causes exception

2013-01-04 Thread Meador Inge

Meador Inge added the comment:

This case works fine on 64-bit Linux (Ubuntu) and OS X 10.7.5.  I suspect this 
is due to the fact that 64-bit Windows uses the LLP64 data model and we are 
using longs somewhere.  I am investigating further now.

--
stage:  - needs patch
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16865
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16808] inspect.stack() should return list of named tuples

2013-01-04 Thread Meador Inge

Meador Inge added the comment:

I suppose asserting the type wouldn't hurt, but I don't consider it that 
important:

--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -164,12 +164,16 @@ class TestInterpreterStack(IsTestBase):
 self.assertTrue(len(mod.st) = 5)
 self.assertEqual(revise(*mod.st[0][1:]),
  (modfile, 16, 'eggs', ['st = inspect.stack()\n'], 0))
+self.assertIsInstance(mod.st[0], inspect.FrameInfo)
 self.assertEqual(revise(*mod.st[1][1:]),
  (modfile, 9, 'spam', ['eggs(b + d, c + f)\n'], 0))
+self.assertIsInstance(mod.st[1], inspect.FrameInfo)
 self.assertEqual(revise(*mod.st[2][1:]),
  (modfile, 43, 'argue', ['spam(a, b, c)\n'], 0))
+self.assertIsInstance(mod.st[2], inspect.FrameInfo)
 self.assertEqual(revise(*mod.st[3][1:]),
  (modfile, 39, 'abuse', ['self.argue(a, b, c)\n'], 0))
+self.assertIsInstance(mod.st[3], inspect.FrameInfo)


TestGetClosureVars builds the named tuples directly and compares them.  For 
example:

expected = inspect.ClosureVars(nonlocal_vars, global_vars,
   builtin_vars, unbound_names)
self.assertEqual(inspect.getclosurevars(f(_arg)), expected)

Doing this for FrameInfo is awkward because we don't have a frame object to 
construct
the named tuple with.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2013-01-02 Thread Meador Inge

Meador Inge added the comment:

After applying the fix for issue11824 to tip there ended up being three more
issues:

   1. makeconfig.py should have been updated in d777f854a66e when changing
  imp to _imp.  Without this change a reference to 'PyInit__imp'
  was being generated, but that function does not actually exist.

   2. After fixing (1) I hit an issue where '_frozen_importlib' can
  not be found while bringing up the interpreter.

   3. After fixing (2) I hit the following error when running the
  simple frozen hello app:

 $ ./hello 
 Traceback (most recent call last):
  
 ...

   File /Users/meadori/Code/src/cpython/Lib/site.py, line 578, in main
 setcopyright()
   File /Users/meadori/Code/src/cpython/Lib/site.py, line 438, in 
setcopyright
 here = os.path.dirname(os.__file__)
 AttributeError: 'module' object has no attribute '__file__'

  This happens during 'initsite' and is because of a change made
  to remove the __file__ attribute from frozen modules in 702009f3c0b1.

The attached patch fixes (1) by filtering '_imp' instead of 'imp' in
makeconfig.py, (2) by making sure '_frozen_importlib' is in the frozen
module table created by freeze.py, and (3) by removing the code to delete
__file__ from frozen modules.

I am a little unsure about (3) since I am not sure why the __file__ attribute
is being removed to begin with.  eric.smith?

--
keywords: +patch
nosy: +brett.cannon, eric.smith
Added file: http://bugs.python.org/file28530/issue16047-0.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2013-01-02 Thread Meador Inge

Meador Inge added the comment:

Thanks for the feedback everyone -- that helped.  Here is a new patch
which addresses issue (3) by not requiring os.__file__ to exist.

The patch from issue11824 fixes freeze for 3.2 completely.  The patch
from issue11824 plus this patch fixes freeze for 3.3 and 3.4.  I tested
both `make install` and Python source tree versions (i.e. freeze.py -p).
A frozen Hello, world app works fine in all cases.

I also verified that 'license' works from a frozen app.  You will see
something like the following instead of the full licensing text on stdout:

   See http://www.python.org/3.4/license.html

--
assignee: meador.inge - 
stage: needs patch - patch review
versions:  -Python 3.2
Added file: http://bugs.python.org/file28537/issue16047-1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2013-01-02 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
assignee:  - meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16842] Allow to override a function signature for pydoc with a docstring

2013-01-02 Thread Meador Inge

Meador Inge added the comment:

Serhiy, did you mean to mark this as patch review?  I don't see a patch.

--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16842
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe

2013-01-02 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16742
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions

2013-01-02 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16730
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16733] Solaris ctypes_test failures

2013-01-01 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16733
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11824] freeze.py broken due to ABI flags

2013-01-01 Thread Meador Inge

Meador Inge added the comment:

I don't think the current patch is correct.  It breaks the usage of `freeze.py 
-p $path` since LIBDIR and LIBRARY are blindly used.

Maybe something like the attached that respects -p and -P can be used instead?

As for the testing, I think a reasonable solution to get started with is to add 
some buildbot runs that automate the hello.py freeze on various hosts.  That 
will give us some basic coverage and then more tests can be added over time if 
need be.  I would be happy to help set that up (with given guidance on how to 
access the buildbots).

Even with the attached patch I still can't fully build (on OS X 10.7.5) because 
of issue16047:

Undefined symbols for architecture x86_64:
  _PyInit__imp, referenced from:
  __PyImport_Inittab in config.o
ld: symbol(s) not found for architecture x86_64

I will take a look at that issue next.

--
assignee:  - meador.inge
Added file: http://bugs.python.org/file28519/issue11824-0.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11824
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16047] Tools/freeze no longer works in Python 3

2013-01-01 Thread Meador Inge

Meador Inge added the comment:

As mentioned, the ABI issues are being handled in issue11824.  I believe the 
linking problems in this issue have to do with the changes that were made in 
3.3 to bootstrap importlib into Python.  I will look into it more.

--
assignee:  - meador.inge
keywords: +3.3regression
stage:  - needs patch
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16047
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16320] Establish order in bytes/string dependencies

2012-12-31 Thread Meador Inge

Meador Inge added the comment:

On Mon, Dec 31, 2012 at 4:50 AM, Serhiy Storchaka
rep...@bugs.python.org wrote:

 The cleanup of BYTESTR_DEPS and UNICODE_DEPS seems reasonable, but can you
 explain the rationale behind removing the additional dependencies on
 formatter_unicode.c?

 This question already was asked by Antoine on IRC.

OK, but not everyone is on IRC all the time.  Thus the fact that it
was discussed there
isn't very helpful.  It is better to have this type of information in
the tracker so that
everyone interested in the issue can have access.  (preferable when
opening the bug
and describing what the initial patch is doing).

Thanks for the extended explanation.  This patch LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16320
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16808] inspect.stack() should return list of named tuples

2012-12-31 Thread Meador Inge

Meador Inge added the comment:

This patch looks good to me with the exception that versionchanged should be 
3.4.

--
assignee:  - meador.inge
nosy: +meador.inge
stage: needs patch - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16808
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16826] Don't check for PYTHONCASEOK if interpreter started with -E

2012-12-31 Thread Meador Inge

Meador Inge added the comment:

Is the attached OK?

--
keywords: +patch
nosy: +meador.inge
stage: test needed - patch review
Added file: http://bugs.python.org/file28517/issue16826-0.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16826
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12915] Add inspect.locate and inspect.resolve

2012-12-31 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12915
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16804] python3 -S -m site fails

2012-12-30 Thread Meador Inge

Meador Inge added the comment:

Yeah, it is a result of the fix for issue11591 (changeset a364719e400a).  
Incidentally, the decision was made to forgo writing a testcase in favor of 
proof by inspection :-)

There are also other consequences of that change:

   ./python.exe -S
   Python 3.4.0a0 (default:08c215115842, Dec 30 2012, 09:54:54) 
   [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on 
darwin
import site
quit()
   Traceback (most recent call last):
 File stdin, line 1, in module
   NameError: name 'quit' is not defined
^D

'quit' not being defined in this case is a regression.

ISTM the original change was meant to only prevent sys.path from being altered, 
but it is preventing a bunch of other things (USER_BASE, USER_SITE, quit, ...) 
from being initialized as well.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16804
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   >