facebook / facebook/watchman

watchman-wait uses dict.iteritems() for python3

Open
#660 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I've installed v4.9.0 from source onto ubuntu distro' and I'm getting the following error when using `python3.5`

```
$ watchman-wait . -p '*.py'
Traceback (most recent call last):
File "/usr/local/bin/watchman-wait", line 185, in
for _, sub in subscriptions.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

$ head -n 1 $(which watchman-wait)
#!/usr/bin/python3

$ /usr/bin/python3 --version
Python 3.5.2
```

Similar to: Homebrew/homebrew-core#33227

**Steps to Reproduce**
I created [this gist](https://gist.github.com/fragmuffin/93988ea92893dd5d1dda365ddeea1385) to build the fault into a docker image.

docker build runs the following `setup.sh`:

```
#!/usr/bin/env bash

apt-get update

# watchman
# variation of: https://facebook.github.io/watchman/docs/install.html#installing-from-source
apt-get install libssl-dev autoconf automake libtool pkg-config wget \
python3.5 python3.5-dev python3-pip -y
ln -s /usr/bin/python3.5 /usr/bin/python3

watchman_ver=4.9.0
pushd /tmp
wget -nv https://github.com/facebook/watchman/archive/v${watchman_ver}.tar.gz \
-O watchman-${watchman_ver}.tar.gz
tar -xzf watchman-${watchman_ver}.tar.gz
cd watchman-${watchman_ver}
./autogen.sh
./configure
make
make install
popd

# pip upgrade
python3 -m pip install --upgrade pip
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.