[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2018-03-01 Thread Preston Landers

Change by Preston Landers :


--
nosy: +planders

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2017-07-18 Thread Kubilay Kocak

Changes by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-13 Thread Jens Timmerman

Jens Timmerman added the comment:

small setup.py file to reproduce this problem if people still had trouble 
reproducing (this works with the attached 
d002-distutils-type-checks-can-fail-issue-23102.patch)

```
#!/usr/bin/env python
''' Installation script that breaks '''

from distutils.command import install
from distutils.core import setup

class installer(install.install):
def run(self):
import setuptools
install.install.run(self)


setup(name='test',
  cmdclass = dict(install=installer)
 )

```
run with: 
python setup.py install --user
result:
```
running install
running build
running install_egg_info
Traceback (most recent call last):
  File "mysetup.py", line 14, in 
cmdclass = dict(install=installer)
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
  File "mysetup.py", line 10, in run
install.install.run(self)
  File "/usr/lib64/python2.7/distutils/command/install.py", line 575, in run
self.run_command(cmd_name)
  File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
  File "/usr/lib64/python2.7/distutils/dist.py", line 970, in run_command
cmd_obj = self.get_command_obj(command)
  File "/usr/lib64/python2.7/distutils/dist.py", line 846, in get_command_obj
cmd_obj = self.command_obj[command] = klass(self)
  File "/usr/lib64/python2.7/distutils/cmd.py", line 59, in __init__
raise TypeError, "dist must be a Distribution instance"
TypeError: dist must be a Distribution instance
```
expected result:
```
running install
running build
running install_egg_info
Writing /home/jens/.local/lib/python2.7/site-packages/test-0.0.0-py2.7.egg-info
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-12 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the updated patches. Since they both intend to fix the same problem, 
we can combine them in one patch file.

--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-12 Thread Greg Turner

Greg Turner added the comment:

Double Huzzah.

I can probably cook up a test and even look at those method invocations in 
considerably less than the existing 1.5-year lifecycle of this bug, but not 
necessarily immediately due to reasons.

--
Added file: 
http://bugs.python.org/file44620/0002-distutils-type-checks-can-fail-issue-23102.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-12 Thread Greg Turner

Greg Turner added the comment:

Huzzah

--
Added file: 
http://bugs.python.org/file44619/0001-distutils-type-checks-can-fail-issue-23102.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-12 Thread Berker Peksag

Berker Peksag added the comment:

The patch doesn't apply cleanly:

applying 
http://bugs.python.org/file37554/distutils_accomodate_distribution_ducktypes.patch
patching file Lib/distutils/cmd.py
Hunk #1 FAILED at 51
1 out of 1 hunks FAILED -- saving rejects to file Lib/distutils/cmd.py.rej
abort: patch failed to apply

So the next step would be to update the patch.

We also need a test case to make sure that the patch fixes the problem reported 
in msg233034.

+1 for relying on duck typing. Perhaps we could also look for methods that are 
called in Command (e.g. get_command_obj(), run_command())

--
nosy: +berker.peksag, jason.coombs
stage:  -> needs patch
versions: +Python 3.7 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-09-12 Thread Jens Timmerman

Jens Timmerman added the comment:

I'm also regularly running into this, it is really annoying, Can I do anything 
to help getting this merged in?

--
nosy: +Jens.Timmerman

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-02-13 Thread Ralf Gommers

Changes by Ralf Gommers :


--
nosy: +ralf.gommers

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2016-02-13 Thread Ralf Gommers

Ralf Gommers added the comment:

Any chance to get this merged?

--
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2014-12-29 Thread Greg Turner

Greg Turner added the comment:

Here's the same deal more-or-less for issue 23114... this time I expended 
considerably less effort verifying that it's not a bad idea.  At a glance, 
though, it looks fine, and solved an instance of the issue 23114 problem I was 
able to repro on my box.

Patch context reduced so as to be applicable to all three pythons in one go.

--
Added file: 
http://bugs.python.org/file37554/distutils_accomodate_distribution_ducktypes.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2014-12-29 Thread Greg Turner

Greg Turner added the comment:

Perhaps it is worth addressing, briefly, the following hypothetical question, 
as a litmus test against the faint dis-encapsulation code-smell some folks 
might be picking up from this:

In a hypothetcial world without setuptools, would these changes have merit?

I'd say, technically, yes.  In the Extension case, we are just really trying to 
ask, is it a tuple, and in the Distribution case, Can we use this thing to 
finalize/reinitialize Commands?, so, in theory, at least, these isinstance() 
checks are less pythonic than the hasattr checks in my patches.

That stated, I think isinstance was the sensible way to code this in a vacuum, 
and obviously, I would never have thought this was a fantastic and self-evident 
proposal, were it not for these setuptools problems.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2014-12-27 Thread Dirkjan Ochtman

Changes by Dirkjan Ochtman dirk...@ochtman.nl:


--
nosy: +djc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2014-12-27 Thread Carsten Grohmann

Changes by Carsten Grohmann carstengrohm...@gmx.de:


--
nosy: +cgrohmann

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution

2014-12-26 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
title: distutils: tip-toe around quirks owing to setuptools monkey-patching 
Extension - distutils: isinstance checks fail with setuptools-monkeypatched 
Extension/Distribution

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23102
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com