Michael Foord added the comment:
TestProgram is an abomination.
--
___
Python tracker
<http://bugs.python.org/issue22860>
___
___
Python-bugs-list mailin
Michael Foord added the comment:
Looks good, thanks for the quick response.
--
___
Python tracker
<http://bugs.python.org/issue22894>
___
___
Python-bugs-list m
Michael Foord added the comment:
why not?
--
___
Python tracker
<http://bugs.python.org/issue21600>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
Patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue22823>
___
___
Python-bugs-list mailing list
Unsub
Michael Foord added the comment:
Using patch.dict manipulates the contents of sys.modules, it doesn't replace
sys.modules.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
Patch looks good, thanks.
--
___
Python tracker
<http://bugs.python.org/issue20487>
___
___
Python-bugs-list mailing list
Unsub
New submission from Michael Vogt:
Please consider adding a option to extract a tarfile with the uid/gid instead
of the lookup for uname/gname in the tarheader (i.e. what tar --numeric-owner
provides).
One use-case is if you unpack a chroot tarfile that contains a
/etc/{passwd,group} file
New submission from Michael Vogt:
The tarfile.makelink() code crashes with a maximum recursion error when it
unpacks a tarfile that contains a symlink into a directory that already
contains this symlink.
Attached is a standalone testcase (that probably better explains whats going on
:) and a
Michael Vogt added the comment:
A possible fix that works with the previous testcase for this bug. It does not
break a tarfile tests.
--
keywords: +patch
Added file: http://bugs.python.org/file37689/possible-fix-37688.diff
___
Python tracker
<h
Michael Vogt added the comment:
This patch contains a regression test as well.
--
Added file: http://bugs.python.org/file37690/possible-fix-23228-with-test.diff
___
Python tracker
<http://bugs.python.org/issue23
New submission from Michael Kesper:
source_path = Path('../data')
destination_path = Path('//file_server/work/whatever')
for file_name in source_path.glob('xyz-*'):
shutil.copyfile(source_path / file_name, destination_path / file_name)
leads to:
Traceback (
Michael Vogt added the comment:
Thanks SilentGhost for your feedback and sorry for my slow reply.
I looked into this some more and attached a updated patch with a more complete
test. It also covers a crash now that happens when there is a symlink cycle in
the tar and on disk.
My fix is to
New submission from Michael Schlenker:
The make_ssl_data.py script in Tools/ssl/ needs a python3 to run due to the
usage of open(..., encoding='latin1').
This makes usage on a host without python3 installed more complex than needed.
It should use io.open(...) to run on both p
Michael Schlenker added the comment:
yes, priority is probably low.
Just stumbled over it when building against openssl 1.0.1L and trying to regen
the datafile automatically in a build script.
--
versions: +Python 2.7
___
Python tracker
<h
Michael Vogt added the comment:
Thanks everyone for the comments and feedback!
Attached is a updated patch with tests and a documentation update.
Feedback is very welcome. I decided to skip the test on systems where root is
not uid,gid=0. I could also mock that of course if you prefer it
New submission from Michael Ensslin:
The prototype for the public API function _PyTraceback_Add is declared
_PyTraceback_Add(char *, char *, int);
Internally, its char * arguments are passed verbatim to PyCode_NewEmpty, which
takes const char * arguments.
The missing 'const' qua
Changes by Michael Ensslin :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue24436>
___
___
Python-bugs-list mailing list
Unsubscrib
Michael Foord added the comment:
-1
The whole thread is absurd. I'm travelling for europython and only have
internet access on my phone until tomorrow at the earliest.
On Saturday, 18 July 2015, Berker Peksag wrote:
>
> Changes by Berker Peksag :
>
>
> --
> nosy
Michael Foord added the comment:
assert_has_calls checks that the calls you specified were made. So if you
specify an empty list it *should* pass (or be disallowed as it has no meaning).
If you want to check that these calls and *only* those calls were made you
should use something like
Michael Foord added the comment:
I'm not wild about this idea. The problem with the assert methods has
*essentially* been solved now, so I'm not convinced of the need for this change
(unless users really *need* to have their own mocked attributes like
"assert_called_with&qu
Michael Foord added the comment:
So the problem with the testing-cabal issue 280 is *really* a problem with
decorators - the decorator is applied at method creation time and mock_open is
only called once rather than once *per call*.
Better would be to use mock.patch as a context manager
New submission from Michael Toews:
On Debian x64 stable with Python 2.7 and 3.4, the following causes a
segmentation fault:
from ctypes import string_at
string_at(None)
On Windows 64-bit with Python 2.7 it raises WindowsError and Python 3.3 raises
OSError, both showing a message "a
New submission from Michael Ensslin:
Python 3.4.3 introduced an internal function, _PyTraceback_Add, which is quite
useful when constructing Python exception objects.
I'm using it when constructing a Python Exception object from a C++ exception
object, to add "fake traceback fr
Michael Foord added the comment:
I had a chance to talk to Guido about this at EuroPython. His feeling was that
a separate set of functions *is* a better API - or at least would have been if
mock had been designed this way from the start.
However, the most serious problem with the current
Michael Foord added the comment:
call_args is not user settable! It is set for you by the mock when it is
called. Arguably it could be a property instead.
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
Michael Foord added the comment:
Oops, I misunderstood the bug report - however, call_args is a tuple, so you
can't compare it directly to a string like that. Please refer to the docs on
using call_args.
--
___
Python tracker
Michael Foord added the comment:
Ok, fair enough.
--
resolution: not a bug ->
status: closed -> open
___
Python tracker
<http://bugs.python.org/i
Michael Foord added the comment:
assertLogs is on a Python test suite helper, not TestCase itself.
--
___
Python tracker
<http://bugs.python.org/issue24
Changes by Michael Foord :
--
nosy: -michael.foord
___
Python tracker
<http://bugs.python.org/issue7175>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
This is actually the specified and documented behaviour of mock when it is
passed mutable arguments. Deep copying arguments on calls is rife with
potential problems (not everything can be copied and it breaks comparison by
identity). The documentation suggests
Michael Foord added the comment:
Using the runner as a "context" passed to test cases (and accessible from
tests) for this kind of configuration seems like a good approach to me.
--
___
Python tracker
<http://bugs.python.o
New submission from Michael Walle:
The process_rawq() discards '\x00' and '\x11' bytes.
At least the '\x00' byte is specified by the standard as a No-Op. So this is
standard conform according to RFC 854. But there is also the binary
transmission mode for telnet (
New submission from Michael Schlenker:
The load_dh_params() method of SSLContext does not properly handle unicode
filenames on Windows (like load_verify_location() does).
It should convert any passed unicode path to the filesystem encoding.
This is already fixed in the 3.x head revision, by
Michael Schlenker added the comment:
Yes, the workaround works.
Would be nice if this could be fixed in a 2.7.11...
--
___
Python tracker
<http://bugs.python.org/issue25
New submission from Michael Crouch:
In the section on isinstance() in the Python Standard Library documentation
Chapter 2 (https://docs.python.org/3.6/library/functions.html#isinstance) , it
says that classinfo "may be a tuple of type objects", but it doesn't explain
what the s
New submission from Michael Laß:
When there is a file called "sys" in the local directory of a python script and
warning.warn is called with an invalid stacklevel, python tries to import that
file and throws an error like the following:
>>> import warnings
>>>
Michael Crouch added the comment:
When pickling an object fails on line 70 of copy_reg.py, a "TypeError" is
raised. However, according to section 11.1.3 of the Standard Library
documentation, when an unpicklable object is passed to the dump() method the
"PicklingError&quo
Michael Foord added the comment:
For mock I think your proposed fix is fine. call is particularly magic as
merely importing it into modules can cause introspection problems like this
(venusian is a third party library that has a similar issue), so working around
these problems as they arise
Michael Foord added the comment:
Have you read the docs for call? :-)
call.foo("foo") generates a call object representing a method call to the
method foo. So you can do.
m = Mock()
m.foo("foo")
self.assertEqual(m.mock_calls, call.foo("foo"))
(etc
Michael Foord added the comment:
Preventing the use of "__" attributes would limit the usefulness of call with
MagicMock and the use of magic methods. That might be an acceptable trade-off,
but would break existing tests for people. (i.e. it's a backwards incom
Michael Selik added the comment:
many things are not present in os.__all__ that should be, including
os.getcwd
--
nosy: +selik
___
Python tracker
<http://bugs.python.org/issue23
Michael Selik added the comment:
@Martin, my mistake. You're correct. I forgot I was using Python v3.4.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
Patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue24928>
___
___
Python-bugs-list mailing list
Unsub
Michael Foord added the comment:
I'm happy to blacklist __wrapped__ in call. I don't see how call can detect
that kind of introspection in the general case though. Limiting call depth
would be one option, but any limit is going to be arbitrary and I don't "like&
New submission from Michael Layzell:
It appears that syntax errors generated by checking the AST will get confused
by indentation and place the caret incorrectly.
With no indentation:
===
1 + 1 = 2
===
File "/Users/mlayzell/test.py", line 1
1 + 1 = 2
^
SyntaxError: can
Michael Layzell added the comment:
This should fix the problem. It appears as though the indentation was being
stripped from the program text differently depending on how the error was
produced. In the case of a syntax error from the parser, the indentation was
maintained until it was printed
Michael Foord added the comment:
assertEqual *does* do type checking and it's strict that it will only resort to
the "type specific" assert checks if both types are of the same type. In the
general case it's impossible to know whether comparing a subclass with the type
s
Michael Layzell added the comment:
Sorry for the delay, I finally got around to adding a test.
I'm mildly concerned about the portability of the check, but it seems to work
locally. If people have suggestions about how to make the check more portable,
let me know!
--
Added file:
Michael Layzell added the comment:
Martin's solution seemed like the least work, so that's what I ended up using.
I also switched over to assertRegex, and I agree that it produces better error
messages.
I added a comment to explain the use of the ugly multiline regex, and removed
s
Michael Foord added the comment:
Sean's patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue22138>
___
___
Python-bugs-list m
New submission from Michael Allen:
Modifying a file while getting a stacktrace across multiple threads causes
linecache's cache to bust and del to be called on the global cache variable.
This is not thread safe and raises a KeyError.
Reproducible with,
import threading
import traceback
Michael Foord added the comment:
Suggested behaviour sounds good, patch looks sensible. Is it possible to add a
test too?
--
___
Python tracker
<http://bugs.python.org/issue25
Michael Layzell added the comment:
Sorry for missing the review comments earlier, I didn't notice them (I've not
used this bug tracker before - sorry).
I've attached an updated patch which should not have the variable problem, and
also takes some of the other review commen
Michael Layzell added the comment:
Oops. Should be fixed now.
--
Added file: http://bugs.python.org/file41559/cpython25677.patch
___
Python tracker
<http://bugs.python.org/issue25
Michael Foord added the comment:
In inspect checking that __code__ is a code object, or that co_flags is an int,
would be better than special casing mock.
However, the patch to mock looks reasonable to me. It copies the whole code
object from the original function to the mock object. The
Michael Foord added the comment:
To find and run tests recursively from a test package you want test discovery
rather than (necessarily) load_tests.
For a bug report, please describe the behaviour you expect and the behaviour
you're seeing in
Changes by Michael Foord :
--
nosy: -gvanrossum
___
Python tracker
<http://bugs.python.org/issue26140>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
create_autospec and Mock(spec=spec) are very different. Mock(spec=spec) creates
a mock object with the same *attributes* as the original. It does not create
functions like create_autospec can.
--
resolution: -> not a bug
stage: -> resolved
Michael Cuthbert added the comment:
this is my first contribution to Python core so I really have no idea how to do
this, but I have found a solution (works in Py3.4, 2.7):
in doctest.py after line 1087 ("lineno = getattr(obj, 'co_firstlineno',
None)-1") add these lines
Michael Cuthbert added the comment:
The test looks great to me. Does anyone on nosy know the proper way to request
a patch review?
--
___
Python tracker
<http://bugs.python.org/issue17
Michael Foord added the comment:
TestProgram is an abomination, but it has been publicly exposed in unittest
since forever.
--
___
Python tracker
<http://bugs.python.org/issue20
New submission from Michael Herold:
argparse has at least three features to set defaults (default=, set_defaults(),
argument_default=). However, there is no feature to set the values of
arguments.
The difference is, that a required argument has to be specified, also if a
default value
Michael Herold added the comment:
Thank you for clarifying my request. Callables sound like a great solution to
me!
Looks like the fallback should be called in `take_action()` if argument_values
is "empty" (None?). Per default it should be transparent to an `Action` if the
values
Michael Foord added the comment:
There have been persistent calls for an "assert_called" method over the
lifetime of mock. In the past I've rejected them because you can easily get it
by asserting the call count is non-zero and I want to avoid the proliferation
of a thousand
New submission from Michael Felt:
I have successful enough with python 2.7.10 (for building cloud-init),
including it finding openssl libraries during the installation od setuptools
(before installing pip).
I have also been able to assemble saltstack - BUT - salt-master and salt-minion
fail
Michael Felt added the comment:
p.s. On a debian (on POWER) system, the function is working, but the test seems
a bit broken as well, i.e., cdll.LoadLibrary("libm.so") is not working even
though
if os.name == "posix":
# find and load_version
p
Michael Felt added the comment:
Further testing...
I added an extremely simple hack in util.py so that a archive (AIX library)
name got returned.
Also in this case - the print cdll.LoadLibrary("libc.a") fails.
+74 if os.name == "posix" and sys.platform == "
Michael Felt added the comment:
Last message (back to debian, and minor changes to learn expected behavior)
if sys.platform == "darwin":
print cdll.LoadLibrary("libm.dylib")
print cdll.LoadLibrary("libcrypto.dylib")
Michael Felt added the comment:
FYI: getting objdump is not too hard...
root@x064:[/data/prj/gnu/binutils-2.25.1]v/null /usr/lib/libcrypto.a <
In archive /usr/lib/libcrypto.a:
libcrypto.so: file format aixcoff-rs6000
libcrypto.so.0.9.8: file format aixcoff-rs6
Changes by Michael Felt :
--
title: ctypes.util.find_library fails ALWAYS when gcc is not used ->
ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)
___
Python tracker
<http://bugs.python.org/issu
Michael Felt added the comment:
The _dlopen call in __init__.py I have been able to fix (hack) with the
following:
root@x064:[/data/prj/aixtools/python/python-2.7.10/Lib/ctypes]diff -u
__init__.py /opt/lib/python2.7/ctypes/__init__.py
--- __init__.py 2015-05-23 16:09:01 +
+++ /opt/lib
Michael Felt added the comment:
it was, partly, about the technical details - but I feel I have found the key
bits - /full/path/libNAME.a(libNAME.so) + dlflags RTLD_NOW + RTLD_MEMBER for
"native" AIX support.
Additionally, a patch should not break what might be working for some (via
Michael Felt added the comment:
Oops: forgot the example output:
root@x064:[/data/prj/aixtools/src]python -m ctypes.util
libm.a(libm.so)
libc.a(libc.so)
libbz2.a(libbz2.so)
libcrypto.a(libcrypto.so)
libcrypt.a(libcrypt.so)
--
___
Python tracker
Michael Felt added the comment:
The following demonstrates the basics.
cdll.LoadLibrary will load a .so file if it can be located (you will have to
believe me as I forgot to include the test in this last batch)
Further, when given the AIX format for loading a member of an archive
(e.g
Michael Felt added the comment:
while reading to learn...
FYI: AIX does not return even a hint of the underlying platform (assumption is
probably 64-bit) - but the value of the interpreter is anyone's guess
root@x064:[/data/prj/aixtools/python/python-2.7.10]python
Python 2.7.10 (default
New submission from Michael Felt:
Finally noticed the new release, unfortunately it fails to build.
All proceeds normally until...
tail .buildaix/make.out
ar rc libpython2.7.a Parser/acceler.o Parser/grammar1.o Parser/listnode.o
Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o
Michael Felt added the comment:
It worked fine using xlc with 2.7.10 (verified again today).
The delta between ceval.c in 2.7.10 and 2.7.11 is large.
make.out (excerpt) 2.7.10:
rm -f libpython2.7.a
ar rc libpython2.7.a Modules/getbuildinfo.o
ar rc libpython2.7.a Parser
Michael Felt added the comment:
If you need assistance (re: AIX), just ask.
However, I am guessing you have enough to move forward.
--
___
Python tracker
<http://bugs.python.org/issue18
Michael Felt added the comment:
the basic process I have used repeatedly (for calling ./configure) to package
python, and many other things has not changed.
Today, I repackaged version 2.7.10 (the file listed in 2.7.10.0) just to test
the process I was using with 2.7.11
I learned that 2.7.10
Michael Felt added the comment:
At first I thought it might be a 0x0001 rather than 0x0003 (as I have no idea
what the additional info is AND that the lines starting with [0] are the Symbol
0 (zero) you indicate the message.
Also thought it might have been the double listing of some symbols
New submission from Michael Jacob:
There seems to be a bug in configparser when setting new values in extended
interpolation:
python --version
Python 3.5.1
from configparser import ConfigParser, ExtendedInterpolation
c=ConfigParser(interpolation=ExtendedInterpolation)
c.add_section('
Michael Jacob added the comment:
My bad.
ConfigParser expects an interpolation object, not a class.
Instead of c=ConfigParser(interpolation=ExtendedInterpolation)
you need to create it with:
c=ConfigParser(interpolation=ExtendedInterpolation())
Sorry about that.
--
resolution
Michael Felt added the comment:
Patched to fp22: vacpp.11.1.0.22.aix53TL7-71.sept2015.ptf.tar.Z
after reinstalling system! to be sure no garbage left around.
Only updates are openSSL/SSH packages; no RPM's installed.
Same error message(s).
Tried compiling ceval.o with -O0 (capt. O,
Michael Herold added the comment:
I have prepared a working patch to sketch how this could be implemented. A
small example (example.py) shows how this feature can be used to implement a
fallback to environment variables.
This patch allows Currying of positional arguments (i.e. you can give
Changes by Michael Herold :
Added file: http://bugs.python.org/file42062/example.py
___
Python tracker
<http://bugs.python.org/issue26394>
___
___
Python-bugs-list mailin
Michael Felt added the comment:
wonderful suggestion - it gets the build past that hurdle.
My bad that I had not looked more carefully at configure --help output.
But that brings back another 'issue' I had also seen when verifying 2.7.10. I
shall look in the bug-list for a relate
Michael Felt added the comment:
FYI: when build and src are the same directory, there is no error message.
However, when src and build are in seperate directories (e.g.,
build = '.',
src = '../src/python-2.7.11'
the following message occurs MANY times:
unable to execute &
Michael Felt added the comment:
Since you are looking, maybe look at whether it is also libreSSL compatible?
--
nosy: +Michael.Felt
___
Python tracker
<http://bugs.python.org/issue26
Changes by Michael Felt :
--
title: cannot build python 2.7.11 on AIX -> could not build python 2.7.11 on AIX
___
Python tracker
<http://bugs.python.org/issu
Michael Felt added the comment:
Would just like to add my heartfelt thanks for the simple hint
And, perhaps something to add to the Docs
After adding "--without-computed-gotos" I can complete a (default) configure,
make, make (DESTDIR=xxx) install of
* python-2.7.11 (was not
Michael Felt added the comment:
FYI: build as 64-bit (and shall only build as 64-bit from now I expect)
and the output works as:
==
aixtools.python:aixtools.python.man.en_US:2.7.11.0::I:C:N:man pages0::
aixtools.python:aixtools.python.rte:2.7.11.0::I:C
Michael Cuthbert added the comment:
looks like we're stuck on a style change (backslash to parens; ironic: I chose
backslash to match surrounding code; I never use them myself). tuxtimo - could
you fix this? (or I'll do once the move to github is done
Michael Felt added the comment:
Hope it is okay for me to close this. As it is working with the additional flag
to configure.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/issu
Michael Felt added the comment:
The patch works when installed on top of pre-compiled version (e.g., copy the
two files to /opt/lib/python2.7/ctypes/
but there seems to be a nasty side-effect when trying to build.
make completes, but make install fails during a compile step.
Please assist
Michael Herold added the comment:
Thanks so much for looking into my patch!
Let me start by outlining that I don't understand how your alternate
solutions are coping with the key problem. You are assuming that you get
a populated Namespace object. However, `_parse_known_args` is exiti
Michael Foord added the comment:
Yes, this can go in.
--
___
Python tracker
<http://bugs.python.org/issue26323>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Herold added the comment:
Yes, a fallback hook at the end of parsing would have to be placed >
before the 'required' testing, not after as in my 'group' testing.
Just to clarify: Would you suggest that a fallback call returns the
parsed value (i.e. the fallback ca
New submission from Michael Crouch:
Shelve types in Python 2.7 don't implement the 'viewkeys', 'viewvalues', and
'viewitems' methods.
Section 11.4 of the Python Standard Library documentation says that "Shelf
objects support all methods supported by d
Michael Felt added the comment:
fyi: just completed a test both as 32 and 64 bit build.
However, openssl-1.0.1.514 does not work in 64-bit mode (packaging error).
Fortunately, openssl-1.0.1.515 (released 02-March-2016) fixes that.
In short, 64-bit build is dependent on openssl-1.0.1.515
Here
Michael Felt added the comment:
Ah, good news - the build is successful ONCE I open the file
./Lib/ctypes/util.py and find the (hiding) tab characters and replace them with
8 space characters. (And I had tried so hard to check for that in advance).
So, if you apply the patch - it may need
2701 - 2800 of 3045 matches
Mail list logo