[issue34832] "Short circuiting" in base64's b64decode, decode, decodebytes

2018-09-28 Thread Michael Harris
New submission from Michael Harris : When given an invalid base64 string that starts with a valid base64 substring, the functions will return the decoded bytes only up to the substring rather then ignoring the non-alphabet character. Examples: >>> base64.b64decode("&qu

[issue34858] MappingProxy objects should JSON serialize just like a dictionary

2018-09-30 Thread Michael Smith
New submission from Michael Smith : If a mappingproxy object is a read-only proxy to a mapping, would it make sense for them to JSON serialize just like the mapping they come from? Currently, json.dumps throws the "I don't know how to serialize this" error: $ python -c '

[issue34860] fix test_sqlite for AIX

2018-10-01 Thread Michael Felt
New submission from Michael Felt : On AIX test_sqlite fails with: == FAIL: test_database_source_name (sqlite3.test.backup.BackupTests) -- Traceback (most

[issue34860] fix test_sqlite for AIX

2018-10-01 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +9044 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34860> ___ ___ Py

[issue34860] fix test_sqlite for AIX

2018-10-01 Thread Michael Felt
Michael Felt added the comment: I just pulled master, did not see Modules/_sqlite/connection.c <https://github.com/python/cpython/commit/b10a64d117de6121ea3e79c467c4107f8f399f3d#diff-affe43c743133796bb0a7eec464483b9> in the list, but I redo everything for just in case and update later.

[issue34860] fix test_sqlite for AIX

2018-10-01 Thread Michael Felt
Michael Felt added the comment: Yes, that seems to have fixed it already. Closing the PR and issue! Thx for the quick response! On 10/1/2018 1:37 PM, Michael Felt wrote: > Michael Felt added the comment: > > I just pulled master, did not see Modules/_sqlite/connection.c

[issue34860] fix test_sqlite for AIX

2018-10-01 Thread Michael Felt
Michael Felt added the comment: duplicate of issue34743 -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue27643] test_ctypes fails on AIX with xlc

2018-10-01 Thread Michael Felt
Michael Felt added the comment: well, update: the issue34603 merged 16 days ago has broken this PR - that has been waiting for nearly 10 months. Unhappy camper. And, just as a short reminder - there were earlier ¨patches (that I just copied) going back more than 2 years. Please, some

[issue34858] MappingProxy objects should JSON serialize just like a dictionary

2018-10-01 Thread Michael Smith
Michael Smith added the comment: OK, I appreciate the response. The MappingProxy objects I am working with are in a nested data structure, so accessing them to coerce them directly isn't feasible. I created class MappingProxyEncoder(JSONEncoder): def default(self, obj): if isins

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Change by Michael Felt : Added file: https://bugs.python.org/file47840/mime-attachment Added file: https://bugs.python.org/file47841/encrypted.asc ___ Python tracker <https://bugs.python.org/issue34

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: Final attempt to send as plain text On 10/2/2018 1:07 AM, Benjamin Peterson wrote: > On Mon, Oct 1, 2018, at 12:12, Michael Felt wrote: >> Hi all, >> >> Before I submit a patch to increase the default MAXDATA setting for AIX >> when

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: On 10/2/2018 10:36 AM, STINNER Victor wrote: > STINNER Victor added the comment: > > Jeremy Kloth: "This is also an issue on Windows when the target path resides > within a junction, paths outside of a junction respond (err, fail) as >

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: Was not my intent. Firewall issues. After 4 more attempts gave up until now. On 10/2/2018 3:17 PM, STINNER Victor wrote: > STINNER Victor added the comment: > >> 2018-10-02 11:02:32 Michael.Feltset files: + mime-attachment, >> e

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Michael Felt added the comment: On 10/2/2018 7:36 PM, Michael Felt wrote: > Python is designed as a thin wrapper to the operating system. IMHO Python > must not validate the filename itself. To shorten the discussion, I'll kill the current PR and just modify the test to skip t

[issue34711] return ENOTDIR when open() accepts filenames with a trailing slash

2018-10-02 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +9063 ___ Python tracker <https://bugs.python.org/issue34711> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34711] Fix test_httpservers on AIX (trailingSlashOK)

2018-10-02 Thread Michael Felt
Michael Felt added the comment: Changed the title to reflect the requested change is only in Tests. -- components: -IO title: return ENOTDIR when open() accepts filenames with a trailing slash -> Fix test_httpservers on AIX (trailingSlas

[issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory

2018-10-03 Thread Michael Felt
Michael Felt added the comment: Closed "test" version. made new PR that makes server.py conform to Issue17234 demands -- components: +Library (Lib) -Tests title: Fix test_httpservers on AIX (trailingSlashOK) -> Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.en

[issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory

2018-10-03 Thread Michael Felt
Change by Michael Felt : -- pull_requests: +9073 ___ Python tracker <https://bugs.python.org/issue34711> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31203] socket.IP_PKTINFO is missing from python

2018-10-03 Thread Michael Felt
Michael Felt added the comment: FYI: define exists on Linux 3.16.0-4-powerpc64 #1 SMP Debian 3.16.7-ckt9-3 (2015-04-23) ppc64 GNU/Linux SunOS 5.11 11.3 Not on AIX -- nosy: +Michael.Felt ___ Python tracker <https://bugs.python.org/issue31

[issue11191] test_search_cpp error on AIX (with xlc)

2018-10-04 Thread Michael Felt
Michael Felt added the comment: The current PR8709 resolves two issues, not one - so will create a new issue for the second element. Am also shorting the NEWS text, with the expanded explanation here as: * skip the distutils test 'test_search_cpp' when not gcc as compiler becau

[issue34897] distutils test errors when CXX is not set

2018-10-04 Thread Michael Felt
New submission from Michael Felt : while researching issue11191 I cam across 6 additional errors. There is a test in Lib/test/support/__init__.py def missing_compiler_executable(cmd_names=[]): """Check if the compiler components used to build the interpreter exist.

[issue34897] distutils test errors when CXX is not set

2018-10-04 Thread Michael Felt
Change by Michael Felt : -- keywords: +patch pull_requests: +9091 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34897> ___ ___ Py

[issue34988] Rc2 candidates: "gcc" not found on AIX

2018-10-15 Thread Michael Felt
New submission from Michael Felt : Both rc2 packages - $ ls -l *.xz -rw-r--r--1 aixtools staff 17178404 Oct 13 02:41 Python-3.6.7rc2.tar.xz -rw-r--r--1 aixtools staff 16974832 Oct 13 02:24 Python-3.7.1rc2.tar.xz return the same error on a system using gcc as default compiler

[issue12572] HP/UX compiler workarounds

2018-10-15 Thread Michael Osipov
Michael Osipov <1983-01...@gmx.net> added the comment: I believe this issue can be safely closed. It is a no-brainer to compile Python from master on HP-UX with aCC these days. It works for me at least. -- nosy: +michael-o ___ Python t

[issue34988] Rc2 candidates: "gcc" not found on AIX

2018-10-16 Thread Michael Felt
Michael Felt added the comment: I'll compare with the 3.7.0. As I did not have access to gcc then, would have never seen it. Yesterday I used --with-gcc, today I'll use CC=gcc and update after I know more. -- ___ Python track

[issue34988] Rc2 candidates: "gcc" not found on AIX

2018-10-16 Thread Michael Felt
Michael Felt added the comment: using CC=gcc ./configure works fine And, this does not appear to be a regression: HEAD is now at 1bf9cc5 3.7.0 final $ cd ../python3-3.7.0 $ ./configure checking for git... found checking build system type... powerpc-ibm-aix7.2.0.0 checking host system type

[issue34988] Rc2 candidates: "gcc" not found on AIX

2018-10-18 Thread Michael Felt
Michael Felt added the comment: On 16/10/2018 21:35, Ned Deily wrote: > Ned Deily added the comment: > > I'm glad it works. Any object to closing this issue then? I have no objection. Should I do that? > > -- > resolution: -> not a bug > stage: -> re

[issue35057] Email header refolding adds additional \r in nested parse trees

2018-10-24 Thread Michael Thies
New submission from Michael Thies : Email header refolding in email._header_value_parser adds additional carriage return symbols to the end of nested parse trees, when used with an EmailPolicy with linesep='\r\n'. This leads to broken email headers when composing an email with a &q

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-10-24 Thread Michael Airey
Michael Airey added the comment: Try this - https://github.com/siddhesh/cpython/tree/func-cast -- nosy: +resmord ___ Python tracker <https://bugs.python.org/issue33

[issue35050] Off-by-one bug in AF_ALG

2018-10-24 Thread Michael Airey
Michael Airey added the comment: The error checking code for salg_name and salg_type have an off-by-one bug. Must check that both strings are NUL terminated strings. -- nosy: +resmord ___ Python tracker <https://bugs.python.org/issue35

[issue35058] Unable to Install Python on Windows

2018-10-24 Thread Michael Airey
Michael Airey added the comment: Did you try to use SubInACL tool by Microsoft? Perhaps, it can fix your issue. Here, I'm adding references for the same i.e. download link & guide (Method #13) to use it: 1. https://www.microsoft.com/en-in/download/details.aspx?id=23510

[issue34424] Unicode names break email header

2018-10-25 Thread Michael Thies
Michael Thies added the comment: Thanks for pointing me to this issue. :) > Michael, if you could check if Jens patch fixes your problem I would > appreciate it. Jens PR does exactly, what I proposed in #35057, so it fixes my problem,

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
New submission from Michael Saah : A call to time.strftime('%') returns '%' A similar call to datetime.utcfromtimestamp(int(time.time()).strftime('%') raises ValueError: strftime format ends with raw % Similar inputs like '%D %' behave similarly.

[issue33533] Provide an async-generator version of as_completed

2018-10-25 Thread Michael DePalatis
Michael DePalatis added the comment: Is there any progress on this? I was thinking the exact same thing regarding the backwards-compatible approach and would like to work on it if no one else is. -- nosy: +mivade ___ Python tracker <ht

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
Michael Saah added the comment: Ok, seems reasonable. What branch would I submit a PR against? On Thu, Oct 25, 2018 at 1:11 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > I think it would be a good idea to make this more consistent. We should > run through

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
Michael Saah added the comment: >From a pure usability standpoint I'd prefer for datetime to match the time behavior you're demonstrating, that is to not fail on a dangling %. Of course I defer to the dev team on this, but I want to make clear where I'm coming from. On Thu,

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-25 Thread Michael Saah
Michael Saah added the comment: Did a little digging. Seems that there are two versions of the datetime module, a C version (looks like an accelerator module) and a Py version. Both define a wrap_strftime function that replace %z, %Z and %f format codes before handing off to the timemodule.c

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2018-10-26 Thread Michael Saah
Michael Saah added the comment: Appologies, will do. -- ___ Python tracker <https://bugs.python.org/issue35066> ___ ___ Python-bugs-list mailing list Unsub

[issue33236] MagicMock().__iter__.return_value is different from MagicMock().__iter__()

2018-10-27 Thread Michael Foord
Michael Foord added the comment: This isn't a bug. This is the intended behaviour, otherwise MagicMock objects would error out on iteration. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python t

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-10-28 Thread Michael Felt
Michael Felt added the comment: re; the current status of PR8672 - which I shall probably close as it no longer merges. @taleinat re: the need for lambda As _find_mac_netstat() is only called once the need for the last two arguments may be unnecessary. My reason for including them was to

[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread Michael Hoffman
Michael Hoffman added the comment: glibc `getcwd()` and `get_current_dir_name()` are not the same. glibc `get_current_dir_name()` does, in fact, check the `PWD` environment variable. https://www.gnu.org/software/libc/manual/html_node/Working-Directory.html The get_current_dir_name function

[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Michael Hoffman
Michael Hoffman added the comment: > * For some libc functions we add options to existing functions rather of > duplicating the number of names in the os module. For example the dir_fd > option instead of *at() functions. Wouldn't be better to add a buulean > paramet

[issue1154351] add get_current_dir_name() to os module

2018-10-29 Thread Michael Hoffman
Michael Hoffman added the comment: `getcwd()` in many ways serves the purpose that a `lget_current_dir_name()` might. -- ___ Python tracker <https://bugs.python.org/issue1154

[issue34897] distutils test errors when CXX is not set

2018-10-29 Thread Michael Felt
Michael Felt added the comment: > On 10/26/2018 5:36 PM, Tal Einat wrote: > Tal Einat added the comment: > > I'm not sure that the resolution currently suggested, changing > compiler.set_executables(), is the right way to go. > > This change to distuti

[issue34765] Update install-sh

2018-10-29 Thread Michael Felt
Michael Felt added the comment: This is closed, however, since this was merged the AIX buildbots have failed. This is because the file mode bits lack the -x root@x066:[/data/prj/python/git/cpython-master]find . -name install-sh -ls 148833829 16 -rw-r--r-- 1 root felt 15368

[issue34765] Update install-sh

2018-10-29 Thread Michael Felt
Michael Felt added the comment: FYI: On my manual build server I have coreutils "install" installed, and it seems install-sh is not called in that case (which is why I never saw with manual builds) FYI: There is also an issue (I hope side-effect) that pyexpat is not building whi

[issue34765] Update install-sh

2018-10-29 Thread Michael Felt
Michael Felt added the comment: The AIX build-bots thank you. Back to "failed-test" status. 1721...failed test (failure) 1720...failed compile (failure) -- ___ Python tracker <https://bugs.python.o

[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-10-30 Thread Michael Osipov
Michael Osipov <1983-01...@gmx.net> added the comment: Victor, looks good to me: 0:00:26 [ 23/419/3] test_utf8_mode passed. I don't know wether it is related, but test_unicode crash dumps here: 0:00:22 [ 16/419/2] test_unicode crashed (Exit code -11) Fatal Python error: Segment

[issue33533] Provide an async-generator version of as_completed

2018-10-30 Thread Michael DePalatis
Change by Michael DePalatis : -- keywords: +patch pull_requests: +9565 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33533> ___ _

[issue34897] distutils test errors when CXX is not set

2018-11-05 Thread Michael Felt
Michael Felt added the comment: Thx. So, while "" is not None (i.e., "" is not False), it does test as a Boolean expression as 'False' so the test for None or "" is the same as testing for "" (but not the same as testing for None). I ac

[issue35198] Build issue while compiling cpp files in AIX

2018-11-10 Thread Michael Felt
Michael Felt added the comment: There are, perhaps, other issues as well. After a build of "master" a) pip3 install pandas - failed to find/download and build numpy - after "manual" pip3 install numpy and got to " six, python-dateutil, pytz, pandas" Then:

[issue35198] Build issue while compiling cpp files in AIX

2018-11-10 Thread Michael Felt
Change by Michael Felt : -- versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue35198> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35198] Build issue while compiling cpp files in AIX

2018-11-10 Thread Michael Felt
Michael Felt added the comment: Getting farther - after "hacking" pandas setup.py to not force a gcc flag. Still not getting as far, I think, as the initial poster. ... /opt/include/python3.8dm -c pandas/_libs/parsers.c -o build/temp.aix-6.1-3.8-pydebug/pandas/_libs/parsers.o x

[issue35198] Build issue while compiling cpp files in AIX

2018-11-11 Thread Michael Felt
Michael Felt added the comment: Still getting the same errors, even with 64-bit build, so still not close to testing the actual problem. FYI: last time I build pandas the version was 0.19.0 - then it was 'simple'. Anyway, short of a simple (test) python module that includes c++

[issue35226] mock.call equality surprisingly broken

2018-11-13 Thread Michael Foord
Michael Foord added the comment: Parents comparing upwards sounds like the right (and simple) fix. Not breaking the tuple tests would be good. I'm happy for Chris to produce the patch. -- ___ Python tracker <https://bugs.python.org/is

[issue35234] ssl module falls over with internationalized domain names

2018-11-13 Thread Michael Casadevall
New submission from Michael Casadevall : Test case attached. In Python 3.6, ssl tries to validate the hostname on its own, but fails to convert the SSL certificates hostname from IDNA back to UTF-8 and mismatches. Python 3.7 and master are unaffected since this got fixed by accident when

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2018-11-14 Thread Michael Felt
Michael Felt added the comment: Historically, I started this issue because I saw that none of the calls made in uuid.py were working for AIX. I also assumed that they ALL worked already, at least somewhere. a) one cause is the difference between AIX and (all) others was the letter chosen

[issue28009] core logic of uuid.getnode() is broken for netstat

2018-11-14 Thread Michael Felt
Change by Michael Felt : -- title: core logic of uuid.getnode() is broken for AIX - all versions -> core logic of uuid.getnode() is broken for netstat ___ Python tracker <https://bugs.python.org/issu

[issue18054] Add more exception related assertions to unittest

2013-05-28 Thread Michael Foord
Michael Foord added the comment: I'm slightly torn. TestCase has a wide (wy too wide) API and adding methods makes it wider. The use cases for these methods are relatively niche, so my instinct would be that these don't meet the bar for inclusion on TestCase. On the other han

[issue17846] Building Python on Windows - Supplementary info

2013-05-29 Thread michael kearney
michael kearney added the comment: Thanks for the pointer to your work and discussion in issue16895. I was contemplating something along those lines. I had not started down that path first because I've only relatively recently thrashed the problem enough to understand the issues, and s

[issue18054] Add more exception related assertions to unittest

2013-06-04 Thread Michael Foord
Michael Foord added the comment: There's always (almost) support for exploration... -- ___ Python tracker <http://bugs.python.org/issue18054> ___ ___ Pytho

[issue16662] load_tests not invoked in package/__init__.py

2013-06-12 Thread Michael Foord
Changes by Michael Foord : -- assignee: -> michael.foord nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issue16662> ___ ___ Python-bugs-lis

[issue18198] unittest discover should provide a way to define discovery at package level

2013-06-12 Thread Michael Foord
Michael Foord added the comment: The load_tests protocol is already the intended way for test writers to customize discovery. The problem, as issue 16662 states, is that load_tests is not invoked for packages by default. Fixing that is the right fix. I'm rejecting this issue in favo

[issue16662] load_tests not invoked in package/__init__.py

2013-06-12 Thread Michael Foord
Michael Foord added the comment: I agree that load_tests *should* be used in packages and that not doing this from the start was a mistake. -- ___ Python tracker <http://bugs.python.org/issue16

[issue18223] Refactor test_tarfile

2013-06-16 Thread Michael Foord
Changes by Michael Foord : -- nosy: -michael.foord ___ Python tracker <http://bugs.python.org/issue18223> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7982] extend captured_output to simulate different stdout.encoding

2013-07-06 Thread Michael Hart
Changes by Michael Hart : -- nosy: +mike_hart ___ Python tracker <http://bugs.python.org/issue7982> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts

2013-07-06 Thread Michael Twomey
Michael Twomey added the comment: I've picked up on this as part of the EP 2013 sprints. I've attached a patch which implements the behaviour described in the comments. It doesn't break any existing functionality but the help generated by argparse is definitely

[issue18402] Finding perl64

2013-07-07 Thread Michael Dorman
New submission from Michael Dorman: Perl64 installs into C:\perl64\bin Can we include this path in the search list? -- components: Build files: build_ssl_with_perl64.patch keywords: patch messages: 192615 nosy: brian.curtin, mjdorma priority: normal severity: normal status: open title

[issue15494] Move test/support.py into a test.support subpackage

2013-07-07 Thread Michael Dorman
Michael Dorman added the comment: move_test_support.patch didn't break tests under Windows x64 -- nosy: +mjdorma ___ Python tracker <http://bugs.python.org/is

[issue18338] python --version should send output to STDOUT

2013-07-09 Thread Michael Dickens
Michael Dickens added the comment: Patch for issue 18338. Changes output for --version and updates unit test accordingly. -- nosy: +MTGandP Added file: http://bugs.python.org/file30881/issue18338.diff ___ Python tracker <http://bugs.python.

[issue16665] doc for builtin hex() is poor

2013-07-09 Thread Michael Dickens
Michael Dickens added the comment: I used the wording suggested by rurpy with some changes. I also added a few examples. -- keywords: +patch nosy: +MTGandP Added file: http://bugs.python.org/file30882/issue16665.diff ___ Python tracker <h

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-07-10 Thread Michael Foord
Michael Foord added the comment: I'd like to review this properly before committing it. I agree it solves a real problem and your new patch looks good. -- ___ Python tracker <http://bugs.python.org/is

[issue18455] Multiprocessing connection SocketClient retries connection on socket

2013-07-14 Thread Michael Ballantyne
New submission from Michael Ballantyne: from multiprocessing/connection.py: while 1: try: s.connect(address) except socket.error, e: if e.args[0] != errno.ECONNREFUSED or _check_timeout(t): debug('failed to connect to address %s'

[issue18472] PEP 8 updates - internal interfaces and import *

2013-07-17 Thread Michael Foord
Changes by Michael Foord : -- nosy: +michael.foord ___ Python tracker <http://bugs.python.org/issue18472> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18458] libedit history offset workaround

2013-07-21 Thread Michael Kleehammer
Michael Kleehammer added the comment: Just wanted to chime in that I reported this to Apple and their response was exactly this. (Perhaps Ronald works for Apple?) Is there a temporary work around in the meantime other than rebuilding everything? -- nosy: +mkleehammer

[issue18526] Add resource management/guarding to unittest

2013-07-23 Thread Michael Foord
Michael Foord added the comment: My question is, is this generally useful enough for test suites beyond the Python standard library. Essentially it provides a command line interface to specialized test skipping. I *still* feel that a generalized mechanism for adding command line options to

[issue16662] load_tests not invoked in package/__init__.py

2013-08-01 Thread Michael Foord
Michael Foord added the comment: I'm happy with the check being removed. The old behaviour was documented I believe - so there'd need to be documentation changes to go with it. As the old behaviour is so "un-useful" I don't think there are backward compatibilit

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2013-08-01 Thread Michael Foord
New submission from Michael Foord: As reported at: http://code.google.com/p/mock/issues/detail?id=209 >>> from unittest import mock [107971 refs] >>> mock.mock_open [107974 refs] >>> a = mock.mock_open() [109965 refs] >>> a.reset_mock() ... -

[issue18622] reset_mock on mock created by mock_open causes infinite recursion

2013-08-02 Thread Michael Foord
Michael Foord added the comment: The best way to solve this seems to be to track a set of visited ids (mocks we've reset) and not recurse into mocks we've already done. This is similar to the patch proposed on the google code issue - but not identical as that uses a list and has

[issue11798] Test cases not garbage collected after run

2013-08-04 Thread Michael Foord
Michael Foord added the comment: This smells like a new feature to me (it's certainly a fairly significant change in behaviour) and isn't appropriate for backporting to 2.7. It can however go into unittest2. I agree with David that a destructive iteration using pop is more likely

[issue11798] Test cases not garbage collected after run

2013-08-04 Thread Michael Foord
Michael Foord added the comment: The doc patch looks good, thanks Matt. I'll read it through properly before committing. -- ___ Python tracker <http://bugs.python.org/is

[issue18381] unittest warnings counter

2013-08-09 Thread Michael Foord
Michael Foord added the comment: Looks good to me, except the backslash continuation is unneeded. Needs documentation. -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issu

[issue17974] Migrate unittest to argparse

2013-08-09 Thread Michael Foord
Michael Foord added the comment: The patch looks like an improvement. Does it maintain the ability to pass the discovery arguments positionally and by keyword? If so then it can go in. I like the improved error reporting for nonsenical input to unittest.main

[issue18769] argparse remove subparser

2013-08-17 Thread Michael Bikovitsky
New submission from Michael Bikovitsky: It might be useful in some circumstances to be able to remove a subparser, however the module does not provide such functionality. The proposed method takes the same arguments as the add_parser method and removes the matching subparser from the map

[issue18765] unittest needs a way to launch pdb.post_mortem or other debug hooks

2013-08-17 Thread Michael Foord
Michael Foord added the comment: This is done in outcome.testPartExecutor. If you add it in the except clause then it is *only* called on test failure or error. If we call it unconditionally with the result (maybe a sys.exc_info tuple?) then it could have extended use cases (perhaps custom

[issue18790] incorrect text in argparse add_help example

2013-08-20 Thread Michael Bikovitsky
Changes by Michael Bikovitsky : -- keywords: +patch Added file: http://bugs.python.org/file31393/doc_fix.patch ___ Python tracker <http://bugs.python.org/issue18

[issue18790] incorrect text in argparse add_help example

2013-08-20 Thread Michael Bikovitsky
Changes by Michael Bikovitsky : -- nosy: +Michael.Bikovitsky ___ Python tracker <http://bugs.python.org/issue18790> ___ ___ Python-bugs-list mailing list Unsub

[issue14971] (unittest) loadTestsFromName does not work on method with a decorator

2013-08-21 Thread Michael Foord
Michael Foord added the comment: Cool, thanks! -- assignee: -> michael.foord ___ Python tracker <http://bugs.python.org/issue14971> ___ ___ Python-bugs-lis

[issue11798] Test cases not garbage collected after run

2013-08-27 Thread Michael Foord
Michael Foord added the comment: Go ahead and commit. The functionality and patch are good. -- ___ Python tracker <http://bugs.python.org/issue11798> ___ ___ Pytho

[issue18848] In unittest.TestResult .startTestRun() and .stopTestRun() methods don't work

2013-08-27 Thread Michael Foord
Michael Foord added the comment: It is the TextTestRunner that calls startTestRun and stopTestRun not the suite. The documentation could be improved to make that clear *or* the call could be moved into the TestSuite as not everybody uses the TextTestRunner. That would be a change in

[issue11798] Test cases not garbage collected after run

2013-09-01 Thread Michael Foord
Michael Foord added the comment: I'd rather not propagate more options all the way through, especially as this is some thing that should be decided by the test framework and is unlikely to be something you want to turn on and off per test run (which is what command line options ar

[issue18914] Confusing documentation in the urllib2 HOWTO

2013-09-03 Thread Michael Foord
Michael Foord added the comment: As David explained, the linked article *explains* basic auth as well as showing how to use the standard library support. I think the article is still of some value, it has certainly been useful to many people. -- resolution: -> wont fix st

[issue18937] add unittest assertion for logging

2013-09-06 Thread Michael Foord
Michael Foord added the comment: So making assertions about logging is very common, but I *always* do this by just mocking out the logger and making an assertion about the call. It's trivially easy to do. -- ___ Python tracker

[issue18937] add unittest assertion for logging

2013-09-06 Thread Michael Foord
Michael Foord added the comment: Do you have a lot of circumstances where you want to test logging but you don't know the specific logger and method called? That's not a situation I've been in. -- ___ Python tracker <http

[issue16662] load_tests not invoked in package/__init__.py

2013-09-07 Thread Michael Foord
Michael Foord added the comment: I get a couple of test failures with this patch applied: == ERROR: test_find_tests (unittest.test.test_discovery.TestDiscovery

[issue18937] add unittest assertion for logging

2013-09-07 Thread Michael Foord
Michael Foord added the comment: The patch and approach look good to me (with docs needed). Note, personally I would not use a leading underscore for the assertion methods (in the tests) _assertNoStderr and _assertLogRecords. -- ___ Python tracker

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
New submission from Michael Foord : time.time() can return None, or sometimes NaN. If it can't get a "proper" value from the OS then I would expect it to throw an exception. The docs don't mention anything about error conditions. This was originally reported to Ubuntu On

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
Changes by Michael Foord : -- stage: -> test needed type: -> behavior ___ Python tracker <http://bugs.python.org/issue14613> ___ ___ Python-bugs-list

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
Changes by Michael Foord : -- versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issue14613> ___ ___ Python-bugs-list mailin

[issue14613] time.time can return None or NaN

2012-04-18 Thread Michael Foord
Michael Foord added the comment: So NaN is a possible result from time.time()? Perhaps that should be mentioned in the docs. Is returning NaN preferable to failing with an exception? -- ___ Python tracker <http://bugs.python.org/issue14

<    14   15   16   17   18   19   20   21   22   23   >