[issue45603] [Windows]
New submission from Dean : Running on Windows 10 Home PC, I'm running into an issue with Windows user account privileges and updating Python packages. Upgrading a package (e.g. pip) with a lower-level user on Windows can result in a broken pip package (message of "no 'pip' package can be found"). It can be fixed by running (as admin): python -m ensurepip Then running an upgrade command as Admin. Please consider enforcing Admin privileges for this action (upgrading packages). -- components: Library (Lib) messages: 404949 nosy: hl2guide priority: normal severity: normal status: open title: [Windows] type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue45603> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45603] [Windows] account privileges and updating Python packages
Change by Dean : -- title: [Windows] -> [Windows] account privileges and updating Python packages ___ Python tracker <https://bugs.python.org/issue45603> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41966] datetime.time issue with pickling in PyPy
New submission from Dean : I've run into an issue pickling a datetime.time subclass in PyPy3. I believe it arises because PyPy uses the pure Python implementation of time and time.__reduce_ex__() returns (time, ...) on this line (https://github.com/python/cpython/blob/044a1048ca93d466965afc027b91a5a9eb9ce23c/Lib/datetime.py#L1551) rather than (self.__class__, ...) as it does for datetime.datetime (and in datetime.date.__reduce__()). So when pickle creates the dump it uses the time class rather than my subclass. -- components: Library (Lib) messages: 378155 nosy: belopolsky, , p-ganssle priority: normal severity: normal status: open title: datetime.time issue with pickling in PyPy type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue41966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41966] datetime.time issue with pickling in PyPy
Dean added the comment: Code demonstrating the issue; the CTimeFoo class is pickled correctly, but TimeFoo isn't. import builtins from _datetime import time as ctime original_importer = builtins.__import__ def my_importer(name, globals, locals, fromlist, level): if name == '_datetime': raise ImportError return original_importer(name, globals, locals, fromlist, level) builtins.__import__ = my_importer import datetime builtins.__import__ = original_importer import pickle class CTimeFoo(ctime): pass class TimeFoo(datetime.time): pass class DateFoo(datetime.date): pass if __name__ == "__main__": t = DateFoo(2001, 2, 3) d = pickle.dumps(t) # OK print(d) # b'\x80\x04\x95#\x00\x00\x00\x00\x00\x00\x00\x8c\x08__main__\x94\x8c\x07DateFoo\x94\x93\x94C\x04\x07\xd1\x02\x03\x94\x85\x94R\x94.' t = pickle.loads(d) t = CTimeFoo(1, 2, 3) d = pickle.dumps(t) # OK print(d) # b'\x80\x04\x95&\x00\x00\x00\x00\x00\x00\x00\x8c\x08__main__\x94\x8c\x08CTimeFoo\x94\x93\x94C\x06\x01\x02\x03\x00\x00\x00\x94\x85\x94R\x94.' t = pickle.loads(d) t = TimeFoo(1, 2, 3) d = pickle.dumps(t) # :( print(d) # b'\x80\x04\x95"\x00\x00\x00\x00\x00\x00\x00\x8c\x08datetime\x94\x8c\x04time\x94\x93\x94C\x06\x01\x02\x03\x00\x00\x00\x94\x85\x94R\x94.' t = pickle.loads(d) -- ___ Python tracker <https://bugs.python.org/issue41966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41966] datetime.time issue with pickling in PyPy
Change by Dean : -- keywords: +patch pull_requests: +21695 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22731 ___ Python tracker <https://bugs.python.org/issue41966> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37535] Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1
New submission from Dean : Hi, I've come across an issue with OpenSSL 1.1.1, when a client socket wrapped using ssl.wrap_socket() is used in select.select() its always returning ready for reading even though there appears to be nothing to read. To reproduce: 0. Extract files from attached zip 1. Run server.py 2. Run client.py I expect client.py to print "Nothing to read" and then b'\x00\x01\x02\x03', which it does with Python 2.7.14, 3.6.8 and 3.7.3 and OpenSSL 1.0.1f and 1.1.0g. With OpenSSL 1.1.1 it prints 'Pending: 0' and blocks on the sock.recv(1) call. Thanks! -- assignee: christian.heimes components: SSL files: ssl_select.zip messages: 347595 nosy: christian.heimes, priority: normal severity: normal status: open title: Client SSLSocket with select.select() always returns readable with OpenSSL 1.1.1 type: behavior versions: Python 2.7, Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48464/ssl_select.zip ___ Python tracker <https://bugs.python.org/issue37535> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1227] csv docs say 'excel_tab'; code says 'excel-tab'
New submission from Dean Elzinga: I was trying out 'csv module' and noticed that it wouldn't accept a dialect of 'excel_tab' as documented. Then I noticed that csv.list_dialects() gave 'excel-tab' instead of 'excel_tab' as documented. I'm not sure which one it's supposed to be, but I guess when in doubt the docs are wrong. I leave these issues to the higher gods. Thanks for the work on this module. I'm enjoying it! -- components: Library (Lib) messages: 56211 nosy: dcelzinga severity: normal status: open title: csv docs say 'excel_tab'; code says 'excel-tab' type: behavior versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1227> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1227] csv docs say 'excel_tab'; code says 'excel-tab'
Dean Elzinga added the comment: Ohh! Thanks for the clarification. Sorry for the misunderstanding. > -Original Message- > From: Skip Montanaro [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 02, 2007 8:14 AM > To: [EMAIL PROTECTED] > Subject: [issue1227] csv docs say 'excel_tab'; code says > 'excel-tab' > > > Skip Montanaro added the comment: > > The string name of the dialect is "excel-tab". Hyphens > are not > valid characters in identifiers though, so the actual > object > is named "excel_tab". When you call > csv.get_dialect("excel-tab") > it instantiates the csv.excel_tab class and returns that: > > >>> csv.list_dialects() > ['excel-tab', 'excel'] > >>> csv.get_dialect("excel-tab") > > >>> csv.excel_tab > > >>> csv.get_dialect("excel-tab").__class__ == > csv.excel_tab > True > > -- > assignee: -> skip.montanaro > nosy: +skip.montanaro > resolution: -> works for me > status: open -> closed > > __ > Tracker <[EMAIL PROTECTED]> > <http://bugs.python.org/issue1227> > __ __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1227> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1344] subprocess.communication doc could use clarification
New submission from Dean Sturtevant: It would be helpful for the documentation for subprocess.communicate to point out that when Popening a process, stdin=PIPE needs to be set if the input parameter to communicate is to have any meaning. Similary, stdout=PIPE and stderr=PIPE need to be set in order for the respective component of the return value not to be None. That is, if that is indeed correct (I observed this using Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32) -- components: Documentation messages: 56858 nosy: dsturtevant severity: normal status: open title: subprocess.communication doc could use clarification versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1344> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7443] test.support.unlink issue on Windows platform
Jeff Dean added the comment: > * Patch Py_DeleteFileW in posixmodule.c so that it renames before > deleting: should solve the problem overall but obviously has a > possible wider impact, in general and on performance in particular. > This rename might be a simple rename-to-guid or something more > sophisticated such as the rename-to-recycler which cygwin uses. > > * Patch support.unlink in the test package to do the rename dance on > the basis that it'll fix at least some of the problems with less > impact overall. > > Opinions? I'm willing to do either. I vote for fixing the test package. File system "extensions" may track and record this activity. To use DropBox as an example, doing the rename and delete will cause the renamed and deleted file to be recorded. Just my opinion, but the code path to delete a file should be as short as possible. Making lots of other OS calls just doesn't seem right. I understand the wish to have a reliable unlink call but I'd be uncomfortable with a workaround that may be visible around the edges. -- nosy: +jdigital ___ Python tracker <http://bugs.python.org/issue7443> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3561] Windows installer should add Python and Scripts directories to the PATH environment variable
Jeff Dean added the comment: I just saw Brian Curtin's Pycon 2012 presentation. If a goal is to make it easy for new users to run python, consider installing a desktop shortcut. This would make it very easy for new users (easier than starting up a shell). This is independent of the Path changes discussed here. Those should be made (or not made) on their own merit, since most users will eventually need the Path to be properly adjusted. -- nosy: +jdigital ___ Python tracker <http://bugs.python.org/issue3561> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23078] unittest.mock patch autospec doesn't work on staticmethods
Dean Liao added the comment: I planned to upgrade Chromium OS's mock module to 2.0.0. I also encountered the issue that classmethod cannot be patched as callable mock. Reviewers, can we start the review process? -- nosy: +deanliao ___ Python tracker <https://bugs.python.org/issue23078> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33896] filecmp.cmp returns True on files that differ
New submission from Dean Morin : By default `filecmp.cmp()` has `shallow=True` which can produce some surprising behavior. In the docs it states: > If shallow is true, files with identical os.stat() signatures are taken to be > equal. However the "signature" only considers the file mode, file size, and file modification time, which is not sufficient. `cmp()` will return `True` (files are equal) in some circumstances for files that actually differ. Depending on the underlying file system, the same python script will return `True` or `False` when `cmp()` is called on the exact same files. I'll add the long-winded details at the bottom. To fix, I believe `st.st_ino` should be included in `_sig` (https://github.com/python/cpython/blob/3.7/Lib/filecmp.py#L68). I'm in the middle of a move, but I can make a PR in the next couple weeks if this seems like a reasonable fix and no one else gets around to it. The long version is that we're migrating some existing reports to a new data source. The goal is to produce identical csv files from both data sources. I have a python script that pulls down both csv files and uses `cmp()` to compare them. On my machine, the script correctly discovers the differences between the two. One of the date columns has incorrect dates in the new version. However on my colleagues machine, the script fails to discover the differences and shows that the csv files are identical. The difference is that on my machine, `os.stat(f).st_mtime` is a timestamp which includes fractional seconds (1529108360.1955538), but only includes the seconds (1529108360.0) on my colleagues machine. Since only the dates differed within the csvs, both files had the same file mode, file size, and both were downloaded within the same second. We got a few more people to see what they got for `st_mtime`. The link could be the file system used. We're all using macs, but for those of us using an APFS Volume disk, `st_mtime` returns a timestamp which includes fractional seconds, and for those of us using a Logical Volume Mac OS Extended disk, it returns a timestamp which only includes the seconds (1529108360.0). When comparing os.stat() between the two differing csv files, the only difference (other than fractional seconds for various timestamps) was `st_ino` which is why I believe it should be included in `_sig()`. -- components: Library (Lib) messages: 319904 nosy: Dean Morin priority: normal severity: normal status: open title: filecmp.cmp returns True on files that differ type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue33896> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue33896] filecmp.cmp returns True on files that differ
Dean Morin added the comment: Fair enough, how about just making it clearer in the documentation? Currently you need to look at the source code to see what would be required for a signature clash to occur. Maybe something like: Note that the [os.stat()](https://docs.python.org/3/library/os.html#os.stat) signatures only consider [st_mode](https://docs.python.org/3/library/os.html#os.stat_result.st_mode), [st_size](https://docs.python.org/3/library/os.html#os.stat_result.st_size), and [st_mtime](https://docs.python.org/3/library/os.html#os.stat_result.st_mtime). In some circumstances it's possible for differing files to be considered equal when _shallow_ is `True`. -- ___ Python tracker <https://bugs.python.org/issue33896> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14672] Windows installer: add desktop shortcut(s)
New submission from Jeff Dean : Spun off from Issue3561: I recently saw Brian Curtin's Pycon 2012 presentation. If a goal is to make it easy for new Windows users to run python, consider (optionally) installing a desktop shortcut. This would make it easy for new users to run python (easier than starting up a shell). This does not require the path to be modified. The installer could also (optionally) add a shortcut for starting up a command interpreter with the path modified (for just that shortcut), in case command line access is needed. This would not be necessary if the python being installed is added to the path. The first shortcut would be enabled by default, to help truly novice users. Other users could turn it off, or just delete the shortcut. -- components: Installation messages: 159355 nosy: jdigital priority: normal severity: normal status: open title: Windows installer: add desktop shortcut(s) type: enhancement ___ Python tracker <http://bugs.python.org/issue14672> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com