[issue36379] nb_inplace_pow is always called with an invalid argument

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: object.__ipow__ is documented to take an optional third argument (though there is no way to pass it aside from explicitly calling __ipow__ directly since there is no syntax support for three-arg pow, in place or otherwise), so it's not some incompatib

[issue36355] Remove documentation and internal use of the *RESTRICTED constants for PyMemberDef's flags field

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: Yes, they're set. They're never *read* anywhere. My suggestion was to stop setting them (because it gives the impression they do something when reading the docs, when in fact they do nothing), and remove them fro

[issue36355] Remove documentation and internal use of the *RESTRICTED constants for PyMemberDef's flags field

2019-03-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: Sorry, that should have been "it gives the impression they do something when reading the *source code*" -- ___ Python tracker <https://bugs.python.o

[issue36354] Use CreateProcessW for Python 2.7 on Windows.

2019-03-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: 2.7 is in bug fix only mode, and even that ends at the end of this year. This seems more like a feature request than an actual bug; it works, but not great with Unicode in some cases (which describes large parts of Python 2). It does look like Python 3.7 at

[issue36422] tempfile.TemporaryDirectory() removes entire directory tree even if it's a mount-point

2019-03-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: Allowing delete_on_error=False is kind of defeating the purpose here; the whole point of the with statement is guaranteed, consistent cleanup in both normal and error cases. If you knew enough to know you needed to pass delete_on_error, you'd also

[issue36408] Tkinter multi-processing performance, Linux 10-25 times faster than Windows 10

2019-03-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: Could you provide a minimal reproducer script? With multiprocessing involved, I'd suspect some issue with data sharing (Windows can't fork after all, so it's possible something is involved there). I see nothing obvious in the _tkinter mo

[issue35473] Intel compiler (icc) does not fully support C11 Features, including atomics

2019-03-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: Perhaps an alternative solution would be to provide conditional definitions for the stuff ICC leaves out? I'm assuming ICC can actually handle _Atomic uintptr_t if you type it out, it's just missing the typedef for it for whatever reason? -

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread Josh Rosenberg
Josh Rosenberg added the comment: This is an exact duplicate of #35190 - "collections.abc.Sequence cannot be used to test whether a class provides a particular interface (doc issue)" -- nosy: +josh.r resolution: -> duplicate superseder: -> collections.abc.Sequence c

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread Josh Rosenberg
Change by Josh Rosenberg : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36455> ___ ___ Python-bugs-list

[issue36488] os.sendfile() on BSD and macOS does not return bytes sent on EINTR

2019-04-01 Thread Josh Rosenberg
Josh Rosenberg added the comment: Wasn't the point of PEP475 that all EINTR returns would be explicitly handled by retrying rather than forcing the user to handle it? Seems like the correct solution is still to retry, but on OSX/FreeBSD we'd need to update the offset and count ar

[issue36499] unpickling of a datetime object in 3.5 fails when pickled with 2.7

2019-04-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: As noted, this is fixed in 3.6+. 3.5 is in security fix only mode ( https://devguide.python.org/#status-of-python-branches ), which is why the fix for #22005 wasn't backported. -- nosy: +josh.r resolution: -> duplicate stage: -> reso

[issue36506] [security] CVE-2019-10268: An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'll note that, based on the title, I'm skeptical of the claim of a vulnerability. getattr is effectively *designed* to execute arbitrary code if called on an appropriate object (one where the class defines __getattribute__; defines __getattr

[issue36158] Regex search behaves differently in list comprehension

2019-04-02 Thread Josh Rosenberg
Change by Josh Rosenberg : -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.or

[issue36379] nb_inplace_pow is always called with an invalid argument

2019-04-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: skrah: Is there any reason your patch, as written, wouldn't work? If you need a test case to verify, gmpy2's xmpz type supports in place pow (but requires the modulus to be None, since there is no normal way to pass it anyway), so you can

[issue32941] mmap should expose madvise()

2019-04-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: It might be nice to expose a more limited API to prefetch memory in bulk while we're at it. Windows 8 and higher offers PrefetchVirtualMemory ( https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-prefetchvirtualmemory ) which

[issue36525] Deprecate instancemethod

2019-04-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: Actually, there is a use case, and it's one I've been intermittently trying to replicate ever since the functionality vanished in the Python 2 to 3 transition (or so I thought). The use case is taking an existing built-in function (as in a CPytho

[issue36488] os.sendfile() on BSD, macOS don't return bytes sent on EINTR

2019-04-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: Right. So this is a hard problem for anyone to solve, and therefore os.sendfile should be the one solving it, not the caller of sendfile, right? -- ___ Python tracker <https://bugs.python.org/issue36

[issue36645] re.sub() library entry does not adequately document surprising change in behavior between versions

2019-04-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: I believe the second note under "Changed in 3.7" is intended to address this: > Empty matches for the pattern are replaced when adjacent to a previous > non-empty match. Obviously not as detailed as the What's New entry, but it'

[issue23382] Maybe can not shutdown ThreadPoolExecutor when call the method of shutdown

2019-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: Correct me if I'm wrong, but this isn't actually an issue for CPython, right? The GIL ensures that when a thread writes to _shutdown, nothing else is reading it until the GIL is released and acquired by a new thread (which synchronizes _shutdown).

[issue36650] Cached method implementation no longer works on Python 3.7.3

2019-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: It seems highly likely this is related to #26110 which optimizes method calls by avoiding the creation of bound methods in certain circumstances, and/or the follow-up #29263. Side-note: bound_method = functools.partial(method, self) is not how you create

[issue36650] Cached method implementation no longer works on Python 3.7.3

2019-04-17 Thread Josh Rosenberg
Josh Rosenberg added the comment: Hmm... Although I can't seem to reproduce on 3.7.2 (ob.calls is 1), so assuming it is really happening in 3.7.3, it wouldn't be either of those issues (which were fully in place long before 3.7.2

[issue36715] Dictionary initialization

2019-04-24 Thread Josh Rosenberg
Josh Rosenberg added the comment: This is the same basic problem seen with sequence multiplication, mutable default arguments to a function, etc. It's not going to change though; the documentation says it "Create a new dictionary with keys from iterable and values set to value

[issue36424] Pickle fails on frozen dataclass that has slots

2019-04-25 Thread Josh Rosenberg
Change by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker <https://bugs.python.org/issue36424> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36757] uuid constructor accept invalid strings (extra dash)

2019-04-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: The documentation does describe a fairly flexible parser. Perhaps it's a little too flexible on stuff like URN prefixes, but I don't think we could start enforcing a stricter class of hyphen separations without potentially breaking existing code.

[issue36793] Do not define unneeded __str__ equal to __repr__

2019-05-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: I like this. Always annoying to explicitly override both __repr__ and __str__ on subclasses of stuff like int when they should be the same. Patch looks good to me; I was originally wondering why some classes were replacing: __str__ = __repr__ with

[issue36781] Optimize sum() for bools

2019-05-05 Thread Josh Rosenberg
Change by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker <https://bugs.python.org/issue36781> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36789] Unicode HOWTO incorrectly states that UTF-8 contains no zero bytes

2019-05-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: Minor bikeshed: If updating the documentation, refer to U+ as "the null character" or "NUL", not "NULL". Using "NULL" allows for confusion with NULL pointers; "the null character" (the name used in t

[issue29842] Make Executor.map work with infinite/large inputs correctly

2019-05-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: Noticed unresolved comments (largely on documentation) on the PR and since I'm sprinting this week I finally had the time to address them. I merged the latest master into the PR, hope that's considered the correct way to app

[issue29842] Make Executor.map work with infinite/large inputs correctly

2019-05-06 Thread Josh Rosenberg
Change by Josh Rosenberg : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue29842> ___ ___ Python-bugs-list mailin

[issue11107] Cache constant "slice" instances

2019-05-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'm trying to sprint on this this week. I already had a PoC put together, but it has some significant issues caused by one major quirk with slices: 1. They're immutable, but 2. They're not hashable In various places, it is (reasonabl

[issue23697] Module level map & submit for concurrent.futures

2019-05-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: For the process based versions, it makes it too easy to accidentally fork bomb yourself, since each process that call psubmit would implicitly created another #CPUs workers of its own, so a process based version Brian's case with a mere four top-

[issue11107] Cache constant "slice" instances

2019-05-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: Remi: The reason they're not hashable is presumably because it would make them valid dictionary keys, further confusing the difference between sequences and mappings. x[::-1] would, for a sequence, return a reversed sequence, but for a mapping, would e

[issue13824] argparse.FileType opens a file and never closes it

2019-05-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: Mitar: argparse.FileType's __call__ (which is what "parses" the argument) returns whatever open (aka io.open) returns. Basically, post-parsing, there is nothing about the result of FileType that distinguishes it from a manually opened file

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2019-05-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: Serhiy: To be clear, Moritz's patch won't work if stdin/stdout are io.StringIO or the like either, since StringIO lacks a buffer attribute. Personally, I'm content to: 1. Ignore the closeability of the standard handles; that's not pa

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2019-05-07 Thread Josh Rosenberg
Change by Josh Rosenberg : -- pull_requests: +13082 ___ Python tracker <https://bugs.python.org/issue14156> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2019-05-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: I've created PR13165 to address this bug. It's 99% test updates; the actual code changes to argparse.py are trivial and should be equally trivial to review. The only functional change beyond Moritz's proposal is that I added support for h

[issue35712] Make NotImplemented unusable in boolean context

2019-05-08 Thread Josh Rosenberg
Change by Josh Rosenberg : -- keywords: +patch pull_requests: +13106 stage: test needed -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35712] Make NotImplemented unusable in boolean context

2019-05-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: I've submitted a PR for this. I did discover a use case for boolean evaluation while doing this in the functools.total_ordering helpers. While it's legitimate, it *looks* wrong (the code looks like it didn't consider the possibility of NotI

[issue36868] New behavior of OpenSSL hostname verification not exposed, incorrectly documented

2019-05-09 Thread Josh Rosenberg
New submission from Josh Rosenberg : The What's New in 3.7 docs mention the change from #31399 to use OpenSSL's built-in hostname verification ( https://docs.python.org/3/whatsnew/3.7.html#ssl ), but aside from that, information about the change is largely undiscoverable an

[issue33725] Python crashes on macOS after fork with no exec

2019-05-10 Thread Josh Rosenberg
Josh Rosenberg added the comment: I've seen far too many cases where Python code targeting Linux intentionally uses the COW benefits of fork for multiprocessing to think it would be a good idea to change the default start method there without *some* sort of deprecation p

[issue32723] codecs.open silently ignores argument errors

2018-01-29 Thread Josh Rosenberg
Josh Rosenberg added the comment: On both Py2 and Py3, calling codecs.open without passing an encoding argument is equivalent to adding 'b' to the mode string and calling the built-in open function directly; it returns a plain binary mode file object. The errors parameter is m

[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: Ah, my mistake. That said, when you're not passing an encoding, you're still just calling regular open, it's not doing any special codecs.open wrapping (on Python 2, this meant you weren't decoding the input at all, on Python 3 it means

[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: On rereading the docs for Python 3 codecs.open, it doesn't seem to document the whole "no encoding means no codecs.StreamReaderWriter wrapping behavior" at all. First off, any fix would only apply to Python 3 (I've removed 2.7 from the ve

[issue32723] codecs.open silently ignores argument errors

2018-01-30 Thread Josh Rosenberg
Change by Josh Rosenberg : -- versions: -Python 2.7 ___ Python tracker <https://bugs.python.org/issue32723> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32387] Disallow untagged C extension import on major platforms

2018-01-30 Thread Josh Rosenberg
Josh Rosenberg added the comment: So, just for clarity, is there another approved mechanism for distributing an extension that just happens to act as a (Python version specific) C support library? I've wanted to be able to build a library (static or dynamic) that is installed t

[issue32694] Can no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ?

2018-01-30 Thread Josh Rosenberg
Change by Josh Rosenberg : -- title: Can no longer specify OpenSLL locations with CPPFLAGS / LDFLAGS ? -> Can no longer specify OpenSSL locations with CPPFLAGS / LDFLAGS ? ___ Python tracker <https://bugs.python.org/issu

[issue31356] Add context manager to temporarily disable GC

2018-01-31 Thread Josh Rosenberg
Josh Rosenberg added the comment: YoSTEALTH: I think this is one of those cases where the fact of it being a class is incidental; it's used the same as if it were a function, and just happens to be implemented as a class (the docs actually describe it in terms of a function). PEP8 gui

[issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function

2018-02-03 Thread Josh Rosenberg
Josh Rosenberg added the comment: A server that exposes arbitrary exec's to user-submitted data can already be controlled. exec can do anything that Python can do, that's the whole point. Sure, crashing Python is bad, but it could also keep Python alive and start dumping the d

[issue32784] Wrong argument name for csv.DictReader in documentation

2018-02-06 Thread Josh Rosenberg
Josh Rosenberg added the comment: Side-note: You say "how could i have known it was named 'f'?" >>> help(csv.DictReader) class DictReader | Methods defined here: | | __init__(self, f, fieldnames=None, restkey=None, restval=None, dialect='excel'

[issue32833] argparse doesn't recognise two option aliases as equal

2018-02-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: To be clear, the specific error is: error: ambiguous option: --a could match --a-b, --ab which makes sense if they're separate switches, but doesn't make sense when both expansions are aliases of one another. -- nos

[issue20632] Define a new __key__ protocol

2018-02-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: Do data classes let you define some fields as being excluded from the equality/ordering/hashing? I got the impression that if a field existed, it was part of the "key" no matter what, which isn't necessarily correct in the general case. Simple

[issue20632] Define a new __key__ protocol

2018-02-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: Ah, never mind. Looks like dataclasses.InitVar fields seem to be the answer to excluding a field from the auto-generated methods. -- ___ Python tracker <https://bugs.python.org/issue20

[issue32886] new Boolean ABC in numbers module + Integral>Integer renaming

2018-02-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: First off, link to discussion: https://groups.google.com/d/topic/python-ideas/-3QW3cxj3ko/discussion 1. bool is already a virtual subclass of Integral since it's an actual subclass of int (which is a virtual subclass of Integral); no need to expli

[issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding

2018-02-23 Thread Josh Friend
New submission from Josh Friend : Armin Rigo from the PyPy project pointed this out to me: https://bitbucket.org/pypy/pypy/issues/2755/dbmopen-expects-a-str-for-filename-throws This could probably lead to some weird behavior given the right filename -- components: Library (Lib

[issue33002] Making a class formattable as hex/oct integer requires both __int__ and __index__ for no good reason

2018-03-05 Thread Josh Rosenberg
New submission from Josh Rosenberg : In Python 2, making a user-defined class support formatting using the integer-specific type codes required that __int__ be defined and nothing else (that is, '%x' % Foo() only required Foo to provide a __int__ method). In Python 3, this was

[issue33002] Making a class formattable as hex/oct integer requires both __int__ and __index__ for no good reason

2018-03-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: Note: Obviously, defining __index__ without defining __int__ is a little strange (it's *equivalent* to int, but can't be *coerced* to int?), so yet another fix would be addressing #20092 so it wouldn't be possible for a type to define __

[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2018-03-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: Pingback from #33002, which is caused by the fact that parts of the CPython code base that use PyNumber_Index for type conversion still pre-check for valid types with PyNumber_Check, meaning that a type with __index__ and not __int__ gets erroneously

[issue33002] Making a class formattable as hex/oct integer with printf-style formatting requires both __int__ and __index__ for no good reason

2018-03-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: To be clear, this is a problem with old-style (printf-style) formatting, and applies to both bytes formatting and str formatting. So a class like: class Foo: def __index__(self): return 1 will fail with a TypeError should you do any

[issue33004] Shutil module functions could accept Path-like objects

2018-03-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: I think this falls under the umbrella of #30235, which posits that Path-like objects should be supported by shutil (and includes notes on doc validation). -- nosy: +josh.r ___ Python tracker <ht

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-07 Thread Josh Rosenberg
Josh Rosenberg added the comment: fstat is async signal safe, and I suspect it's thread safe in general, though usage does rely on the file descriptor remaining valid. If the fd in question is closed in another thread after the GIL is released, fstat would fail; if a new file is opene

[issue33087] No reliable clean shutdown method

2018-03-16 Thread Josh Rosenberg
Josh Rosenberg added the comment: To my knowledge, there is no safe way to do this for other threads for a reason. If you make all your worker threads daemons, then they will terminate with the main thread, but they won't perform cleanup actions. If you don't make them daemons,

[issue33124] Lazy execution of module bytecode

2018-03-28 Thread Josh Rosenberg
Josh Rosenberg added the comment: Serhiy: There is a semi-common case where global constants can be quite expensive, specifically, initializing a global full of expensive to compute/serialize data so it will be shared post-fork when doing multiprocessing on a POSIX system. That said, that

[issue33200] Optimize the empty set "literal"

2018-04-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: I may have immediately latched onto this, dubbing it the "one-eyed monkey operator", the moment the generalized unpacking released. I always hated the lack of an empty set literal, and enjoyed having this exist just to fill that asymmetry with

[issue33229] Documentation - io — Core tools for working with streams - seek()

2018-04-05 Thread Josh Rosenberg
Josh Rosenberg added the comment: As indicated in the seek docs ( https://docs.python.org/3/library/io.html#io.IOBase.seek ), all three names were added to the io module in 3.1: > New in version 3.1: The SEEK_* constants. Since they're part of the io module too, there is no need to

[issue33231] Potential memory leak in normalizestring()

2018-04-05 Thread Josh Rosenberg
New submission from Josh Rosenberg : Patch is good, but while we're at it, is there any reason why this multi-allocation design was even used? It PyMem_Mallocs a buffer, makes a C-style string in it, then uses PyUnicode_FromString to convert C-style string to Python str. Seems lik

[issue19993] Pool.imap doesn't work as advertised

2018-04-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: Related: issue29842 "Make Executor.map work with infinite/large inputs correctly" for a similar problem in concurrent.futures (but worse, since it doesn't even allow you to begin consuming results until all inputs are dispatched). A similar

[issue33267] ctypes array types create reference cycles

2018-04-12 Thread Josh Rosenberg
Josh Rosenberg added the comment: Pretty sure this is a problem with classes in general; classes are self-referencing, and using multiplication to create new ctypes array types is creating new classes. -- nosy: +josh.r ___ Python tracker <ht

[issue33319] `subprocess.run` documentation doesn't tell is using `stdout=PIPE` safe

2018-04-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: If the goal is just to suppress stdout, that's what passing subprocess.DEVNULL is for (doesn't exist in Py2, but opening os.devnull and passing that is a slightly higher overhead equivalent). subprocess.run includes a call to communicate as p

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

2018-04-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: None of the actual classes outside of the typing module support this either to my knowledge. You can't do: from collections import deque a: deque[int] nor can you do: a: list[int] Adding Queue to the typing module might make sense (feel

[issue33404] Phone Number Generator

2018-05-01 Thread Josh Rosenberg
Josh Rosenberg added the comment: You named your loop variable i, overlapping the name of your second to last digit, so you end up replacing the original value of i in each (given the break, the only) loop. So before the loop begins, i has the expected value of '6', but on

[issue33404] Phone Number Generator

2018-05-01 Thread Josh Rosenberg
Change by Josh Rosenberg : -- versions: -Python 3.6 ___ Python tracker <https://bugs.python.org/issue33404> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: Note: strftime follows the existing documentation: >>> datetime.datetime(1970, 1, 1, microsecond=1).strftime('%f') '01' The strptime behavior bug seems like a duplicate of #32267, which claims to be fixed in master as of ear

[issue31475] Bug in argparse - not supporting utf8

2017-09-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: Based on the OP's patch, it looks like they have a problem where they have non-ASCII text in their output strings (either due to using non-ASCII switches, or using non-ASCII help documentation), but sys.stdout/sys.stderr are configured for some encoding

[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-09-27 Thread Josh Rosenberg
Change by Josh Rosenberg : -- nosy: +josh.r ___ Python tracker <https://bugs.python.org/issue29943> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-10-19 Thread Josh Cullum
New submission from Josh Cullum : Hi Guys, I'm trying to build Python 3.6.1 and 3.6.3, with both, .configure / make / make install work correctly as they should, however, trying to import _tkinter doesn't work. Going back to the compilation, I get the following error in th

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-10-20 Thread Josh Cullum
Josh Cullum added the comment: Hi Ned, LD_LIBRARY_PATH has been set with the lib paths for both, like I said the module itself builds, I’ll add the module build logs later but the module try’s to get loaded before the tests which unfortunately gives the error undefined symbol

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-10-23 Thread Josh Cullum
Josh Cullum added the comment: Hi Ned, Please see the make logs for _tkinter below: building '_tkinter' extension gcc -pthread -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -W

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2017-11-02 Thread Josh Cullum
Josh Cullum added the comment: Interestingly, I get the error with Python 3.6.3 build from source, where I include the path to the g++ binary. Python builds without the g++ option, but then _Tkinter fails to build - see issue31817 -- nosy: +jpc2350

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-11-02 Thread Josh Cullum
Josh Cullum added the comment: LD_LIBRARY_PATH includes /tools/apps/tk/8.6.7/lib/:/tools/apps/tcl/8.6.7/lib/ and several other library paths that are required. Why would I be getting an undefined symbol error on this module? _tkinter.cpython-36m-x86_64-linux-gnu.so: undefined symbol

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-11-15 Thread Josh Cullum
Josh Cullum added the comment: Hi Ned, Tried that but unfortunately it didn't work. It still produces an error within the make install function which then re-removes the module - it does however create a folder called tkinter. -- ___ P

[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2017-11-28 Thread Josh Cullum
Josh Cullum added the comment: Hi Ned, I've built a new machine, tried the build again using Tk and Tcl shared libraries, built Python-3.6.3 and it's still not worked. The Python/3.6.3-foss-2017b/lib/python3.6/tkinter folder gets created and populated with several files, but wh

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-24 Thread Josh Holland
Change by Josh Holland : -- nosy: +anowlcalledjosh ___ Python tracker <https://bugs.python.org/issue32421> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33361] readline() + seek() on codecs.EncodedFile breaks next readline()

2018-05-21 Thread Josh Rosenberg
Change by Josh Rosenberg : -- title: readline() + seek() on io.EncodedFile breaks next readline() -> readline() + seek() on codecs.EncodedFile breaks next readline() ___ Python tracker <https://bugs.python.org/issu

[issue33864] collections.abc.ByteString does not register memoryview

2018-06-15 Thread Josh Rosenberg
Josh Rosenberg added the comment: memoryview isn't just for bytes strings though; the format can make it a sequence of many types of different widths, meanings, etc. Calling it a BytesString would be misleading in many cases. -- nosy: +j

[issue30811] A venv created and activated from within a virtualenv uses the outer virtualenv's site-packages rather than its own.

2018-06-19 Thread Josh Holland
Change by Josh Holland : -- nosy: +anowlcalledjosh ___ Python tracker <https://bugs.python.org/issue30811> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1617161] Instance methods compare equal when their self's are equal

2018-06-21 Thread Josh Rosenberg
Josh Rosenberg added the comment: If [].append == [].append is True in the "unique set of callbacks" scenario, that implies that it's perfectly fine to not call one of them when both are registered. But this means that only one list ends up getting updated, when you tried t

[issue32475] Add ability to query number of buffered bytes available on buffered I/O

2018-06-26 Thread Josh Snyder
Change by Josh Snyder : -- pull_requests: +7556 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32475> ___ ___ Python-bugs-list mai

[issue32475] Add ability to query number of buffered bytes available on buffered I/O

2018-06-26 Thread Josh Snyder
Josh Snyder added the comment: I've opened PR #7947 with another approach to this issue. In my use-case, an HTTP client makes a request and uses buffered I/O to parse the response headers. I would like to hand off the response socket to an extension module for use with raw I/O syscalls

[issue34168] RAM consumption too high using concurrent.futures (Python 3.7 / 3.6 )

2018-07-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: Note: While this particular use case wouldn't be fixed (map returns in order, not as completed), applying the fix from #29842 would make many similar use cases both simpler to implement and more efficient/possible. That said, no action has been tak

[issue29842] Make Executor.map work with infinite/large inputs correctly

2018-07-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: In any event, sorry to be a pain, but is there any way to get some movement on this issue? One person reviewed the code with no significant concerns to address. There have been a duplicate (#30323) and closely related (#34168) issues opened that this would

[issue29842] Make Executor.map work with infinite/large inputs correctly

2018-07-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: In response to Max's comments: >But consider the case where input is produced slower than it can be processed >(`iterables` may fetch data from a database, but the callable `fn` may be a >fast in-memory transformation). Now suppose the `Ex

[issue34259] Improve docstring of list.sort

2018-08-01 Thread Josh Rosenberg
Josh Rosenberg added the comment: Copying from the sorted built-in's docstring would make sense here, given that sorted is implemented in terms of list.sort in the first place. -- nosy: +josh.r ___ Python tracker <https://bugs.py

[issue34321] mmap.mmap() should not necessarily clone the file descriptor

2018-08-03 Thread Josh Rosenberg
Josh Rosenberg added the comment: Why would it "cause an issue if the file is closed before accessing the mmapped region"? As shown in your own link, the constructor performs the mmap call immediately after the descriptor is duplicated, with the GIL held; any race condition that c

[issue34364] problem with traceback for syntax error in f-string

2018-08-08 Thread Josh Rosenberg
Josh Rosenberg added the comment: So the bug is that the line number and module are incorrect for the f-string, right? Nothing else? -- nosy: +josh.r ___ Python tracker <https://bugs.python.org/issue34

[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-08-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Carlo: The point of Xiang's post is that this is only tangentially related to multiprocessing; the real problem is that tee-ing an iterator implemented in Python (of which pool.imap_unordered is just one example) and using the resulting tee-ed iterato

[issue34458] No way to alternate options

2018-08-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: That's a *really* niche use case; you want to store everything to a common destination list, in order, but distinguish which switch added each one? I don't know of any programs that use such a design outside of Python (and therefore, it seems unli

[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Bloating the documentation is almost certainly unjustifiable for list and tuple, and only barely justifiable for int, bool and float, given that: 1. The documentation (at least for Python 3) has *never* claimed the arguments could be passed by keyword (all

[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: Oh, I was checking old docs when I said the online docs didn't call int's argument "x"; the current docs do, so int, float and bool all justify a change (barely), it's just tuple and list for which it&#

[issue34434] Removal of kwargs for built-in types not covered with "changed in Python" note in documentation

2018-08-22 Thread Josh Rosenberg
Josh Rosenberg added the comment: For tuple and list, no, they couldn't have looked at the help (because the help calls the argument "iterable", while the only keyword accepted was "sequence"). Nor was "sequence" documented in the online docs, nor any

[issue34494] simple "sequence" class ignoring __len__

2018-08-26 Thread Josh Rosenberg
Josh Rosenberg added the comment: That's the documented behavior. Per https://docs.python.org/3/reference/datamodel.html#object.__getitem__ : >Note: for loops expect that an IndexError will be raised for illegal indexes >to allow proper detection of the end of the sequence. T

<    1   2   3   4   5   6   7   8   9   >