[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2020-01-01 Thread sam jonas
sam jonas added the comment: Hi i am also facing the same issue, please provide a good solution -- nosy: +samjonas ___ Python tracker <https://bugs.python.org/issue38

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Sam Clegg added the comment: We just ran into the same issue trying to use this zip as part of the emscripten SDK (https://github.com/emscripten-core/emsdk/pull/349). Seems like a fairly fundamental problem with the windows embeddable zip file. Is there any downside to simply removing the

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Change by Sam Clegg : -- components: +Installation ___ Python tracker <https://bugs.python.org/issue34841> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Sam Clegg added the comment: In our case we ended up stripping the .pth file and distributing that modified .zip files. I guess the main problem here is that its really not clear that this version of python doesn't work like the others, or needs to be modified before use. It can be

[issue34841] Script’s directory not in sys.path with embeddable Windows distribution

2020-02-04 Thread Sam Clegg
Sam Clegg added the comment: Thanks for the info. If we run into any more difficulties I'll look into nuget. I should indeed have read the docs more closely. Apologies. -- ___ Python tracker <https://bugs.python.org/is

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
New submission from Sam Gross : A recent commit added a typedef for PyTypeObject in Include/object.h https://github.com/python/cpython/commit/0e4e735d06967145b49fd00693627f3624991dbc This duplicates the typedef in Include/cpython/object.h. Building with clang now issues a warning: ./Include

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
Sam Gross added the comment: Alternatively I think you can just remove the typedef from Include/cpython/object.h since Include/object.h is always included first. i.e.: typedef struct _typeobject { ... } PyTypeObject; to simply struct _typeobject

[issue39571] clang warns "warning: redefinition of typedef 'PyTypeObject' is a C11 feature [-Wtypedef-redefinition]"

2020-02-06 Thread Sam Gross
Sam Gross added the comment: Yes, that fixes the warnings for me. Thanks! -- ___ Python tracker <https://bugs.python.org/issue39571> ___ ___ Python-bugs-list m

[issue39858] bitfield layout wrong in ctypes

2020-03-04 Thread Sam Price
New submission from Sam Price : if 8 1 byte fields are included in a ctype field, it allows an extra byte to be included in the packing when there is no room left for the next field. If I put the bitfields in a child structure then I get expected results. In [35]: run ctypeSizeTest.py Size

[issue39858] bitfield layout wrong in ctypes

2020-03-05 Thread Sam Price
Sam Price added the comment: Does not happen on windows. Error is in cfield.c ``` #ifndef MS_WIN32 } else if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfield open */ && dict->size * 8 >= *pfield_size &&

[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2020-03-05 Thread Sam Price
Sam Price added the comment: I ran into this bug on mac and submitted a duplicate issue of 39858 If you add the check *pfield_size != *pbitofs it fixes this bug. #ifndef MS_WIN32 } else if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfi

[issue40120] Undefined C behavior going beyond end of struct via a char[1].

2020-03-31 Thread Sam Gross
Sam Gross added the comment: It may be worth considering C-API extensions written in C++. Flexible array members are not part of the C++ standard, although GCC, Clang, and MSVC support them as an extension. GCC and Clang will issue warnings with `-Wpedantic` and MSVC will issue warnings

[issue40576] Align docs for list.sort, sorted, and on the website

2020-05-09 Thread Sam Lijin
New submission from Sam Lijin : It's mildly confusing to see `pydoc sorted` and `pydoc list.sort` to look so different, esp. since sorted just delegates to list.sort. By extension, https://docs.python.org/3/library/functions.html#sorted should also be aligned with this, but I'm

[issue40576] Align docs for list.sort, sorted, and on the website

2020-05-09 Thread Sam Lijin
Change by Sam Lijin : -- keywords: +patch pull_requests: +19327 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20017 ___ Python tracker <https://bugs.python.org/issu

[issue40576] Align docs for list.sort, sorted, and on the website

2020-05-09 Thread Sam Lijin
Sam Lijin added the comment: I do clarify that they're not the same thing and that `sorted` accepts any iterable: https://github.com/python/cpython/pull/20017/files#diff-30d76a3dc0c885f86917b7d307ccf279 -- ___ Python tracker &

[issue42575] Suggest to add an LinkedList data structure to python

2020-12-04 Thread Sam Yan
New submission from Sam Yan : There has been no LinkedList data structure for Python. Therefore suggest adding a LinkedList data structure. -- components: C API files: LinkedList.py messages: 382557 nosy: SamUnimelb priority: normal severity: normal status: open title: Suggest to add

[issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp

2021-01-29 Thread Sam Kagan
Sam Kagan added the comment: I encountered this issue in Python 3.8. I consider it to be a bug because it's an instance of a class-defined constant (datetime.min) not working with a method of that class (timestamp) when all other values that the class could take work with the method AN

[issue43404] No SSL certificates when using the Mac installer

2021-03-04 Thread Sam Bull
New submission from Sam Bull : After installing the latest version of Python on Mac OS X using the installer downloaded from python.org (https://www.python.org/ftp/python/3.9.2/python-3.9.2-macosx10.9.pkg), the installed version of Python is unable to find the system certificates. Using the

[issue36484] Can't reorder TLS 1.3 ciphersuites

2020-05-31 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer ___ Python tracker <https://bugs.python.org/issue36484> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33618] Support TLS 1.3

2020-05-31 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer ___ Python tracker <https://bugs.python.org/issue33618> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40563] Support pathlike objects on dbm/shelve

2020-06-02 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer ___ Python tracker <https://bugs.python.org/issue40563> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38364] inspect.iscoroutinefunction / isgeneratorfunction / isasyncgenfunction can't handle partialmethod objects

2020-06-07 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer ___ Python tracker <https://bugs.python.org/issue38364> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33315] Allow queue.Queue to be used in type annotations

2020-06-12 Thread Sam Bull
Change by Sam Bull : -- nosy: +dreamsorcerer ___ Python tracker <https://bugs.python.org/issue33315> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42301] Lack function to track index of an element in heapq

2020-11-09 Thread Sam Yan
New submission from Sam Yan : Github PR #23204: For a given element in a heap, we can leverage the fact that we can search this element quicker thinking of the property of a heap. Therefore out of h.index(x) that a list linear search uses, I propose to use a special written index method to

[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances
New submission from Sam Frances : The documentation for `asyncio.run()` states: "This function runs the passed coroutine, taking care of managing the asyncio event loop and finalizing asynchronous generators." However, the following example seems to indicate that async generato

[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances
Sam Frances added the comment: Apologies for the stray unused function in the example. It should have read: ``` import asyncio async def count(): try: i = 0 while True: yield i i += 1 finally: print("count() cleanup")

[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances
Sam Frances added the comment: One final note: changing the `main()` function from the example to add a zero-sleep seems to fix it, but this seems like a rather ad-hoc solution. ``` async def main(): async for i in double(count()): if i > 10: break prin

[issue22171] stack smash when using ctypes/libffi to access union

2018-12-26 Thread Sam Kerr
Sam Kerr added the comment: I was also able to get the stack smashing behavior with the following: OS: Linux slaptop 4.19.12-arch1-1-ARCH #1 SMP PREEMPT Fri Dec 21 13:56:54 UTC 2018 x86_64 GNU/Linux GCC: gcc (GCC) 8.2.1 20181127 I was able to track down the issue into the src/x86/ffi64.c

[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-10 Thread Sam Silberstein
New submission from Sam Silberstein: Hi there! This is my first submission to the bug tracker, so I apologize if I'm missing some formatting here. I've found what's either vague documentation for the 'prefix' parameter of `pgkutil.walk_packages` or a bug. The me

[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-11 Thread Sam Silberstein
Changes by Sam Silberstein : -- components: +Library (Lib) -Documentation versions: -Python 2.7 ___ Python tracker <http://bugs.python.org/issue30337> ___ ___

[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-11 Thread Sam Silberstein
Sam Silberstein added the comment: Hi there! This is my first submission to the bug tracker, so I apologize if I'm missing some formatting here. I've found what's either vague documentation for the 'prefix' parameter of `pgkutil.walk_packages` or a bug. The method

[issue30513] getrusage returns platform-dependent value

2017-05-30 Thread sam-s
New submission from sam-s: `resource.getrusage(resource.RUSAGE_SELF).ru_maxrss` returns the peak memory usage, in *bytes* on BSD (including Mac OS X) and in *kilobytes* on Linux. This means that to get a cross-platform value, the user has to check `sys.platform`, which is fairly inconvenient

[issue30513] getrusage returns platform-dependent value

2017-05-30 Thread sam-s
sam-s added the comment: Experiment shows that the Linux multiplier is 1024 (not 1000). -- ___ Python tracker <http://bugs.python.org/issue30513> ___ ___ Pytho

[issue30515] unittest: assertAlmostEqual rounding error

2017-05-30 Thread sam-s
New submission from sam-s: I get this `unittest` failure: ``` Traceback (most recent call last): File "zzz.py", line 348, in test_opposite self.assertAlmostEqual(a, b, places=2) AssertionError: 1.1036640046288428 != 1.0986122886681098 within 2 places ``` This seems

[issue30515] unittest: assertAlmostEqual rounding error

2017-05-30 Thread sam-s
sam-s added the comment: you are right, sorry. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

2019-04-12 Thread Sam Dunster
Change by Sam Dunster : -- nosy: +sdunster ___ Python tracker <https://bugs.python.org/issue36607> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2019-05-06 Thread Sam Martin
Change by Sam Martin : -- keywords: +patch pull_requests: +13054 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33110> ___ ___ Py

[issue36834] mock.patch.object does not persist __module__ name for functions

2019-05-07 Thread Sam Park
New submission from Sam Park : The expectation is that the __module__ attribute for a patched function should persist after patching. Minimal test case is attached. Simply run pytest in a venv with the files. Output: def test_zxc(): with mock.patch.object(mymodule, 'asd', s

[issue36790] test_asyncio fails with application verifier!

2019-05-14 Thread sam jonas
sam jonas added the comment: Thanks for the solution... -- nosy: +samjonas ___ Python tracker <https://bugs.python.org/issue36790> ___ ___ Python-bugs-list m

[issue33110] Adding a done callback to a concurrent.futures Future once it has already completed, may raise an exception, contrary to docs

2018-03-20 Thread Sam Martin
New submission from Sam Martin : Whilst working with concurrent.futures and ThreadPoolExecutors, my colleague and I have noted some undocumented behaviour. When adding a done_callback to a future that has already completed, we note that that callback is executed directly, outside of any try

[issue31906] String literals next to each other does not cause error

2017-10-30 Thread Sam Lobel
New submission from Sam Lobel : This seems too obvious to have been missed, but also too strange behaviour to be on purpose. The following works for some reason (note there's no + between the words) >>> variable = "first" "second" >>> print(variable)

[issue31906] String literals next to each other does not cause error

2017-10-30 Thread Sam Lobel
Change by Sam Lobel : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue31906> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate

2017-11-09 Thread Sam Napolitano
New submission from Sam Napolitano : I recently came across an issue in the ssl library and have a simple fix to address it. When doing hostname verification against an X.509 certificate, a trailing dot (period) in the hostname is matched against the certificate. But the trailing dot should

[issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate

2017-11-14 Thread Sam Napolitano
Sam Napolitano added the comment: Sorry I wasn't able to get back to you sooner. If having a trailing dot in the cert is an RFC violation, then case 2 can be left alone. As for case 3, we can be more explicit: if hostname ends in a dot AND cert does not end in a dot, strip dot

[issue25228] Regression in http.cookies parsing with brackets and quotes

2018-05-28 Thread Sam Park
Change by Sam Park : -- nosy: +spark ___ Python tracker <https://bugs.python.org/issue25228> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue25228] Regression in http.cookies parsing with brackets and quotes

2018-05-28 Thread Sam Park
Sam Park added the comment: I'm seeing a similar issue with curly brackets. from Cookie import BaseCookie cookie = BaseCookie('asd={"asd"}; my-real-cookie=stuff i care about; blah=blah') assert 'my-real-cookie' in cookie # False -- ___

[issue34138] RFC 6855 issue

2018-07-17 Thread Sam Varshavchik
New submission from Sam Varshavchik : Greetings. I am in the process of implementing RFC 6855 in Courier-IMAP. A Google search for IMAP clients that implement RFC 6855 led me to https://bugs.python.org/issue21800 and looking over the code that was added to imaplib, to support RFC 6855, a few

[issue34138] imaplib RFC 6855 issue

2018-07-18 Thread Sam Varshavchik
Sam Varshavchik added the comment: I don't have sufficient python or imaplib exposure to be able to implement full UTF8 APPEND functionality. I was merely investigating and researching what IMAP UTF8 support there was, in all existing client and server code I knew of. What I can propo

[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2018-10-03 Thread Sam Bishop
Sam Bishop added the comment: Would the enhancements to resolve this, by making singledispatch accept more things, also resolve the AssertionError from functools.singledispatch when passing it custom types, or should I raise this as a separate issue

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-09 Thread Sam Ferencik
New submission from Sam Ferencik: distutils.util.get_platform() semantically differs on (a) Windows and OS X, and on (b) Linux. Windows/OS X: the return value is derived from the architecture of the *interpreter*, hence for 32-bit Python running on a 64-bit system, get_platform() = '

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-11 Thread Sam Ferencik
Sam Ferencik added the comment: Unfortunately, I don't have a patch. Some thoughts: To discover a 32-bit interpreter running on a 64-bit system, we could use platform.architecture(), which returns >>> platform.architecture() ('32bit', 'ELF') What th

[issue14894] distutils.LooseVersion fails to compare number and a word

2013-09-12 Thread Sam Lai
Sam Lai added the comment: I have a more realistic example of this bug. In the docstring for distutils.LooseVersion, it says '1.5.1' and '3.2.p10' are both valid version numbers. If instead of '3.2.p10', we use '1.5.p10', the following occurs

[issue14684] zlib set dictionary support inflateSetDictionary

2012-04-27 Thread Sam Rushing
New submission from Sam Rushing : Google's SPDY protocol requires the use of a pre-defined compression dictionary. The current zlib module doesn't expose the two functions for setting the dictionary. This patch is minimal in the sense that it only exposes the two func

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: I'm currently reworking this so that the dictionaries are provided in the constructor, and inflateSetDictionary() is called automatically. I've gone over the zlib RFC's and zlibmodule.c, and I'm fairly certain that whatever usage mode mi

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: Ok, here's the patch. It has a single short test. For use with SPDY, it's necessary to test that the following stream data also correctly decompresses, I'll attach that to the next comment. -- Added file: http://bugs.pytho

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: This test is rather large, since it includes the predefined SPDY draft 2 dictionary, and some real-world data. Not sure what the policy is on including so much data in a test. If there's enough time I could make a smaller test that also verifies the co

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: Argh, probably need to add the 'dict' field to the copy() method. -- ___ Python tracker <http://bugs.python.o

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Sam Rushing added the comment: Updated version of the patch: extends the test, including a test of the streaming behavior needed for SPDY (both compression and decompression). Also wik: copy()/uncopy() are aware of the 'dict'

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-03 Thread Sam Rushing
Changes by Sam Rushing : Added file: http://bugs.python.org/file25449/zlib_set_dictionary_3.patch ___ Python tracker <http://bugs.python.org/issue14684> ___ ___ Python-bug

[issue14684] zlib set dictionary support inflateSetDictionary

2012-05-05 Thread Sam Rushing
Sam Rushing added the comment: renames dict->zdict, splits the test, adds BEGIN/END around inflate call. -- Added file: http://bugs.python.org/file25472/zlib_set_dictionary_4.patch ___ Python tracker <http://bugs.python.org/issu

[issue232493] UserString can not be used as string in calls to C routines

2012-06-14 Thread Sam Whitehead
Sam Whitehead added the comment: This still seems to be the case in 3.2. Python 3.2.3 (default, Apr 23 2012, 23:35:30) [GCC 4.7.0 20120414 (prerelease)] on linux2 >>> from collections import UserString >>> a = UserString("foop") >>> import os.path

[issue14684] zlib set dictionary support inflateSetDictionary

2012-06-18 Thread Sam Rushing
Sam Rushing added the comment: I think other than the disagreement about whether the dictionary constructor arg should be a buffer object, it's good to go. To restate my position: the need is for an immutable string of bytes, and that's exactly what PyBytes_Type is for. I see no ad

[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese
Sam Breese added the comment: Looking into this now. Should have a patch either later today or tommorow. -- nosy: +Sam.Breese ___ Python tracker <http://bugs.python.org/issue15

[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese
Sam Breese added the comment: Also, would you mind posting an example? I'm having trouble replicating. -- ___ Python tracker <http://bugs.python.org/is

[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese
Sam Breese added the comment: Nevermind, replicated it. Changing start = max(start, 1) to start = max(start, 0) DOES fix. Writing a test case now. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15812] inspect.getframeinfo() cannot show first line

2012-09-30 Thread Sam Breese
Sam Breese added the comment: Here's a patch. Very, very simple, just changed that one line in inspect.py and wrote a highly primitive test case for inspect.getframeinfo. The test isn't actually testing the primary functionality right now, just this one bug. I can probably

[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-21 Thread Sam Breese
Sam Breese added the comment: Writing a patch now. Should be ready in a few hours. -- nosy: +Sam.Breese ___ Python tracker <http://bugs.python.org/issue16

[issue16142] ArgumentParser inconsistent with parse_known_args

2012-10-23 Thread Sam Breese
Sam Breese added the comment: Make that a few days. I fixed the case where the known arg is first, but not the other one. Will get to it soon, hopefully. -- ___ Python tracker <http://bugs.python.org/issue16

[issue15104] Unclear language in __main__ description

2014-04-14 Thread Sam Lucidi
Sam Lucidi added the comment: I've attempted to synthesize the ideas in this thread into a clearer explanation of __main__. What I've written doesn't attempt to explain anything else about module naming, but it does try to address the common package and module u

[issue15104] Unclear language in __main__ description

2014-04-14 Thread Sam Lucidi
Sam Lucidi added the comment: Thanks, I've revised the change based on your comments. -- Added file: http://bugs.python.org/file34822/clarify-__main__-documentation.patch ___ Python tracker <http://bugs.python.org/is

[issue18628] Better index entry for encoding declarations

2014-04-14 Thread Sam Lucidi
Sam Lucidi added the comment: Here's a patch which changes the entry in the index to "encoding declarations (source file)" per Terry's third point. -- keywords: +patch nosy: +mansam Added file: http://bugs.python.org/file34826/encoding-decl

[issue15104] Unclear language in __main__ description

2014-04-14 Thread Sam Lucidi
Changes by Sam Lucidi : Added file: http://bugs.python.org/file34831/clarify-__main__-documentation-backticks.patch ___ Python tracker <http://bugs.python.org/issue15

[issue10481] subprocess PIPEs are byte streams

2014-04-14 Thread Sam Kimbrel
Sam Kimbrel added the comment: I've created a patch that updates the docs to reflect the behavior of communicate() and check_output(), which is that both the "input" argument and stdin/stdout/stderr PIPEs will convert to and from strings when self.univeral_newlines is True an

[issue20956] tokenize module claims tokenize.tokenize returns namedtuple, but it doesn't

2014-04-14 Thread Sam Kimbrel
Sam Kimbrel added the comment: Attached patch to update 2.7 docs to refer to the plain-old-tuple returned from generate_tokens(). -- keywords: +patch nosy: +sam.kimbrel Added file: http://bugs.python.org/file34841/20956-tokenize-docs.diff ___ Python

[issue17078] string.Template.safe_substitute hard-wires "braces" as {}

2014-04-14 Thread Sam Kimbrel
Sam Kimbrel added the comment: Florent Xicluna already fixed this in r84888 for 3.2+; I've tested that the patch applies cleanly to 2.7 and tests pass. Someone with the commit bit should transplant that commit into 2.7 as it does not change the public API to this module. --

[issue21075] fileinput should use stdin.buffer for "rb" mode

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Patch attached that checks for 'b' in self._mode and sets self._file to sys.stdin.buffer as appropriate. -- keywords: +patch nosy: +sam.kimbrel Added file: http://bugs.python.org/file34880/21075-fileinput-

[issue18401] Tests for pdb import ~/.pdbrc

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Picked up Martin's patch and added docs, misc/NEWS entry, and a test for readrc=False behavior. -- nosy: +sam.kimbrel Added file: http://bugs.python.org/file34892/18401-pdb-readrc-kwarg-with-docs-and-tests

[issue6490] os.popen documentation is probably wrong

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Updated the patch as per Martin's notes in msg203483. -- nosy: +sam.kimbrel Added file: http://bugs.python.org/file34896/6490-os-popen-docs.diff ___ Python tracker <http://bugs.python.org/i

[issue6490] os.popen documentation is probably wrong

2014-04-15 Thread Sam Kimbrel
Sam Kimbrel added the comment: Yes, I think that wording works a lot better. Thanks for the touch-up. -- ___ Python tracker <http://bugs.python.org/issue6

[issue21263] test_gdb failures on os x 10.9.2

2014-04-16 Thread Sam Kimbrel
New submission from Sam Kimbrel: test_gdb fails under OS X 10.9.2 and gdb 7.6.1 (built with homebrew on Apple LLVM version 5.1 (clang-503.0.40)): FAIL: test_pycfunction (test.test_gdb.PyBtTests) Verify that "py-bt" displays invocations of PyCFunction

[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2014-04-17 Thread Sam Kimbrel
Sam Kimbrel added the comment: Here's a patch that corrects col_offset for binops in both the ast module and in the compiler proper. I've incorporated Aivar's test into test_ast.py; if there are test suites for compile.c please let me know and I can add somet

[issue18617] TLS and Intermediate Certificates

2014-04-21 Thread Sam Vilain
Sam Vilain added the comment: Perhaps the simplest thing here is to add a standard verify callback that catches verification errors, and returns the parsed server certificate as an attribute of the raised exception object. From python, the exception can be caught and then the certificate

[issue16477] tarfile fails to close file handles in case of exception

2012-11-15 Thread Sam Thursfield
New submission from Sam Thursfield: Exceptions such as disk full during extraction cause tarfile to leak file handles. Besides being messy, it causes real problems if, for example, the target file is on a mount that should be unmounted before the program exits - in this case, the unmount will

[issue16477] tarfile fails to close file handles in case of exception

2012-11-15 Thread Sam Thursfield
Sam Thursfield added the comment: sorry, replace 'open' with 'bltn_open' in the above comment - no need to change it. -- ___ Python tracker <http://bug

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-13 Thread Sam Ferencik
Sam Ferencik added the comment: Are you asking *what* distutils does? It tackles the problem completely differently on Windows, Unix, and OS X. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-13 Thread Sam Ferencik
Sam Ferencik added the comment: It's very hacky on all of Windows, Unix, and OS X. That's why I don't feel confident to propose a solution. On Unix, specifically, the return value is heavily based on os.uname(). It seems that the maintainers of OS X have started with the same

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-13 Thread Sam Ferencik
Sam Ferencik added the comment: Well, the maintainers of Mac OS didn't consider it a won't fix - and have this working properly. I don't see why we couldn't try to copy what they did. Actually, I think the impact of changing this for 32-bit Python on 64-bit Linux shoul

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2013-09-16 Thread Sam Ferencik
Sam Ferencik added the comment: Thanks for the context. > A compatibility issue here is that the value provided by get_platform() is > also used outside of Distutils, in particular by pkg_resources (provided by > setuptools) and by pip, in both cases to help determine whether

[issue22047] argparse improperly prints mutually exclusive options when they are in a group

2014-07-23 Thread Sam Kerr
New submission from Sam Kerr: The following code: import argparse parser = argparse.ArgumentParser() group1 = parser.add_mutually_exclusive_group() group2 = group1.add_mutually_exclusive_group() group2.add_argument('-hello',action='store_true', he

[issue22047] argparse improperly prints mutually exclusive options when they are in a group

2014-07-25 Thread Sam Kerr
Sam Kerr added the comment: What I was going for was the ability to have a group contain a mutually exclusive group and a non-exclusive group, but using the mutually exclusive group meant you could not use the non-exclusive group. Such as: [ [ -opt1 | -opt2 | -opt3 ] [ [-opt4] [-opt5

[issue22047] argparse improperly prints mutually exclusive options when they are in a group

2014-07-25 Thread Sam Kerr
Sam Kerr added the comment: I fat fingered the example, sorry: [ [ -opt1 | -opt2 | -opt3 ] | [ [-opt4] [-opt5] [-opt6] ] ] Note the new pipe between the 2 subgroups -- ___ Python tracker <http://bugs.python.org/issue22

[issue5639] Support TLS SNI extension in ssl module

2014-02-27 Thread Sam Gleske
Sam Gleske added the comment: Are you kidding me? I can't believe SNI isn't being backported to python 2.x. This is ridiculous in my opinion. The bug fix needs to be back ported. -- nosy: +sag47 versions: +Python 2.7, Python 3.1

[issue22790] __qualname__ missing from dir(__class__) during class initialisation

2014-11-04 Thread Sam Bishop
New submission from Sam Bishop: The output of performing "dir(__class__)" during a class' __init__ method, seems to be lacking the new '__qualname__' attribute in python 3. This rough test can be pasted right into the python 3.4 REPL to see the issue. Tested on 64bit

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Sam Bishop
Sam Bishop added the comment: I specified 'during class initialisation' because that was the only case I confirmed. -- ___ Python tracker <http://bugs.python.o

[issue24465] Make tar files created by shutil.make_archive() have deterministic sorting

2015-06-18 Thread Sam Thursfield
New submission from Sam Thursfield: I want shutil.make_archive() to produce deterministic output when given identical data as inputs. Right now there are two holes in this. One is that mtimes might not match. This can be fixed by the caller. The second is that the order that files in a

[issue24465] Make tar files created by shutil.make_archive() have deterministic sorting

2015-06-18 Thread Sam Thursfield
Changes by Sam Thursfield : -- keywords: +patch Added file: http://bugs.python.org/file39728/tarfile-stable-ordering.patch ___ Python tracker <http://bugs.python.org/issue24

[issue24465] Make tarfile have deterministic sorting

2015-06-18 Thread Sam Thursfield
Sam Thursfield added the comment: Thanks for the comments! Would you be happy for the patch to be merged if it was implemented by modifying shutil.make_archive() instead? I will rework it if so. -- ___ Python tracker <http://bugs.python.

[issue24465] Make tarfile have deterministic sorting

2015-06-19 Thread Sam Thursfield
Sam Thursfield added the comment: I've discovered that this patch introduces a nasty failure case! If you have a relative symlink pointing to a directory that's alphabetically sorted after the symlink, and files inside the symlink, 'tar -x' won't be able to create

[issue24465] Make tarfile have deterministic sorting

2015-06-19 Thread Sam Thursfield
Sam Thursfield added the comment: Having tested, the problem I described above doesn't happen with this patch. It's a mistake in some other code I wrote which is following symlinks when it should not do. -- ___ Python trac

[issue24465] Make tarfile have deterministic sorting

2015-06-22 Thread Sam Thursfield
Sam Thursfield added the comment: Here's a patch which does the same thing but only for shutil.make_archive(). Note that the final output will still be non-deterministic if you use format=gztar because time.time() and the base_name argument get added to the gzip header. Might be nice t

<    1   2   3   >